How to compile a report variable from code?

Stimulsoft Reports.NET discussion
Post Reply
Girasole
Posts: 16
Joined: Thu Nov 10, 2011 10:33 am

How to compile a report variable from code?

Post 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!
Girasole
Posts: 16
Joined: Thu Nov 10, 2011 10:33 am

How to compile a report variable from code?

Post by Girasole »

I resolve my problem simply with:

Code: Select all

report.Totale = CDbl(lblImporto.Text)
I hope I can help someone...
Bye
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

How to compile a report variable from code?

Post 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.
Post Reply