My goal is to save the report as svg file so that I can use this as a thumbnail view in another part of application. I have a choice of using jpg but i want to use svg. Everytime I export to svg file, there is 0 bytes in there and it does not open at all.
Here is my code so far.
report.ExportDocument(StiExportFormat.ImageSvg,filename + ".svg");
How can I correctly export just first page to svg file from code behind? Please help.
Export as Svg file (first page only)
Re: Export as Svg file (first page only)
This is done right after .mrt file is created. So not sure if that information matters.
Full code:
protected void StiWebDesigner1_SaveReport(object sender, StiWebDesigner.StiSaveReportEventArgs e)
{
StiReport report = e.Report;
string filename = Server.MapPath("/reports/repository/" + id);
report.Save(filename + ".mrt");
report.ExportDocument(StiExportFormat.ImageSvg,filename + ".svg");
}
Full code:
protected void StiWebDesigner1_SaveReport(object sender, StiWebDesigner.StiSaveReportEventArgs e)
{
StiReport report = e.Report;
string filename = Server.MapPath("/reports/repository/" + id);
report.Save(filename + ".mrt");
report.ExportDocument(StiExportFormat.ImageSvg,filename + ".svg");
}
Re: Export as Svg file (first page only)
Hello,
Please try to use the following code:
Thank you.
Please try to use the following code:
Code: Select all
...
report.Load();
report.Render();
report.ExportDocument(...);
Re: Export as Svg file (first page only)
Thanks Aleksey. Worked like a charm. Cheers!!!
Re: Export as Svg file (first page only)
Hello,
We are always glad to help you!
Thank you.
We are always glad to help you!
Thank you.