.I am exporting the ultragrid and ultrahchart to pdf.
I want all the numeric column's row to to formatted in particular format.Attached is the code which i am using to export the ultragrid and ultrachart to pdf.
format should be ("#,##0.00;(#,##0.00)")
Thanks in advance
Hello MauryaIsha,
Thanks for attached code, but I`m not sure what exactly is your final goals. Could you please tell us (show us a screenshot) how should be display the numeric data. You could use Format # ##0.00 and then the result will be:
Please send us more details and if you have any questions, feel free to write us.
Regards
hello,
I want the numeric columns to be right aligned,
string and date columns to be left aligned ,
negative amount to be shown in red color within a bracket
and comma(,) separated if the amount is grater than thousand ,
as shown in the attached file
Hello
MauryaIsha said: I want the numeric columns to be right aligned, string and date columns to be left aligned ,
You could achieve desired look and feel, if you are using property:
e.Layout.Bands["Band Index"].Columns["Column Index / Key"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;
MauryaIsha said:negative amount to be shown in red color within a bracket
Let me know if you have any questions.
Hi,
Have you been able to resolve your issue ? Did you have a time to try my suggestion.
MauryaIsha said:After using your code i get the output as shown in the attachment.the last column's last data appears to be left aligned..
Looking at the screenshot, I suppose that this cell is in Edit mode and I think that all cells have such kind behavior when they are in edit mode. Please confirm my guesses. Also are you using any specific column`s style or editor components for that column ?
MauryaIsha said:Can you please send me one sample of exporting my ultrachart n ultragrid one below the other in pdf format.
Maybe will be better to create another forum thread for that questions, but nevertheless here is a sample code to export your chart in PDF format using our DocumentReport
Report report = new Report(); ISection section = report.AddSection(); section.PageOrientation = PageOrientation.Landscape; ICanvas canvas = section.AddCanvas(); canvas.Width = new FixedWidth(1200); canvas.Height = new FixedHeight(1200); Graphics gr = canvas.CreateGraphics(); ultraChart1.RenderPdfFriendlyGraphics(gr); report.Publish("..\\..\\Test.pdf", FileFormat.PDF); Process.Start("..\\..\\Test.pdf");
Report report = new Report();
ISection section = report.AddSection();
section.PageOrientation = PageOrientation.Landscape;
ICanvas canvas = section.AddCanvas();
canvas.Width = new FixedWidth(1200);
canvas.Height = new FixedHeight(1200);
Graphics gr = canvas.CreateGraphics();
ultraChart1.RenderPdfFriendlyGraphics(gr);
report.Publish("..\\..\\Test.pdf", FileFormat.PDF);
Process.Start("..\\..\\Test.pdf");
Please take a look at the attached sample for more details and let me know if you have anyquestions. Also more details how to export grid to pdf, you could find in our online documentation:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.DocumentExport.v12.1~Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter~Export(UltraGrid,Report).html
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.1/CLR2.0/html/WinGridDocumentExporter_Export_WinGrid_to_an_Existing_Report.html
After using your code i get the output as shown in the attachment.the last column's last data appears to be left aligned..Can you please send me one sample of exporting my ultrachart n ultragrid one below the other in pdf format.
Thanks