Hi,
I am using the Report Engine to create a report with multiple grids/tiles. I am using a "section" and created a sectionfooter. I have an image that I have been trying to align to the right of the footer, but cannot get it to work.
I was playing around with the sectionFooter.AddImage(img, 0, 0) left margin - but depending on the set of grids I export this could end up in a different position on the page (or not at all since it would be off the page).
Please help - how do I left align an image to the right of the bottom of the page, regardless of the grids or data I am exporting.
Thanks,
Gerry
Sorry to be confusing:
Bottom Line: I have an image that I need to display in the bottom right on every page.
When I try to specify the position in pixels of the image it never shows up in the same place every time I export a grid (since I resize the grid columns when I load data).
Is there some type of alignment property for the image?
I'm not quite sure where you are adding the image but something like this might work for you.
bandFooterText.AddContent(
new Infragistics.Documents.Graphics.Image(Application.StartupPath + "/Resources/image.jpg"), new Infragistics.Documents.Graphics.Size(60, 35), new Infragistics.Documents.Report.Indents(5), Infragistics.Documents.Report.ImageAlignment.Left);
If you get chance the sample in the Windows Forms Feature Browser > Publishing and Printing is very helpful. There is a Samples Gallery and you can explore the code for the types of affects you want to create.
Marianne
Hi Gerry,
I’m just checking back if you have any follow-up questions.
Please let me know if there is anything I can help with further.
Hi Marianne,
I want to ask a question about this method AddRichContent. When I tried to use [<div align="Right" size="6">text here</div>], it did not show correctly, the position of the text is not on the right. 1. Do I only can solve this problem by using Infragistics.Documents.Report.TextAlignment.Right? 2.do this method not support div tag? if so, which tags this method support.
Thank you very much.
Hello purpleCrystal,
I am following up and may I ask if you are still having issues with changing the position of your text as you described?
I am going to require more information regarding your application.
1. What seems to trigger this issue? 2. Can this issue be reproduced? How?3. Could you let me know the steps that you follow in order for us be able to reproduce the issue from here? 3. Is this a runtime or design time issue? 4. What does your application consist of? Provide screenshots
In order to properly assist you I require an isolated sample that demonstrates the issue.
Let me know if you have any additional questions.
Hi Michael,
I changed it to use the following codes and it works.
private void MakeTitle(Infragistics.Documents.Reports.Report.Text.IText text, string strText) { if (strText.Length > 0) { string htmlFormat = "<font color=\"Black\" font size=\"14\"><b>{0}</b>"; string boldTitle = string.Format(htmlFormat, strText); text.Alignment = Infragistics.Documents.Reports.Report.TextAlignment.Center; text.AddRichContent(boldTitle); } }