I'm trying to create a report using RDLC from VS2012.
I've created a dataset from my object which contains all the data to be displayed in report. However this object has some attributes which are arrays and others which are custom objects (aggregation).
public class myObject2Report {
private Double [] myResults;
private FakeDataObject fake;
//...
}
The problem is I can't add the array indexes individually to a table in report, neither add a sub-field from my FakeDataObject. I tryed in a report design view, but without success and now a I'm looking for some information to create a expression to do it like:
=Fields!myResults[0].Value
=Fields!myResults[1].Value
//...
OR
=Fields!FakeDataObject.subField1.Value
=Fields!FakeDataObject.subField2.Value
//...
Any help in this subject would be well appreciated.
You can access an array with the following syntax (note: VS shows a redline in the editor, but it still works):
=Fields!myResults.Value(0)
=Fields!myResults.Value(1)
Nested object seem unsupported, see these questions here and here(indicates that it should work in VS2010 SP1, it does not work for me in VS2013). The solution is to flat the objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With