Exception when rendering report with business objects
Posted: Fri Nov 20, 2015 10:20 am
I am having trouble rendering a stimulsoft report with my custom business object. I get a somehow strange exception:
“d:\temp\SYSTEM\mx1wctlk.0.cs(308,49) : error CS1519: Ungültiges Token ']' in Klasse, Struktur oder Schnittstellenmemberdeklaration.d:\temp\SYSTEM\mx1wctlk.0.cs(309,21) : error CS1519: Ungültiges Token '{' in Klasse, Struktur oder Schnittstellenmemberdeklaration.d:\temp\SYSTEM\mx1wctlk.0.cs(311,25) : error CS1519: Ungültiges Token '{' in Klasse, Struktur oder Schnittstellenmemberdeklaration.”
Designing the report with the same model works fine:
Only when I try to render the report I get the exception. Here the code used to render the report:
Any idea what can be wrong? Can the model be the cause of this Exception? I need some help, I don’t know how to solve this problem.
“d:\temp\SYSTEM\mx1wctlk.0.cs(308,49) : error CS1519: Ungültiges Token ']' in Klasse, Struktur oder Schnittstellenmemberdeklaration.d:\temp\SYSTEM\mx1wctlk.0.cs(309,21) : error CS1519: Ungültiges Token '{' in Klasse, Struktur oder Schnittstellenmemberdeklaration.d:\temp\SYSTEM\mx1wctlk.0.cs(311,25) : error CS1519: Ungültiges Token '{' in Klasse, Struktur oder Schnittstellenmemberdeklaration.”
Designing the report with the same model works fine:
Code: Select all
pModel = pService.GetReportModel();
myReport.RegBusinessObject("Model", pModel);
myReport.Dictionary.SynchronizeBusinessObjects(3);
myReport.DesignWithWpf();
Code: Select all
StiReport report = new StiReport();
report.Load(templatePath);
report.RegBusinessObject("Model", reportModel);
report.Dictionary.SynchronizeBusinessObjects(3);
report.Render(false); // here is where the Exception ocurres!!!
var outputStream = new MemoryStream();
report.ExportDocument(stiExportFormat, outputStream);
outputStream.Position = 0;
return outputStream;