Crystal Reports 10 - Repeat Footer based on Variable Data

MAS500
MAS500 used Ask the Experts™
on
NEWBIE ALERT!

I would like to know if it is possible to repeat a Footer x times, based on a variable.

In general terms, the report is grouped by Sales Order Number and Line Number. In the line number grouping we have Item Number and Quantity.

If multiple quantities of a given Item Number are purchased , I would like the Group footer repeated X times.

For Order Number 0001, I have 2 Line Numbers. Line 1 is Item Number 111111 with a Quantity of 2 and Line 2 is Item Number 22222 with a Quantity of 3

I would like the output to look similar to this:

Order Number 0001
Line Number      1
Item Number         Quantity
   11111                       1
   11111                       1
   11111                       1


Order Number 0001
Line Number      2
Item Number         Quantity
   22222                       1
   22222                       1

Any and all thoughts and methods are appreciated.

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Of course, Line Number 1 is a Qty of 3 and Line Number 2 is a Qty of 2
Why are you using the group footer for the line detail?
What is going into the Detail line?

One of  the 'standard' approaches to this type of requirement is to build a'Numbers'  table which has a single field defined.  The table has one record containing a 1, two records containing a 2, three records containing a 3 and so on.
Then join this table to your current input table on the quantity field.  This create as many 'duplicate' records as you have included in the Numbers table and you can print the same line that many times.

However this would normally utilise the Detail section, which is why I started with the questions I asked.

Author

Commented:
A far better solution indeed. The reason for the footer approach was that was the parameter passed on to me via IM.

Thanks for your help!

Author

Commented:
Solved!

Author

Commented:
Thank you for your support!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial