headless report generation
headless report generation
Hi,
I've been asked to look into some kind of automated reporting with this product.
What I'd like to be able to do is procedurally generate a document, and save it as a pdf. I'm pretty sure this cannot be done client side, but is it possible on server side ?
I've been asked to look into some kind of automated reporting with this product.
What I'd like to be able to do is procedurally generate a document, and save it as a pdf. I'm pretty sure this cannot be done client side, but is it possible on server side ?
headless report generation
Hello,
You can use the following code to generate a PDF file on the server side:
Thank you.
You can use the following code to generate a PDF file on the server side:
Code: Select all
StiPdfExportSettings settings = new StiPdfExportSettings();
settings.PageRange = pageRange;
settings.ImageQuality = imageQuality;
.....
MemoryStream stream = new MemoryStream();
StiPdfExportService export = new StiPdfExportService();
export.ExportPdf(report, stream, settings);
headless report generation
excellent, thanks.
headless report generation
Hello,
As usually, we are happy to help you.
Thank you.
As usually, we are happy to help you.
Thank you.
headless report generation
I am planning on implementing this idea as an internal webservice. The plan will be that the 'service' will take a parameter (say, an ID), and using it, populate a dataset. From there, I will Export the PDF, and return to the caller a success/fail code, or perhaps a file path, etc...
Can you suggest a 'best' design for this. I'm looking over the WebDemo files from 'Ultimate', and they appear to be page based. As I'm hoping to reduce this to a simple service, I would like to be able to do without a viewer object (StiWebViewer), but I'm not sure it can be done that way.
Is it possible to make this completely headless
Please advise. Thanks!
Can you suggest a 'best' design for this. I'm looking over the WebDemo files from 'Ultimate', and they appear to be page based. As I'm hoping to reduce this to a simple service, I would like to be able to do without a viewer object (StiWebViewer), but I'm not sure it can be done that way.
Is it possible to make this completely headless
Please advise. Thanks!
headless report generation
Hello,
WebViewer is not required to generate and export reports on the server side. You can use the following code to load and generate report:
Thank you.
WebViewer is not required to generate and export reports on the server side. You can use the following code to load and generate report:
Code: Select all
// Load report template
StiRpeort report = new StiReport();
report.Load(...);
// Set some report parameters
report["Param1"] = value;
// Render report
report.Render(false);
// Export report
StiPdfExportSettings settings = new StiPdfExportSettings();
settings.PageRange = pageRange;
settings.ImageQuality = imageQuality;
.....
MemoryStream stream = new MemoryStream();
StiPdfExportService export = new StiPdfExportService();
export.ExportPdf(report, stream, settings);