Click here to Skip to main content
15,916,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi,
In my .rdlc report, I used following statement to assign value of variable.
(right clicked TextBox1, and put the statement in value expression)
=ReportItems!TextBox1.Value=MyVriable

But in TextBox1, it shows 'Error#'

Please advise how to assign the value of MyVariable

Thanks
Furqan
Posted

1 solution

Try this:
1. Put a textbox in the body(make sure it is in report body)
2. Set the visibility to false
3. Set the needed value in it, like =field!neededValue.Value
4. Put another textbox in report header
5. Set the needed value in it, like = ReportItems!bodyTextbox.Value

There should be no error and you should be able to set a dataset field value in header.
 
Share this answer
 
Comments
Furqan Sehgal 6-Feb-11 12:17pm    
Thanks but how is my variable's value assigned to the box
do I make it neededvalue=myvariable
Sandeep Mewara 6-Feb-11 12:18pm    
I tried to be as clear as possible. Not sure of where is the doubt. Let me try again:

textboxInBody = NeededValue
textboxInHeader = refer textboxInBody.Value
Furqan Sehgal 6-Feb-11 12:22pm    
This us ok, thanks a lot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900