Get table row count outside scope of table in SSRS 2008
I can count the rows in the dataset that the table consumes, but this doesn't return the right value as the data in the table is grouped.
I need to know the ta开发者_Go百科ble size in order to dynamically size a chart that appears along side the table.
CountRows is obviously no good as you have to be in the scope of the table, which I'm not.
Any ideas?
Add a hidden column to the tablix, and in the header cell place the expression "=CountRows()". Being in the header cell means that the count of all rows not the groups counts. You can then reference the header cell (named something like Textbox10) as an expression elsewhere in the report as "=ReportItems!Textbox10.Value". You could also add a hidden row (not grouped) to the bottom of the tablix, rather than a column, whatever works better for you. Do this by right clicking on the outermost group and selecting "Insert Row" -> "Outside Group - Below".
How about determining the number of rows you'll have this way: [# of Header Rows] + CountRows("[DataSetName]") + CountDistinct(Fields![group1groupby].Value, "[DataSetName]") + CountDistinct(Fields![group2groupby].Value, "[DataSetName]") ... etc?
- Create one tablix add one new row.
- In last row any one cell write expression like(=CountRows("Tablix1")).That cell Name(Textbox20).
- Then out side Tablix Insert one textbox(Name is Textbox50)
- Write expression inside of textbox.. like(=ReportItems!Textbox20.value)
- That simple its working fine.
精彩评论