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!

How to show the total price in a spesific line & insert blank lines

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi...
I have to print order line in a template paper (blank invoice). There are 10 lines in that paper. If supposed I have 10 order, the total of the order will be printed right in the total box of that paper. but If I have less than 10 order, the total of that order printed just after the last order.

example:
1 box productID4824934823 US$ 15
1 box productID3420935039 US$ 45

US$ 60


what I really want is that to insert blank lines, counting something so that the total can be printed at line 12, not in line 4 like the example above.

So... how to print total at line 12 regardless how many order line I have???

can somebody help me please?
Thanks
Darwin.
 
I'm assuming you are grouping on something, like an order number maybe?

One way to do it is to use suppressed group footer bands.
You'll need to add enough bands to cover a one line order.

Create a "count" group summary. (I usally create the summary, becasue it's easier than trying to remember the formula coding) You can delete the field from the report once you complete the next step.

Conditionally suppress each extra band using:
Count ({counted.field}, {group})>1 in the first extra band
Count ({counted.field}, {group})>2 in the second extra band

Do this for each band you want to suppress.




Mike

 
If 10 is the maximum number of items you want to be able to have on your invoice, this is possible with a bit of donkey labour, under the assumption that it's okay for your total to be in the Report Footer, being as it sounds like a grand total.

Create a constant group formula. Something like:

If {field} = 'XYZYX' Then '?' else ' '

will be fine. Make this formula your Number 1 Group.

Right click one of the fields in the details section, and make a running total count that never resets.

In the Group Footer of your constant group, Insert Section Below 10 times, until you have Group Footer #1a to #1k.

Suppress the Group Footer #1a based on the condition that the running total field is >=1. For #1b the condition is >=2, for #1c, >=3, and so on and so forth.

The group footers will push the grand total down the report depending on how many rows are returned in the invoice. On print out, the totals position should always appear to remain static on the 12th line.

Naith
 
I had to do this on a report.

An easier way if there is only one page of items is to put the customer details etc. in a Group Header (you've probably done this already). But also create another section of the header and include in this the outline of the body of the invoice (probably just verticle lines). Set this to Underlay the following sections. Put the items in the details section (which should print on top of the blank invoice body. You then put the rest of the invoice, i.e. the bottom of the body and the totals etc. in the Group Footer, this will not be overlaid and will be a constant size. Of course, if you are going to print this on Invoice paper and don't need lines etc., the body of the invoice will just be a blank section the rihgt size.

If you are printing the verticle lines for the invoice columns etc, they will need to start in the header and extend through the details section into the footer (without any breaks).

If you have more than 10 lines, and the invoice goes to a second page then you will need to do a count and repeat the header/footer where necessary (I didn't need to do this so not sure how!).
 
You guys are making this way too tough. Format the group footer where the total is printing and select the "Print group footer at bottom of page" checkbox. No formulas required.

You may then need to play with the X-Y coordinated of where the object is within the group footer to get it where you want it, but this is a one time deal. It also works very well in a situation where you have 35 or 40 line items, and the total is only on the LAST page.

Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
I've got a similar problem, but I don't really grouped them up, any suggestions besides them ?

And one more silly question, how can I actually position a field to a certain XY coordinate ?

Thx for the time reading if you are :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top