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

Report with multiple summary bands

Status
Not open for further replies.

bevhoward

Programmer
Oct 11, 2010
3
US
I have a report need that seems like the solution should be obvious, but it's not... at least to me.

first of two questions;

I have data where I need to run a detail report on about a thousand clients.

Clients have from one to several hundred related detail records... i.e. from one to ten pages of details.

I have a report working which includes a summary band that works for individual client reports.

I need the summary on a separate page (to fit in a window envelope)

However, I need to run this report on all (thousand) clients with a summary for each client (on a new page) for every client using a single report run.

If I use additional detail bands I can't see how to trigger on data group and still use the preceding client info.

Related question... is it possible to insert a page eject in a totals band?

Any tips?

Thanks in advance,
Beverly Howard
 
Good Day Ms. Beverly Howard

I am not completely clear on what is needed here but I will throw out some ideas and maybe something will trigger the right answer.

1)Consider creating the reports in a loop.
For each client
Gather/prepare needed data
Print first main report for client
Print summary report for client
Repeat for next client.

2) Also it is possible to embed printer control codes (e.g. Page Eject ) into the report. Now there are many different codes (e.g. ESC codes ) for different printers so this solution is not very portable.

3) A report can be made that only prints lines of information when certain conditions are met, e.g. print only when Summary_Flag is true and hide the line (completely remove it from the report ) when Summary_Flag is false.

I hope one of the above ideas helps.

Please repost if more information is needed for one of the 'solutions' described above.



Lion Crest Software Services
Anthony L. Testi
President
 
A Summary band is applicable for the Entire Report.

If you need multiple 'summary' bands, then they would typically be applied to separate Groups within the Report and their Report Form objects would entered into with the Group Footer.

"I have a report working which includes a summary band that works for individual client reports."

OK that is fine.
Your one separate client-specific report has one Summary Band which is displaying what you need.

"I need the summary on a separate page (to fit in a window envelope)"

Since this seems to be a different report, that might typically be done in a separate Report which utilizes values that can be pre-calculated from the data.

I would run it something like:
Code:
  SELECT ClientData
  SET ORDER Client
  SCAN
     cThisClient = ClientData.ClientNo

     SELECT *;
       FROM ClientData;
       WHERE ClientNo = cThisClient;
       INTO CURSOR RptData READWRITE

     * --- Print First 'Standard' Report ---
     SELECT RptData
     REPORT FROM FirstRpt NOCONSOLE TO PRINT

     * --- Print Second 'Summary' Report ---
     SELECT RptData
     <do whatever summary pre-computation is necessary>
     SELECT RptData
     GO TOP
     REPORT FROM SummryRpt NOCONSOLE TO PRINT
     USE

     SELECT ClientData
  ENDSCAN

Good Luck,
JRB-Bldr
 
Thanks for the responses... those here and on the microsoft.public.fox.programmer.exchange have me back on track and moving.

To be specific, what I needed were the Getprinter() to prompt the user for a printer to get the SET PRINTER and the NOPAGEEJECT syntax which I had missed so far since it's not included in the REPORT syntax options at the top of the help page.

Thanks again,
Beverly Howard

 
Interesting...

How does what I needed were the Getprinter() to prompt the user for a printer to get the SET PRINTER have anything to do with:
Report with multiple summary bands
or
I need the summary on a separate page
or
I need to run this report on all (thousand) clients with a summary for each client (on a new page)
or
I can't see how to trigger on data group and still use the preceding client info.
or
is it possible to insert a page eject in a totals band

Nor do I see how the NOPAGEEJECT syntax, which is typically used in an attempt to keep printing on the same page, has anything to do with:
I need the summary on a separate page

Were we providing you suggestions/advice on the wrong question(s) all along?

Good Luck,
JRB-Bldr
 
JRB-Bldr

Thank you for your "Question of the Question" posting. I was thinking that I was the only one that was confused by original question vs the information in the thank you reponse. I knew I did not completly understand what was being asked, now I am sure I was no where near the real question.

Lion Crest Software Services
Anthony L. Testi
President
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top