Can anyone tell me how to export a control in a TemplateDataField to PDF using the Document.Reports.Report.Export function?
I was able to create Charts and convert the Grid to an IGrid Type, but I am unable to recreate the webslider control in my TemplateDataField in this IGrid Type.
I attempted using WebDocumentExporter to export the WebDataGrid into a section of the report, but it only returned the following in that particular cell;
<div class="ig_LucidDreamControl igsli_LucidDreamControl :=CtlMain:slider" id="WebDataGridPerformance_it4_0_WebSlider1" style="height:18px;width:100%;">..................
Hi evalex,
When exporting a template, we attempt render the text. We also try to find an image and render that. Any other more complex templates must be handled by custom code. You would need to generate the look of the slider with the supported exporting types. You could handle cell exporting event, cancel it, and then set the value of the cell.
regards,
David Young
From my understanding of your reply, you mean convert the control to an image and replace the control before printing it to PDF?
Here's the list of my attempts of converting a Dashboard to PDF
Hello evalex,What you are trying to do is not supported. As David pointed we try to export text or an image. Since the splitter is neither of them you will have to manually handle cell exporting. My suggestion is to take a look at this tutorial http://www.codeproject.com/Articles/10763/Image-Capture-Whole-Web-Page-using-C and try to modify it to capture only the required cell. Please also take a look at our support policy that support team are not writing custom code and you can contact our consulting team - http://es.infragistics.com/support/policies.aspx#SupportPolicies
Hello Stefan,Please let me know if you need any further assistance with this issue.
No further assistance required.
I ended up creating a serpate page that generates the chart as an image which is then displayed on the web page. This seems to have solved the problem.
<td class="style4" id="colUltraChart5" runat="server"> <!--1--> <img src="~/Dashboard/GenerateChart.aspx?Chart=Position" alt="Position" id="Position" runat="server" /> </td>
Private Sub GenerateBarChart(ByVal Data As DataTable, ByVal ChartTitle As String) Dim UltraChart As New BarChart 'Infragistics.WebUI.UltraWebChart.UltraChart With UltraChart .Height = 380 .Width = 400 .TitleTop.Text = ChartTitle .DataSource = Data .DataBind() .SaveTo(MemoryS, Drawing.Imaging.ImageFormat.Png) End With Response.ClearHeaders() Response.ClearContent() Response.ContentType = "image/png" Response.BinaryWrite(MemoryS.GetBuffer()) Response.End() End Sub
Thank you
ie; I didn't bother with exporting a template data field.
The HTML to PDF works fine for the grids, and the charts are now generated seperately, so I am able to export the entire page to PDF