Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Using the Crystal Report Developer Version that was available for Visual Studio 2017 as a download.

Got a textbox on my report with a footer text in it. I want to print it out but not to show on the screen while previewing.

How to capture the print state ? Or is there any other way out ?

Please help. Thanks in advance.

What I have tried:

Tried using the
WhilePrintingRecords;
in the formula section of the textbox assuming the text will show only while printing but it shows both in preview and print.
Posted
Updated 18-May-19 6:29am

1 solution

That requires "two" reports (or at least a set of "parms") ... One can only "preview" what one "intends" to print (even though one didn't).

You still need "logic" to generate the "non-previewing" preview.

In my previews, I remove items in "preview mode" by setting the control in question to "not visible".
 
Share this answer
 
Comments
Priya-Kiko 20-May-19 2:52am    
Thank you for the response.

I understand that, any text, that we may want to suppress/show only while printing can be done, only when the print state can be trapped. While in preview mode, when user clicks on the 'Print' icon is there a way to capture that event?? If there is then any logic can be put in place. Looking for a solution on that grounds.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900