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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Empty values?

Status
Not open for further replies.

Buckaroo8

Programmer
Aug 6, 2003
27
US
I am creating a Census report for a hospital. The report needs to display every room for a floor and patient info for the patient occupying the room. However if the room is unoccupied, the patient info area of the report must be empty space for 'write-ins' for admissions after the report is run.
The problem is how to display the empty rooms. Currently the report will run showing only occupied rooms and the patient info respectively.

Ex: Room 1
John D'oh
patient information

Room 2
(blank field)
(blank field)

Room 3
John SmallBerries
patient information

Thanks!
 
Well that's dependent upon your data and how you're displaying it, meaning groups, detail sections, etc.

You can create a formula to create lines (carriage returns) using chr(13), just make sure that you set the formatting option to can grow for the formula, and conditionally suppress it if there is data.

An example formula to add lines would be:

chr(13)+chr(13)

If you require further help, try explaining where in the report you intend to add lines, such as a group or detail section.

-k
 
Is the room field in one table (Table A) and the patient info in another (Table B)? Then you need a left join from the table containing the room number to the table containing the patient info. I would then substitute a formula like the following for the patient name:

if isnull({tableB.patientname}) then " " else {tableB.patientname}

You could reserve space for other patient information in a similar way. Also it might help to not to have "Suppress Blank Section" checked for details in format->section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top