Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can you make report/page headers print even when report is empty? 1

Status
Not open for further replies.

cmpgeek

Technical User
Feb 11, 2003
282
US
is there anyway to make crystal print the report &/or page headers even if the report you are running is empty?

i dont know if wanting that makes sense, so let me explain what is leading up to this... i wrote a report to show me any cases that are scheduled in a given room. the person selects the date range and the room they want to look at, and then the report prints - broken down by date... we wrote this because we need to shut down one of our O.R.s for an upgrade and wanted to look specifically at that room and make sure any cases that were already schedued in that room were moved during the dates that the room would be closed.

as long as there are cases scheduled in that room within the date range, the report prints as expected. however, now that we have moved the cases that were in the way, when my boss goes to run the report all it gives her is a blank page. no headings, no footers - nothing, which makes it look as though the report did not run at all.

is there any way around this?

any help would be greatly appreciated...

... always in a state of [ponder] ... inspiring to some day experience [idea] ...
 
In Crystal 8.5, have a section saying something like "No Details found". Set a suppression formula to suppress it:
not isnull({your.field})

This should then appear when there are no details.

Madawc Williams
East Anglia, Great Britain
 
thanks for the suggestion (and yes i am on 8.5 - iapologize for not mentioning that in first post)...

i added a section with a text object stating "no details founds" as you suggested... i suppressed it based on whether or not the running total , but when i run it on a day when i know it is empty, i still get a completely blank report...

do i need to put an evalutation time in the suppression formula or something?

i apologize if i sound stupid - i am grasping at straws with this one...

thanks again

... always in a state of [ponder] ... inspiring to some day experience [idea] ...
 
I display formulas in my Group Header because even if no records are returned, I still want the section to appear. For instance, assuming you have a group on room, you should create a formula @Room like:

local stringvar room := "Room: ";

if not(isNull({Table.RoomID})) then
room := room + {Table.RoomName}
else
room := room + 'None';

room;

Put this formula in the Group Header for the Room group.
 
this does not change anything either...

let me restate that the entire report is empty - not just one grouping or section... i expect it to be empty, which is why i never thought to troubleshoot this potential problem before... however, i do understand <now> where an end-user trying to run this report may get the idea that the report itself is not working when not even the headers show up...

the suggestions yall have made thus far make complete sense to me, but in the same right, if the headers& footers wont print on an empty report, how can any other formula we add show up?

(this is not how i wanted to end the year... grumbling)

my vital stats: Crystal 8.5 / Oracle database / Windows XP...
... always in a state of [ponder] ... inspiring to some day experience [idea] ...
 
What is in the group header? If it only contains database fields, it will be blank.

 
i have text objects in the report, page, and group headers but nothing is showing up...

my vital stats: Crystal 8.5 / Oracle database / Windows XP...
... always in a state of [ponder] ... inspiring to some day experience [idea] ...
 
i also have the formula you posted above in the group header...

my vital stats: Crystal 8.5 / Oracle database / Windows XP...
... always in a state of [ponder] ... inspiring to some day experience [idea] ...
 
My Report and Page headers with text objects always show, even if the report is blank, and I didn't do anything special to create this. I too am using 8.5

Make sure you don't have formula that is suppressing the header.
 
Go to File>Report Options, and make sure that 'Suppress Printing If No Records' isn't checked.

-dave
 
thank you dave! that is what it was...

it had been so long since i have had a reason to look at report options i had completely forgotten that was there...

thank you thank you thank you...

i am so sorry for having wasted so much of yall's time on this, but i sincerely appreciate everyone's suggestions!!!

thanks again to each if you :)

my vital stats: Crystal 8.5 / Oracle database / Windows XP...
... always in a state of [ponder] ... inspiring to some day experience [idea] ...
 
I am a little embarassed that I didn't even consider that. Nice work vidru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top