Problem with the variable

Stimulsoft Reports.NET discussion
Post Reply
misiek_1984
Posts: 3
Joined: Wed Feb 10, 2010 2:36 am

Problem with the variable

Post by misiek_1984 »

Hello

I have a report with the defined variable of type string. I use this variable to create the title of the report. The value of variable is set programmatically:

report.Item("Var") = value
report.Render()

However, once the report is rendered for the first time the value of the variable is ignored. I have debug the program and I am sure that the value of the variable is set properly.
Is is a bug or I am doing something wrong?

Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Problem with the variable

Post by Brendan »

To set any variables you have defined on your report at runtime you must first compile the report

Code: Select all

report.Compile()
report.Item("Var") = value
report.Render()
Post Reply