We have a small in house project that requires reporting. I'm trying to use reportviewer as it seems like it will do exactly as we require and didn't want to get bogged down with the complexity of crystal reports if I could help it.
I am trying to use a business object that I am passing to the report.rdlc. The problem is that the properties in my object are not driectly exposed. The properties I require are embedded within another object inside the top level object. As this is a WCF project I don't have much say about what goes on at the server end. I am just able to request these objects or Insert/Update/Delelte their info from the database. It is done in this way as the back end can use multiple flavours of database.
Here is what I can see after adding my business object as a DataSource:
-BusinessObject
-CustomerInfo
-ClientName
-ColumnName
-DisplayName
-FieldName
-IsNull
-KeyColumn
-SenondKeyColumn
-StringValue
-ClientID
-ColumnName
-DisplayName
-FieldName
-IntValue
-IsNull
-KeyColumn
-SenondKeyColumn
+ClientAddress
+Instrument
+Telephone
etc etc
I need to be able to display, for example, the ClientName.StringValue field. If I drag the field I want onto the report I get:
=First(Fields!StringValue.Value)
This doesn't display anything when the report is run, I assume because it can't qualify what StringValue it is talking about and there could be many.
If I try dragging the ClientName object I get:
=First(Fields!ContactName.Value)
However ths gives:
#ERROR
When the report is run.
I would have thought you could use:
=First(Fields!ClientName.StringValue.Value)
but this won't even let me build.
Any advice greatly appriciated.