Hide or show fields between preview and print
Hide or show fields between preview and print
Is it possible to have a field visible in preview, but hidden during print and export?
And is it also possible to hide a field in preview, but visible during print and export?
I do not have an explicit sample.
And is it also possible to hide a field in preview, but visible during print and export?
I do not have an explicit sample.
Re: Hide or show fields between preview and print
Hello.
You could set the Printable property of the component to False. Then it will be visible in the Viewer and will not be printed.
If you need to do other changes, you could handle the Printing and Exporting events and render the report again with or without some components.
Thank you.
You could set the Printable property of the component to False. Then it will be visible in the Viewer and will not be printed.
If you need to do other changes, you could handle the Printing and Exporting events and render the report again with or without some components.
Thank you.
Re: Hide or show fields between preview and print
Hello,
I've tried hiding a control between Preview and Print using the Report events, but haven't had any luck.
Attached is a very basic report. For the purposes of testing there is no data associated with the report.
What I'd like to be able to do is hide TitleBand1 when printing, but still be able to see it when Previewing.
I was able to set the Printable property of the Text1 component to false and it does not show when
printing, which is great. However the space taken up by the TitleBand still exists when printing the report.
I tried using the expression below in the report's Printed, Printing, Exported and Exporting events, but
couldn't get it to work - the space taken up by TitleBand1 was always present.
ReportTitleBand1.Enabled = false;
I also tried
ReportTitleBand1.Printable = false; in the same 4 events, but that didn't work either.
I'm using Stimulsoft 2018.1.8 from Febraury 19, 2018. ASP.NET, Flex.
Hope you can provide some direction.
Thanks,
Carl
I've tried hiding a control between Preview and Print using the Report events, but haven't had any luck.
Attached is a very basic report. For the purposes of testing there is no data associated with the report.
What I'd like to be able to do is hide TitleBand1 when printing, but still be able to see it when Previewing.
I was able to set the Printable property of the Text1 component to false and it does not show when
printing, which is great. However the space taken up by the TitleBand still exists when printing the report.
I tried using the expression below in the report's Printed, Printing, Exported and Exporting events, but
couldn't get it to work - the space taken up by TitleBand1 was always present.
ReportTitleBand1.Enabled = false;
I also tried
ReportTitleBand1.Printable = false; in the same 4 events, but that didn't work either.
I'm using Stimulsoft 2018.1.8 from Febraury 19, 2018. ASP.NET, Flex.
Hope you can provide some direction.
Thanks,
Carl
- Attachments
-
- TestDisclaimer.mrt
- (11.2 KiB) Downloaded 187 times
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Hide or show fields between preview and print
Hello,
You should render report again before printing to hide rendered elements:
ReportTitleBand1.Enabled = false;
this.Render(false);
Also, in the flex version events are not supported.
Thank you.
You should render report again before printing to hide rendered elements:
ReportTitleBand1.Enabled = false;
this.Render(false);
Also, in the flex version events are not supported.
Thank you.
Re: Hide or show fields between preview and print
Thanks Lech,
Which Event Handler should I put that code in? I tried placing it in both the Exported and Exporting
events for the report, but it didn't make any difference.
I should have clarified that the Designer I'm using is Stimulsoft 2018.1.8 from Febraury 19, 2018. ASP.NET, Flex., but the
view I'm using is Stimulsoft 2018.1.8 from Febraury 19, 2018. ASP.NET, JS.
Maybe these events aren't supported in the JS version either?
Carl
Which Event Handler should I put that code in? I tried placing it in both the Exported and Exporting
events for the report, but it didn't make any difference.
I should have clarified that the Designer I'm using is Stimulsoft 2018.1.8 from Febraury 19, 2018. ASP.NET, Flex., but the
view I'm using is Stimulsoft 2018.1.8 from Febraury 19, 2018. ASP.NET, JS.
Maybe these events aren't supported in the JS version either?
Carl
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Hide or show fields between preview and print
Hello,
Yes, In the JS version, events are not supported also.
Thank you.
Yes, In the JS version, events are not supported also.
Thank you.
Re: Hide or show fields between preview and print
OK - Thanks for letting me know!
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Hide or show fields between preview and print
Hello
Please let us know if you need any additional help.
Thank you.
Please let us know if you need any additional help.
Thank you.