none
BusinessObject-driven report (rdlc) -- dynamic image pain and more RRS feed

  • Question

  • This has been the bane of my existance for two days now.  What I'm doing SHOULD BE painfully simple.  For some reason, the Microsoft Reporting mechanism doesn't think so.

    Background:  I've got a WinForms application using my own Objects to populate a simple .rdlc report.  I'm able to pull all the data I need from my DataSources, except for two items, which is the basis of my problem.

    PROBLEM 1:

    I dynamically generate a single bitmap (which I know is well-formed) in my application.  I simply want to display this on the report.  However, following the method presented in the WalkThrough (http://msdn.microsoft.com/en-us/library/ms251784(VS.80).aspx) (but using an Image instead of a Table) I get no image and this in the output window:

    Warning: The Value expression for the image ‘image1’ contains an error: The expression referenced a non-existing field in the fields collection. (rsRuntimeErrorInExpression)
    Warning: The Value expression for the image ‘image1’ did not evaluate to an image. (rsInvalidDatabaseImage)

    FYI, the Value expression for the Image object is =Fields!ChartImage.Value.  I've also tried the =First(Fields!ChartImage.Value, "MY_DATASET") format, but that was equally useless.

    Now, I'm sure that the DataSource is correct, as other data elements are showing up, plus, ChartImage is listed in my Data Sources.  What's more bothersome, is that I can set a breakpoint at the getter for ChartImage and the reportViewer definitely executes that get - and there's definitely a bitmap there.  Why then won't the report render it?!?!

    PROBLEM 2:

    My second issue is best illustrated by again referring to the example in the WalkThrough above.  In that WalkThrough, what if Merchant has ANOTHER List<Product> called x_products that we also wanted to list on the report?  Since there is only one this.ProductBindingSource.DataSource defined, you can't access x_products on the same report... or can you??!?  The answer to this riddle will help me solve my second problem.


    I'm sorry this was so long... I'd greatly appreciate any help!!
    Friday, May 2, 2008 4:40 AM