Hello all,
I have a report that contains a chart. In the chart plot area, I set the background image using relative path (~/Image/myimage.png). Everything works as expected using ReportViewer on asp.net page. The problem I have is when I export the report to pdf format programmatically, the chart background is not set.
Here is how I export it.
And background image is set like this
Please advice.
Cheers!
I have a report that contains a chart. In the chart plot area, I set the background image using relative path (~/Image/myimage.png). Everything works as expected using ReportViewer on asp.net page. The problem I have is when I export the report to pdf format programmatically, the chart background is not set.
Here is how I export it.
public Stream GetReportBytes(Guid studyId, string userName) { ReportProcessor reportProcessor = new ReportProcessor(); Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource(); ProjectReport reportToExport = new ProjectReport(); reportToExport.ReportParameters[0].Value = studyId.ToString(); reportToExport.ReportParameters[1].Value = userName; instanceReportSource.ReportDocument = reportToExport; RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null); return new MemoryStream(result.DocumentBytes); }And background image is set like this
MainChart.PlotArea.Appearance.FillStyle.FillSettings.BackgroundImage = "~/Images/ci_bg.png";Please advice.
Cheers!