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

Problem with minimum rows

Status
Not open for further replies.

shaileng

Programmer
May 15, 2003
10
US
Hi,

I have print a report where the Invoice willo be printed based on table data. Now the problem is that no matter how many rows are there in the invoice I have to print minimum of 10 rows. For eg. if there are 3 items print 10 rows, if there is 1 item print 10 rows, if there are 15 items print 15 rows

Now how to do this

SG
 
Define the invoice as a group of items. Count the number of details. Then have nine blank group footer sections, each of which is suppressed, or not suppressed, depending on the number of details for that invoice.

ight-click on a section and choose Section Expert. Then choose the formula icon (x+2 and a pencil) for suppression. Enter a formula, which could be testing a summary count on some field in the detail.

To get totals, right-click on a field and choose Insert to get a choice of Running Total or Summary. Or else use the Field Explorer, the icon that is a grid-like box, to add running totals.

Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.

Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say. They default to 'Grand Total', but also can be for a group.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Why do you HAVE to print 10 rows. Is this to get the invoice to line up and page break right or is this for some other reason?



Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top