Hi:
1) When I load a report directly from an assembly with GetReportFromAssembly, the IsCompiled property is False, does this mean that I have to call Compile()?
2) If I don't need to call Compile() after loading a report from an assembly, how can I test to see if the report was actually loaded from an assembly or via Load()?
3) If I use Stimulsoft.Report.StiReport.GetReportFromAssembly(reportFile, true), what exactly is the final boolean indicating? Is the file locked for other users (concurrent access)?
4) If I want to use a report loaded via GetReportFromAssembly multiple times (with different content), should I call ResetRenderedState() before shoing/exporting the report?
Thanks,
Martin.
GetReportFromAssembly questions
-
- Posts: 66
- Joined: Wed Apr 04, 2007 3:32 am
- Location: Spain
GetReportFromAssembly questions
Hi, Martin,
In that case report will be loaded using the following method:
Assembly assembly = Assembly.LoadFrom(assemblyFile);
otherwise using this one:
FileStream assemblyStream = new FileStream(assemblyFile, FileMode.Open, FileAccess.Read, FileShare.Read);
Thank you.
No, that is not necessary as the report will be already complied.MartinH wrote:1) When I load a report directly from an assembly with GetReportFromAssembly, the IsCompiled property is False, does this mean that I have to call Compile()?
please check NeedsCompiling property of the report and IsCompiled property too.2) If I don't need to call Compile() after loading a report from an assembly, how can I test to see if the report was actually loaded from an assembly or via Load()?
That means that report will be loaded in memory only once and it will be locked from other users too.3) If I use Stimulsoft.Report.StiReport.GetReportFromAssembly(reportFile, true), what exactly is the final boolean indicating? Is the file locked for other users (concurrent access)?
In that case report will be loaded using the following method:
Assembly assembly = Assembly.LoadFrom(assemblyFile);
otherwise using this one:
FileStream assemblyStream = new FileStream(assemblyFile, FileMode.Open, FileAccess.Read, FileShare.Read);
Yes, you need to call ResetRenderedState() method each time before the report will be rendered.4) If I want to use a report loaded via GetReportFromAssembly multiple times (with different content), should I call ResetRenderedState() before shoing/exporting the report?
Thank you.
-
- Posts: 66
- Joined: Wed Apr 04, 2007 3:32 am
- Location: Spain
GetReportFromAssembly questions
Edward:
Thanks very much for the information, very useful.
Just one clarification, after loading a report with the GetReportFromAssembly method, the property IsCompiled = false. I haven't checked yet, but is the NeedsCompiling = false? This way I know that I don't need to call Compile().
Regards,
Martin.
Thanks very much for the information, very useful.
Just one clarification, after loading a report with the GetReportFromAssembly method, the property IsCompiled = false. I haven't checked yet, but is the NeedsCompiling = false? This way I know that I don't need to call Compile().
Regards,
Martin.
GetReportFromAssembly questions
Hello Martin,
Yes you can check NeedsCompiling property.
Thank you.
Yes you can check NeedsCompiling property.
Thank you.