Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with Arrays and Aggregation In a RDLC Report

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.

like image 336
trvll Avatar asked Nov 12 '22 19:11

trvll


1 Answers

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.

like image 174
Florian Avatar answered Nov 15 '22 09:11

Florian