Page 1 of 1

How to compile a report variable from code?

Posted: Tue Feb 21, 2012 6:27 am
by Girasole
Hi all!
I would like to pass a value from my code to a variable in my report. I use the following code but it seems not work:

Code: Select all

DirectCast(report.Dictionary.Variables("Totale"), StiVariable).Value = CDbl(lblImporto.Text)
How can I do?
Thank you very much!

How to compile a report variable from code?

Posted: Tue Feb 21, 2012 7:56 am
by Girasole
I resolve my problem simply with:

Code: Select all

report.Totale = CDbl(lblImporto.Text)
I hope I can help someone...
Bye

How to compile a report variable from code?

Posted: Wed Feb 22, 2012 4:46 am
by HighAley
Hello.

This code you should use before compilation:

Code: Select all

DirectCast(report.Dictionary.Variables("Totale"), StiVariable).Value = CDbl(lblImporto.Text)
And this one after:

Code: Select all

report.Totale = CDbl(lblImporto.Text)
Thank you.