SalesInvoice report

Stimulsoft Reports.NET discussion
Post Reply
luczan
Posts: 32
Joined: Wed Jan 19, 2011 3:50 am
Location: Slovakia

SalesInvoice report

Post by luczan »

Hi all,

i have two questions about demo report SalesInvoice:

what can i do if i want to save (or export to e.g. pdf, byte stream) each invoice (there are 5 invoices in demo report) separately (e.g. invoice_order11077.pdf ; invoice_order11076.pdf ...)
..and i need to get some data from rendered report - in this case order_id

Is it possible to do it programmatically in my application?

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

SalesInvoice report

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
luczan
Posts: 32
Joined: Wed Jan 19, 2011 3:50 am
Location: Slovakia

SalesInvoice report

Post by luczan »

Hello,

I have rendered your sample report SalesInvoice with data from Demo.xml in my c# application. Such rendered report contains 5 invoices. When i call report.ExportDocument(...) - rendered report is exported into one file. But I need to export every invoice from rendered report separately -> one invoice = one file.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

SalesInvoice report

Post by Alex K. »

Hello,

If every invoice is located on a separate page, you can use the following code:

Code: Select all

StiReport report = new StiReport();
report.Load("D:\\YourReport.mrt");
report.Render();

Stimulsoft.Report.Export.StiPdfExportSettings es = new Stimulsoft.Report.Export.StiPdfExportSettings();
for (int index = 0; index < report.RenderedPages.Count; index++)
{
    string pageNumber = (index + 1).ToString();
    es.PageRange = new StiPagesRange(pageNumber);
    report.ExportDocument(StiExportFormat.Pdf, "d:\\ReportName_Page" + pageNumber + ".pdf", es);
}
If your report has a slightly different structure, let us know, we will find other ways.

Thank you.
luczan
Posts: 32
Joined: Wed Jan 19, 2011 3:50 am
Location: Slovakia

SalesInvoice report

Post by luczan »

thank you very much..
and what can i do in case that some invoice has more than one page?

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

SalesInvoice report

Post by Alex K. »

Hello,

You can use Excel Sheet properties.
Please see the sample project in attachment.

Thank you.
Attachments
862.SampleProject.zip
(18.78 KiB) Downloaded 310 times
Post Reply