How can I have a reporting service?

Stimulsoft Reports.NET discussion
Post Reply
rmeshksar
Posts: 12
Joined: Thu Oct 18, 2007 4:39 pm
Location: Toronto

How can I have a reporting service?

Post by rmeshksar »

I need some functionality like Microsoft SQL Server Reporting Service.
I would like to have some reports on the server that can be called and shown on the clients no matter it is in windows app or web app.
It helps me specially for windows applications that if I want to make some changes in the reports I do not need to recompile and reinstall the application on all clients.,

What is the best way to approach to this goal?

I thought may be there is a way to use StiReportViewer and get the report stream from the server, or having a service on the server to convert the report to PDF and stream it to the client and one PDF viewer component on the client can show that.

Another way that I thought about is to put mrt files on a share folder on the server and load it on the client or even may be I can save mrt file in the database and load it on the client.

I am not sure which way is the best and even may be there are some built in capabilities that I am not aware of.
Thanks.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How can I have a reporting service?

Post by Edward »

If the goal was understood in the correct way, then the solution might be achieved in the following 2 ways:

1. Web Service generates reports and saves them to mdc or mdz format (mdz - it is a mdc file after zip archiver).

Code: Select all

report.Render(false);
report.SaveDocument("myRenderedReport.mdc");
or
report.Render(false);
report.SavePackedDocument("myRenderedPackedReport.mdz");
Then these rendered files can be sent to the client and opened there with StiPreviewControl or StiWebViewer as well.

Code: Select all

report.LoadDocument("myRenderedReport.mdc");
or
report.LoadPackedDocument("myRenderedPackedReport.mdz");
2. Rendered report can be exported to pdf and sent to the client for viewing it there.

Code: Select all

report.Render(false);
report.ExportDocument(StiExportFormat.Pdf, "D:\\MyReport.pdf");
Also direct output to browser in aspx page is possible:

Code: Select all

StiReportResponse.ResponseAsPdf(this, report);
Representing report in Pdf format is the best way to view report in Web-based applications, because of the limitations from the side of HTML. Very difficult sometimes to get exact layout of the report on the paper from HTML. Pdf format is free from this. Exported to Pdf report is the same as in WinForms based applications and in the Web applications as well.

Thank you.
rmeshksar
Posts: 12
Joined: Thu Oct 18, 2007 4:39 pm
Location: Toronto

How can I have a reporting service?

Post by rmeshksar »

Thanks for the reply.
I think the first solution works for me. There is question here:
Is it possible instead of saving mdc file, return the xml content of that in a webservice method (WebMethod)
and on client load this xml string again instead of file?
Thanks.
rmeshksar
Posts: 12
Joined: Thu Oct 18, 2007 4:39 pm
Location: Toronto

How can I have a reporting service?

Post by rmeshksar »

I found the solution by using the SaveDocumentToString method.
Thanks anyway.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How can I have a reporting service?

Post by Edward »

Yes, it is the way for saving rendered report to string.

Let us know if any help is required.

Thank you.
Post Reply