开发者

Reuse my formula in a SSRS report

i'm just starting out with ssrs, an开发者_开发知识库d i have a little calculation on two fields in my dataset in textbox A (so the content of textbox A is dataset1.field1 * dataset1.field2) Now i want to add that number to the another number, and put it in textbox B. So i thought: i reference the content of textbox A from a calculation in textbox B.

So i googled and found lots of this solution:

ReportItems!textbox1.Value

But that doesn't work?

So i thought: i stick the calculation in a variable, and reference that from textbox A and B, but i can't get that to work (don't know where to define the variable and where to give it the appropriate value)


You can declare variables with global scope or group scope.

Global scope variables are visible to the whole report (just like parameters). You can declare global scope variables by right clicking an empty area, click Report Properties, and then select Variables on the left side.

Group scope variables are visible within the group. If you select a Tablix, you will see Row Groups and Column Groups towards the bottom of the designer. Click the arrow at the end of the group and click Group Properties. You can declare variables in there.

Group scope variable is probably what you looking for.

More details here: http://blogs.msdn.com/b/robertbruckner/archive/2008/07/20/using-group-variables-in-reporting-services-2008-for-custom-aggregation.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜