Hello Stimulsoft-Team,
when exporting a report to PDF which has a Group the small + /- Icons / images are not exported. There is a space instead.
Is it possible to
1. Show the small Icon / image in the PDF file or
2 at least get rid of the white space in the PDF where the + / - Images uesd to be?
Thanks and Kind regards
Thorsten Pontow
PDF Export for Report with Group
PDF Export for Report with Group
- Attachments
-
- A Report with a Group is exported to PDF.
- ExportToPDFWithGroup.png (76.66 KiB) Viewed 6889 times
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
-
- Posts: 6344
- Joined: Tue Mar 20, 2018 5:34 am
Re: PDF Export for Report with Group
Hello,
> 1. Show the small Icon / image in the PDF file or
We do not see the point, because this feature in pdf is impossible to implement, and that icon will only occur extra questions from the user.
> 2 at least get rid of the white space in the PDF where the + / - Images uesd to be?
We do not create an empty place, but you yourself are the design of the report.
as an option - change the report in the event before export (move the necessary components to the left).
Thank you.
> 1. Show the small Icon / image in the PDF file or
We do not see the point, because this feature in pdf is impossible to implement, and that icon will only occur extra questions from the user.
> 2 at least get rid of the white space in the PDF where the + / - Images uesd to be?
We do not create an empty place, but you yourself are the design of the report.
as an option - change the report in the event before export (move the necessary components to the left).
Thank you.
Re: PDF Export for Report with Group
Thanks Lech,
that helped me to solve my Problem!
I overwrote OnExporting() and OnExported() i my own StiReport-Subclass as follows:
Greetings
Thorsten
that helped me to solve my Problem!
I overwrote OnExporting() and OnExported() i my own StiReport-Subclass as follows:
Code: Select all
protected override void OnExporting(StiExportEventArgs e)
{
m_marginAdjustedComponents = new List<string>();
foreach (StiPage renderedPage in RenderedPages)
{
foreach (StiComponent renderedPageComponent in renderedPage.Components)
{
if (renderedPageComponent is StiText textComponent && textComponent.Name.EndsWith("groupHeaderBandText"))
{
textComponent.Margins.Left = 1;
m_marginAdjustedComponents.Add(textComponent.Name);
}
}
}
base.OnExporting(e);
}
protected override void OnExported(StiExportEventArgs e)
{
base.OnExported(e);
foreach (StiPage renderedPage in RenderedPages)
{
foreach (StiComponent renderedPageComponent in renderedPage.Components)
{
if (renderedPageComponent is StiText textComponent && m_marginAdjustedComponents.Contains(textComponent.Name))
{
textComponent.Margins.Left = 12;
m_marginAdjustedComponents.Remove(textComponent.Name);
}
}
}
}
Thorsten
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: PDF Export for Report with Group
Hi Thorsten,
Amazing, it really is. Easy and efficient solution. Thank you for sharing your approach and the code snippet with the community, it will definitely help someone.
Kind Regards,
Edward
Amazing, it really is. Easy and efficient solution. Thank you for sharing your approach and the code snippet with the community, it will definitely help someone.
Kind Regards,
Edward