Routine can be called only once

Stimulsoft Reports.NET discussion
Post Reply
Posts: 3
Joined: Fri May 28, 2021 2:53 pm

Routine can be called only once

Post by »


I have the following sample code ... see below

If I call the code the first time, a PDF is generated.
If I call it a second time with the identical parameters, only a PDF without data is generated, as if I would not pass the data in the dataset correctly.

The strange thing is, on the server everything works correctly (IIS).
In VisualStudio I have to stop and restart the debugging, then it works again for a single time.

My question: does anyone know this behavior? Does anyone know advice?

I am using 2021.3.2 with .net/C# 4.8.
I can't update to the latest version until summer.


public void GetXmlReport2(string stimulsoftLicenseKeyFilePath, string reporturi, string xmluri, string xsduri, string filename, string localPath)
var dataSet = new DataSet();



StiReport report = new StiReport();


report.RegData("XmlData", dataSet);


report.ReportName = filename;

var settings = new StiPdfExportSettings();
settings.Compressed = true;
settings.ImageQuality = 90;
settings.ImageResolution = 300;
settings.ImageResolutionMode = StiImageResolutionMode.Exactly;
settings.EmbeddedFonts = true;
settings.ImageCompressionMethod = StiPdfImageCompressionMethod.Jpeg;
settings.AllowEditable = StiPdfAllowEditable.No;

report.ExportDocument(StiExportFormat.Pdf, localPath, settings);
Lech Kulikowski
Posts: 6471
Joined: Tue Mar 20, 2018 5:34 am

Re: Routine can be called only once

Post by Lech Kulikowski »


We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.

Thank you.
Post Reply