After loading assembly could not set variables
After loading assembly could not set variables
I have report that when I am using it with uncompiled report in .MRT my variables that I send to report are Ok and that is exactly what I want but If I make assembly (.DLL) from same .MRT and load that assembly than when I send variables I have no effect. My variables just have default values.
Where I go wrong?
regards,
dikan
Where I go wrong?
regards,
dikan
-
- Posts: 7341
- Joined: Tue Mar 20, 2018 5:34 am
Re: After loading assembly could not set variables
Hello,
Please check the following code:
report["VariableName"] = value;
Thank you.
Please check the following code:
report["VariableName"] = value;
Thank you.
Re: After loading assembly could not set variables
I tested variable value on report and value is what I am sending from the application. So that is good but report does not render with this value it is rendered with default value. It looks that I am sending variables to late or I need one more step after loading assembly. With older version of StimulSoft (2016) there is no problem with that. This is only with newer version of StimulSoft libraries.
All files are defined to Connect on Start (default values).
Regards,
dikan
All files are defined to Connect on Start (default values).
Regards,
dikan
-
- Posts: 7341
- Joined: Tue Mar 20, 2018 5:34 am
Re: After loading assembly could not set variables
Hello,
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Re: After loading assembly could not set variables
ResetReport();
Report = StiReport.GetReportFromAssembly(fileName);
report.Dictionary.Variables[variableName].ValueObject = value;
((StiSqlDatabase)report.Dictionary.Databases[DataSet]).ConnectionString = connectionString;
Report.Render();
Report.Show(true);
these are the sequence that program executing...
Best regards,
dikan
Report = StiReport.GetReportFromAssembly(fileName);
report.Dictionary.Variables[variableName].ValueObject = value;
((StiSqlDatabase)report.Dictionary.Databases[DataSet]).ConnectionString = connectionString;
Report.Render();
Report.Show(true);
these are the sequence that program executing...
Best regards,
dikan
-
- Posts: 7341
- Joined: Tue Mar 20, 2018 5:34 am
Re: After loading assembly could not set variables
Hello,
Please check the following code:
report["VariableName"] = value;
Thank you.
Please check the following code:
report["VariableName"] = value;
Thank you.
Re: After loading assembly could not set variables
Thank you Lech,
this code does work for compiled reports but does not work for uncompiled reports, so when we detect new version of .mrt we have to use one version of assigning variable value and when we have old version of .mrt we are suppose to use this kind of assigning value to variable. It was confusing to us and never explained clearly.
Best regards,
dikan
this code does work for compiled reports but does not work for uncompiled reports, so when we detect new version of .mrt we have to use one version of assigning variable value and when we have old version of .mrt we are suppose to use this kind of assigning value to variable. It was confusing to us and never explained clearly.
Best regards,
dikan
Re: After loading assembly could not set variables
Hello,
You could check the IsCompiled property of the report and compile the report if it's necessary.
Thank you.
You could check the IsCompiled property of the report and compile the report if it's necessary.
Thank you.