So in Crystal when we want a variable we use one in a formula, whack that into say, a report header as "shared foo whatever" and so on.
Then we assign values, usually in a details section like foo := 8;
We do a lot of reports where the actual data being printed is done so in the group footers so lists is compiled on the fly in the report itself.
What is the equivalent here?
What is the equivalent to Crystal shared variables?
Re: What is the equivalent to Crystal shared variables?
Hello.
There are variables of the report that you could use.
You could set a value of the variable with next code:
Thank you.
There are variables of the report that you could use.
You could set a value of the variable with next code:
Code: Select all
report.Dictionary.Variables["Variable1"].Value = yourCancatenatedString;
Re: What is the equivalent to Crystal shared variables?
I know i can set it from the code end of things but I need to do this inside of the report itself.
Doing it in code would work but I would need to hit the database twice, once just to get these values and again to actually run the report.
That's a nasty hack at best.
Certainly there is a way to save these values as it's printing them in the detail section as you can with Crystal?
Doing it in code would work but I would need to hit the database twice, once just to get these values and again to actually run the report.
That's a nasty hack at best.
Certainly there is a way to save these values as it's printing them in the detail section as you can with Crystal?
-
- Posts: 6329
- Joined: Tue Mar 20, 2018 5:34 am
Re: What is the equivalent to Crystal shared variables?
Hello,
Also, you can set value for the variable in the Text expression:
{Variable1 = DataSourceName.ColumnName}
or in reports events.
Thank you.
Also, you can set value for the variable in the Text expression:
{Variable1 = DataSourceName.ColumnName}
or in reports events.
Thank you.
Re: What is the equivalent to Crystal shared variables?
Ok, shame on me for not noticing that each of these bands had events that I could wire into.
My solution was to clear the variable in the group header's begin render and then add my values to it in the rendering event of the data band.
My solution was to clear the variable in the group header's begin render and then add my values to it in the rendering event of the data band.
-
- Posts: 6329
- Joined: Tue Mar 20, 2018 5:34 am
Re: What is the equivalent to Crystal shared variables?
Hello
Ok.
Please let us know if you need any additional help.
Thank you.
Ok.
Please let us know if you need any additional help.
Thank you.