using variable for reportitems!textbox...
I tried to set a variable to be a calculation based on Report Items - 2 textbox values and it won't let me do that. (I am not talking about Fields from the dataset, but fields from the report.
is there a way around this so I can use variables? At this time I can't add it to the Dataset (stored procedure in it's current format. If I can't get around this, I may have to rewrite the stored proc to get me those values. (major task)
thx
October 6th, 2011 2:59pm
I tried to set a variable to be a calculation based on Report Items - 2 textbox values and it won't let me do that. (I am not talking about Fields from the dataset, but fields from the report.
is there a way around this so I can use variables? At this time I can't add it to the Dataset (stored procedure in it's current format. If I can't get around this, I may have to rewrite the stored proc to get me those values. (major task)
thx
what do you mean it won't let me do? What is your exact calculation?
Free Windows Admin Tool Kit Click here and download it now
October 6th, 2011 4:06pm
Hi bsh17,
In Reporting Services, we can create a report variable or a group variable. We can use a report variable to hold a value for time-dependent calculations, such as currency rates or time stamps, or for a complex calculation that is evaluated once. We can use
a group variable to calculate a value in the scope of a group. For more information, please see:
http://msdn.microsoft.com/en-us/library/bb934256(v=sql.100).aspx
If this does not meet your requirement, please elaborate the requirement with more details. They are benefit for other community members help you to solve this issue.
Thanks,
Bin Long
TechNet
Subscriber Supportin
forum
If you have any feedback on our support, please contact
tnmff@microsoft.comPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
October 6th, 2011 10:42pm
To PeaceOut:
My variable is called: runningtotals - This variable is calling coded that takes the value and increments it..
=Code.AddTotal(Format(((ReportItems!textbox2.Value/ReportItems!textbox4.Value) - 1) * ReportItems!textbox14.Value,
"0.00"))
I placed the expression in my group /detail area and also tried by sub total area:
=Variables!runningtotals.Value
and got this error below:
Error 1 [rsReportItemInVariableExpression] The Variable(runningtotals) value expression used for the language of 'body' refers to a report item. Variable values cannot be used in report language expressions. C:\Projects\Web Applications\ASP.NET
Applications\pricemonitorpts\Renewal Bound Policies.rdl 0 0
Error 3 [rsReportItemReference] The Variable(runningtotals) expression for the report ‘body’ refers to the report item ‘textbox20’. Report item expressions can only refer to other report items within the same grouping
scope or a containing grouping scope. Letters in the names of report items must use the correct case. C:\Projects\Web Applications\ASP.NET Applications\pricemonitorpts\Renewal Bound Policies.rdl 0 0
Does that help? Let me know if you need more info
Free Windows Admin Tool Kit Click here and download it now
October 7th, 2011 8:43am