Page 1 of 1

Embed report preview to form

Posted: Tue Oct 09, 2007 2:52 am
by ChristianH
Is it possible to embed a report (preview) into a windows form instead of StiPreviewForms ?

I´ve found an short description describing this topic: embed report
I hava a precompiled assembly (dll-file) of the report but I´m not really familar with streams.
What kind of file is the "Assembly.Report.mrt" in this article ?

Embed report preview to form

Posted: Wed Oct 10, 2007 10:32 am
by Edward
Yes, the easier way exists. You can use StiPreviewControl inside the Windows Forms. This control is embedded in the Stimulsoft.Report.dll library. If you want to place this control in the Design time on the form, you should place all Stimulsoft Reports.Net dlls in GAC.

In the topic you wrote about "Assembly.Report.mrt" is the name of the report template file which was embedded in the assembly. This mrt file is not included by default when you save a report as a dll file. You should embed "Assembly.Report.mrt" report template manually to that assembly.

Also you can get the report class from the report dll also via report.GetReportFromAssembly(mydllFile) method. It is enough for previewing a report.

Thank you.


Embed report preview to form

Posted: Thu Oct 11, 2007 1:19 am
by ChristianH
Thanks for your answer, but more questions have raised:
- how do I exactly place the control in design time on the form ?
- how can I embed the report template manually to an assembly ?

Embed report preview to form

Posted: Fri Oct 12, 2007 3:39 am
by ChristianH
Now I´ve solved the problem.
Embedded StiPreviewControl on form, created stream and bound report to stream - that´s all !
Thanks.

Embed report preview to form

Posted: Fri Oct 12, 2007 4:00 am
by Guest
Ok, we are glad that you done it yourself, if you have any questions write to us.

Thank you.