I have a few questions regarding exporting UltraGrid to report
1. Formatted grid cell wasn’t exported correctly, font styles and embedded image didn’t show on the report, is there a way to make it work?
2. BackGradientStyle wasn’t exported correctly either;
3. There is a Print method in Report class, is there a way to do print preview?
Thanks,
Crystal
Hi Crystal,
qhbyjh said: 1. Formatted grid cell wasn’t exported correctly, font styles and embedded image didn’t show on the report, is there a way to make it work? 2. BackGradientStyle wasn’t exported correctly either;
The exporting of the grid is WYSIWYG. So the exported report should appear exactly like the grid on the form, or at least as close as possible given the constraints of the PDF or XPS format. This includes font and colors, so if this is not working, then something is wrong - but it's impossible for me to guess what that might be.
qhbyjh said:3. There is a Print method in Report class, is there a way to do print preview?
This is discussed here: Using the Infragistics.Documents code library with an UltraPrintPreviewDialog - Infragistics Community
Thanks Mike, do you think I should submit an incident regarding to the two exporting issues?
Crystal.
I know that this works, I've done it many times. If it's not working in your application, then something is wrong. Perh***mething in your code is resetting the formatting on the export layout before it is exported.
If you can duplicate this in a small sample project, you can either post it here or Submit an incident to Infragistics Developer Support and we can check it out.
Hi Mike,
Thank you for your reply. I found they are not working when I use UltraGridDocumentExporter export grid to PDF file. When I use UltraGridPrintDocument, formatted text cell works fine.
I'd like to know if we can text in different font or style in page header using UltraGridPrintDocument. I only see PageHeaderAppearance in DefaultLogicalPageLayoutInfo.
qhbyjh said:Do you know if text can be displayed in different font or style in page header using UltraGridPrintDocument. I only see PageHeaderAppearance in DefaultLogicalPageLayoutInfo.
I don't think you can do this by default. It may be possible using a DrawFilter to draw the text yourself, but I'm not absolutely sure.
qhbyjh said:The font we use is "Segoe UI", Font style, weight and images embedded in formatted cell aren't displayed in PDF file using UltraGridDocumentExporter.
Segoe UI is a relatively new font. I don't even think it's installed with Windows XP. It might come with Vista, but I think it only installs with Office2007.If the font does not specifically have a bold version of itself installed on the system, then the PDF document won't be able to display it in bold. It will try to simulate bold by increasing the weight, but this doesn't always look good with certain fonts. If you look in yuor system's Fonts folder, you will see that some fonts have multiple files - one for the normal font and other files for bold and other variations.So you might want to choose a font that has those other files.
qhbyjh said: BackColorAlpha isn’t working for in UltraGridPrintDocument and UltraGridDocumentExporter, I used following code to set alternate row appearance, it appears as black in the report. alternateRowAppearance.BackColor = Color.FromArgb(0, 0, 0); alternateRowAppearance.BackColorAlpha = Alpha.UseAlphaLevel; alternateRowAppearance.AlphaLevel = 10; I'll try to see if I can duplicate the problem in a small sample project.
BackColorAlpha isn’t working for in UltraGridPrintDocument and UltraGridDocumentExporter, I used following code to set alternate row appearance, it appears as black in the report.
I'll try to see if I can duplicate the problem in a small sample project.
I'm not sure what's going on there. You say it appears black in the report, but what color is it supposed to be? What does it look like on-screen?
A PDF document cannot support semi-transparent objects - alphblending. So that's not going to work with the DocumentExporter. It should work with the UltraPrintDocument, but it depends what you are expecting to be transparent and what is behind it. You won't see the background of the form that the grid is on in the print document, for example, because the printed page doesn't contain that form.
Thanks Mike,
Do you know if text can be displayed in different font or style in page header using UltraGridPrintDocument. I only see PageHeaderAppearance in DefaultLogicalPageLayoutInfo.
I'd like to know which way we should use for exporting grid to report UltraGridDocumentExporter or UltraGridPrintDocument. I prefer UltraGridPrintDocument if it can displayed text in different font and style in page header.
The font we use is "Segoe UI", Font style, weight and images embedded in formatted cell aren't displayed in PDF file using UltraGridDocumentExporter.
alternateRowAppearance.BackColor = Color.FromArgb(0, 0, 0);
alternateRowAppearance.BackColorAlpha = Alpha.UseAlphaLevel;
alternateRowAppearance.AlphaLevel = 10;
What exactly is wrong with the font in the exported PDF file? It's possible that you are using a font that is not supported by PDF format.
Can you duplicate the problem in a small sample project?