Check if a report variable is used in the report
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Check if a report variable is used in the report
Good morning.
I need to programmatically check (eg. From Visual Basic or C#) if a report variable present in the dictionary is effectively used (designed)in the report.
Is there a way to do this?
Thank you.
I need to programmatically check (eg. From Visual Basic or C#) if a report variable present in the dictionary is effectively used (designed)in the report.
Is there a way to do this?
Thank you.
Re: Check if a report variable is used in the report
Hello.
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?Fabio Pagano wrote:I need to programmatically check (eg. From Visual Basic or C#) if a report variable present in the dictionary is effectively used (designed)in the report.
Is there a way to do this?
Thank you.
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Re: Check if a report variable is used in the report
In the dictionary of our reports we have report variables, that the user may or may not use in the report.
I need to programmatically know if a report variable is used in the report: in this case, when i pass data to the report, I will not assign values to these report variables because some of them are images and may be very large, so my intention is to pass the values to the report variables only if needed, that is only if they are effectively designed in the report.
Thank you.
I need to programmatically know if a report variable is used in the report: in this case, when i pass data to the report, I will not assign values to these report variables because some of them are images and may be very large, so my intention is to pass the values to the report variables only if needed, that is only if they are effectively designed in the report.
Thank you.
Re: Check if a report variable is used in the report
Hello.
Thank you.
Unfortunately, there is no build-in methods. But you could run throw all components of the report and check if there any variable is used.Fabio Pagano wrote:In the dictionary of our reports we have report variables, that the user may or may not use in the report.
I need to programmatically know if a report variable is used in the report: in this case, when i pass data to the report, I will not assign values to these report variables because some of them are images and may be very large, so my intention is to pass the values to the report variables only if needed, that is only if they are effectively designed in the report.
Thank you.
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Re: Check if a report variable is used in the report
Good morning.
Thank you.
Do you kindly have a sample code?But you could run throw all components of the report and check if there any variable is used.
Thank you.
Re: Check if a report variable is used in the report
Hello.
Next code sample will help you:
Thank you.
Next code sample will help you:
Code: Select all
foreach (StiComponent comp in rep.GetComponents())
{
IStiFont fnt = comp as IStiFont;
if (fnt != null)
{
fnt.Font = StiFontUtils.ChangeFontName(fnt.Font, "Courier New");
}
}