Hi, While going through the examples and sample and the forums, I could not come across any example that describes PDF export of Chart & Grid together from a FORM.
I can individually export the Chart & Grids but looks like there is something else I am missing when I club both of them together.
Thx
You have to create a report object first and then export to specific sections of that report.
Report r = new Report();
ISection gridsection = r.AddSection();
this.UltraWebGridDocumentExporter1.Export(this.UltraWebGrid1, gridsection);
this.UltraChart1.RenderPdfFriendlyGraphics(r.AddSection().AddCanvas().CreateGraphics());
Hi,
Can you provide an extended example for the above.
I am using the said example above, but I cant find a method to add the grid and Chart into a single report.
you could do something like this:
Report r = new Report();ISection sec = r.AddSection();this.UltraWebGridDocumentExporter1.Export(this.UltraWebGrid1, sec);this.UltraChart1.RenderPdfFriendlyGraphics(sec.AddCanvas().CreateGraphics());
Thanks Sung Kim.
this.UltraWebGridDocumentExporter1.Export(this.UltraWebGrid1, sec);
How can we export the UltraWebGrid to a Band within a Section though? Without this ability, the Grid is either always at the beginning or at the end of a page only, NOT the middle.
The example I have is:
I have like 3 bands per section / page. I want to have the Chart in Band 1, Grid in Band 2, and some more text in Band 3
One thing about Grid is, it seems it does not Export ALL the columns. We have the righ-most column have values calculated based on values from the previous 2 columns, e.g. Variance of Plan & Actual values. The right-most column does not show up in the export Grid in PDF.
Also, how can I change the color of IText in the Document.section.band? I only see .Font.Size, or .Font.Bold, but NOT .Font.Color
Thanks.
Unfortunately, the only override you have is working with a section. You can do something like the Porfolio Manager Sample (referenced in my blog post), where you take the data and format it yourself. This way you can control what is on the page using layout containers.
As far as all the columns are concerned, I believe the grid trys to fit everything onto one page. Are you using margins?
For you last question, you can pass in a Infragistics.Documents.Report.Text.Style to AddContent override of an IText element. You can see an example of this in the last section of my blog post.
http://blogs.infragistics.com/blogs/sung_kim/archive/2009/02/18/publishing-dynamic-files-pdf-xps-creation-using-the-infragistics-document-library.aspx
Thanks for the post it also help me. I am facing only one problem. I am just exporting my chart to PDF using following lines of code
this.ultraChart1.RenderPdfFriendlyGraphics(r.AddSection().AddCanvas().CreateGraphics());
r.Publish("F:\\Test.pdf", FileFormat.PDF);
Now when i open the pdf, it show me two pages, with chart on the second one. The first one is complete blank page. Is there any way to bring chart on the first page. Also if i add some text section, header & footer the chart should remain on the same page.
I found the solution in another thread. Here is the link below:
http://es.infragistics.com/community/forums/p/73377/371388.aspx#371388