Embed report preview to form

Stimulsoft Reports.NET discussion
Post Reply
ChristianH
Posts: 43
Joined: Fri May 25, 2007 2:54 am
Location: Austria

Embed report preview to form

Post 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 ?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Embed report preview to form

Post 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.

ChristianH
Posts: 43
Joined: Fri May 25, 2007 2:54 am
Location: Austria

Embed report preview to form

Post 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 ?
ChristianH
Posts: 43
Joined: Fri May 25, 2007 2:54 am
Location: Austria

Embed report preview to form

Post by ChristianH »

Now I´ve solved the problem.
Embedded StiPreviewControl on form, created stream and bound report to stream - that´s all !
Thanks.
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Embed report preview to form

Post by Guest »

Ok, we are glad that you done it yourself, if you have any questions write to us.

Thank you.
Post Reply