Converting a report

Stimulsoft Reports.NET discussion
amritpal
Posts: 9
Joined: Wed Sep 29, 2010 2:05 am
Location: India

Converting a report

Post by amritpal »

Hi,

I have a stiwebreport. I want to save that on computer as pdf(currently its showing through stiwebviewer). And also please can anybody tell how to convert stiwebreport into simple stireport.

Thanks,
Amritpal
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Converting a report

Post by Alex K. »

Hello,
amritpal wrote:I have a stiwebreport. I want to save that on computer as pdf(currently its showing through stiwebviewer).
You can use StiReportResponse.ResponseAsPdf(Page, report, true);
amritpal wrote:And also please can anybody tell how to convert stiwebreport into simple stireport.
StiWebReport webReport;
StiReport report = webReport.GetReport();

Thank you.
amritpal
Posts: 9
Joined: Wed Sep 29, 2010 2:05 am
Location: India

Converting a report

Post by amritpal »

Thanks Aleksey.

But that is opening a popup window to customer. But I want to save that without telling to customer and after that want to mail to him the report.

Please tell me the solution for this.

Thanks in advance,
Amritpal
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Converting a report

Post by Alex K. »

Hello,

You can use the following method:

Code: Select all

MemoryStream stream = new MemoryStream();

StiPdfExportSettings settings = new StiPdfExportSettings();
StiPdfExportService export = new StiPdfExportService();
export.ExportPdf(report, stream, settings);
Then this Memory Stream can be sent by e-mail.

Thank you.
amritpal
Posts: 9
Joined: Wed Sep 29, 2010 2:05 am
Location: India

Converting a report

Post by amritpal »

Hi,

I already did that, but it gives the following error:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Converting a report

Post by Alex K. »

Hello,

We need some time for check this issue.

Thank you.
amritpal
Posts: 9
Joined: Wed Sep 29, 2010 2:05 am
Location: India

Converting a report

Post by amritpal »

Hi,

Ok. But please do answer to this query.

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Converting a report

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please send us your .MRT file with database for analysis on support@stimulsoft.com. Or can you please send us a simple test application, which reproduce the issue?

Thank you.
amritpal
Posts: 9
Joined: Wed Sep 29, 2010 2:05 am
Location: India

Converting a report

Post by amritpal »

HI Team,

Thanks for your contribution. I solved the issue myself.

Thanks.
Amritpal
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Converting a report

Post by Andrew »

Hello,

Ok! Let us know if you have some additional questions.

Thank you.
Post Reply