Wednesday, March 7, 2012

Report item expressions can only refer to other report items within the same grouping scope or a

I still don't get this. I want to reference another textbox. I've tried these expressions below and get the same error. For instance, I'm referencing this from textbox6. I've put the data in a group, doesn't work. How do I reference different reportitems? Thanks

=ReportItems!textbox15

=ReportItems!ThresholdIncome.value

=ReportItems!ThresholdIncome.value,"table1_Group1"

You should be able to reference textboxes in the same or a containing scope. This first expression would return you the textbox object. The second one should work if ThresholdIncome exists in the same or a containing scope. You can't explicitly specify the scope of a report item. Therefore the 3rd one wouldn't work. What error did you get with these expressions?|||

Fang - Thanks for your help. Error I'm getting is what is in the subject -

Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope.

So does that mean I need to add a group and the textboxes can only know about each other in that group, but not any other textboxes on the report? That is what I don't understand. If it's all the same xml, why don't the controls know about each other?

|||You can refer to textboxes in that group, and the ones in the containing scope of that group (i.e. outer groups all the way up to the report level). But you can't refer to textboxes in an inner group. The reason is that when the report is rendered (combining layout information with data), there will be multiple instances of the inner groups. For example, if the outer grouping is by country and the inner grouping is by state, you'll get multiple states for USA. We wouldn't know from which inner group instance you want to get the textbox value.

No comments:

Post a Comment