Monday, March 26, 2012

No data to print

Hello Guys,
I am having hard time printing "No data to print" when there are no records returned by the report. Rightnow report prints without data but with all column headings. I would appreciate hearing from you soon.
Thanks
Dilemma

:wave:Hi,
In all headers suppress events write the formula as below
if isnull({DatabaseFeild}) =True then True
Place a new header in the header showing the value "No data to Print"
Now in the suppress event of this header write the formula as
if isnull({DatabaseFeild}) =false then True
Madhivanan|||Hello Madhi,

Thanks for the reply. I appreciate your help.

I am just wondering how do u write code header supress event. Do u have to write some code in your eg. VB or PB's event or in crystal report designer itself ? Unfortunately I am using PowreBuilder (pb) for the development.

Thanks
Dilemma|||Hi,
You can use this code in the crystal report itself.
Right click on header and select format section. A pop up menu will appear. There will be a check box labelled as Suppress. In parallel to that a button labelled X-2 is there. Click that button and write the coding I have mentioned. You have to this process for each header. To display "No data to Print", just add a text object and write it as "No data to Print" and in the suppress option write the second formula.

Madhivanan

No comments:

Post a Comment