Reputation: 13141
Is it possible to hide or disable text objects from being exported into Stimulsoft PDF reports?
Setting a text object's "Printable" setting to false appears to have no effect. Apart from that one setting, the only other relevant setting I could find was "Export as Image" which does not appear to prevent output.
I'm using Stimulsoft Reports with Sitecore 6.4. My issue is that raw HTML is appearing in our exported PDF reports. I need a way to hide the text fields altogether.
Upvotes: 1
Views: 2068
Reputation: 116
You can use the following code in Exported(Exporting) events of report:
for (int i = 0; i < this.RenderedPages.Count; i++)
{
foreach (StiComponent component in this.RenderedPages[i].GetComponents())
{
if ((component is StiText) && (component.Name == "Text2"))
{
component.Enabled = true;
}
}
}
Please check the sample from the link: http://depositfiles.com/files/9ci8ofech
Upvotes: 2