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

Avery label where info is null

Status
Not open for further replies.
Jul 13, 2002
36
0
0
US
I am running reports out of Crystal Reports 9. Am querying an ODBC database.

A while back, I constructed a report using a large Avery label format so that medications ordered by a physician today could print 4 to a page. There is now a new law that says if prescribing meds on one page, any quadrant left blank needs to say "NULL and VOID." How do I construct this? Technonurse

Technonurse-Spokane
 
Use a command like this following (this uses the Xtreme database):

Select Customer.`Customer Name`,
Customer.`Address1`,
Customer.`Address2`,
Customer.`City`,
Customer.`Postal Code`
From Customer
Union All
Select ' Null and Void',Null,Null,Null,Null
From Customer
where {?LabelNo} >= 0

Be sure to put the space before the ' Null and Void' so that it is sorted correctly (go to report->sort records and add the Customer Name field and adjust the sort so that the Null and Void comes last). At the prompt, put in the total number of labels (labels per page x number of pages). Then in the section expert add a suppression formula to each detail section like:

recordnumber > {?LabelNo}

-LB
 
I have passed this on to a more advanced report writer and he says it looks right to him. We will try later. Thanks.

Technonurse-Spokane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top