Google Answers Logo
View Question
 
Q: Crystal 10 Reporting Question ( No Answer,   2 Comments )
Question  
Subject: Crystal 10 Reporting Question
Category: Computers > Programming
Asked by: blue_bna-ga
List Price: $20.00
Posted: 31 Mar 2005 06:25 PST
Expires: 30 Apr 2005 07:25 PDT
Question ID: 503145
I am trying to get Crystal to print up to 98 lines in a group and then
produce a group change so that the Group Footer prints and then the
Group Header before the detail continues.  Does any one know how to
accomplish this?

Clarification of Question by blue_bna-ga on 01 Apr 2005 12:53 PST
Thanks for that suggestion - here's a little more background - we're
looking at a record set of several thousand transaction records that
are grouped by account number (coming from a SQL SERVER 2000
database.)   We're creating an ascii file for use in another system. 
A group represents transactions for a particular account - but the
system we are sending it to has a limitation of 98 records per group. 
So if an account has 102 records, we have to create a footer for the
first 98 records, then a new header for records 99-102, followed by a
footer for those records:


headerforbatch1acct1
record1
...
record98
footerforrecords1-98
headerforbatch2acct1
record99
...
record102
footerforrecords99-102
headerforbatch3acct2
record1
...
record23
footerforrecords1-23

Of course we can create a running total or a variable, but no way to
group on either of those that we know of.  We may end up with a
compiled program to do this.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Crystal 10 Reporting Question
From: willcodeforfood-ga on 01 Apr 2005 09:16 PST
 
You could always tweak the data that Crystal is fetching.  Exactly how
will depend on where the data is coming from.

Fields                     GroupID
=========================  =======
record 1                   a
record 2                   a
...
record 98                  a
record 99                  b

What kind of system is the data coming from and what is the volume of
records you are dealing with?
Subject: Re: Crystal 10 Reporting Question
From: willcodeforfood-ga on 01 Apr 2005 13:18 PST
 
If you can generate an acct and batch id in your recordset, can't you
just group on both of those fields within Crystal, or a concatenation
of them or something?

Another approach, since your recordset is really not that large (yet)
is to create an output table in your database like this:

Acct   Batch  Recnum  Line
====== ====== ======= ===============================
1      1      0       headerforbatch1acct1
1      1      1       record1
...
1      1      98      record98
1      1      99      footerforrecords1-98
1      2      0       headerforbatch2acct1
1      2      1       record99
...
1      2      4       record102
1      2      99      footerforrecords99-102
2      3      0       headerforbatch3acct2
2      3      1       record1
...
2      3      23      record23
2      3      99      footerforrecords1-23

Then just query your data and sort by Acct, Batch, and Recnum to get
it all in the proper order.  If you are using Crystal to display the
data, then don't group on anything, just use a font like Courier New
and use a really wide field.  If you are shipping the data, then
better than using Crystal, just use BCP to write the query directly to
disk.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy