Hello!
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?
Remark:
I am using 2021.3.2 with .net/C# 4.8.
I can't update to the latest version until summer.
Thanks
public void GetXmlReport2(string stimulsoftLicenseKeyFilePath, string reporturi, string xmluri, string xsduri, string filename, string localPath)
{
var dataSet = new DataSet();
dataSet.ReadXmlSchema(xsduri);
dataSet.ReadXml(xmluri);
Stimulsoft.Base.StiLicense.LoadFromFile(stimulsoftLicenseKeyFilePath);
StiReport report = new StiReport();
report.Load(reporturi);
report.RegData("XmlData", dataSet);
report.Render();
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);
}
Routine can be called only once
-
- Posts: 3
- Joined: Fri May 28, 2021 2:53 pm
-
- Posts: 6832
- Joined: Tue Mar 20, 2018 5:34 am
Re: Routine can be called only once
Hello,
We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.
Thank you.