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

a summary page

Status
Not open for further replies.

palpet

Programmer
Apr 11, 2003
11
CA
Is it possible to have a whole summary page? for example, i have a report with 2 groups, 1 is Office 2 is salesperson. the report gives details on all sales per salesperson. i would like to have the last page print a summary with all the individual names and total amount of sales for each name. any ideas how to accomplish this? thanks in advance for any help.
Peter
 
Consider a crosstab in the Office2 group footer containing the Salesman Names as Column Header, and Sales Amount as the summary.

-k
 
a crosstab in the office footer won't work, that'll print a summary of of each salesperson for that office, i need a entire summary forr all the offices in one page, not at the end of each office. damm picky bosses
 
PalPet -

As a former sales manager I understand what you want I think

The degree of difficulty of what you want to do just depends on how much information you want to summarize on the last (report footer) page.

Essentially you use the report that you already have but capture the information that you want into arrays for later printing.

For example: Say we want to summarize the Salesman and their overall sales.

First initialize your arrays...estimate the number of salesmen you have then increase that number by 50%....So if there are currently 50 salesmen then you build arrays based on 75 salesmen to reduce the need for maintenance as time goes on
********************

@Intialization (Suppressed in Report header)

WhilePrintingRecords;

StringVar Array Salesmen := ["","","",...(add 70 more sets)..."",""];
StringVar Array SalesVolume := ["","","",...(add 70 more sets)..."",""];
numberVar Pointer := 0;
********************

We use strings here for convenience of display.

********************
@CollectSalesVolume (suppressed in Salesman footer)

WhilePrintingRecords;

StringVar Array Salesmen ;
StringVar Array SalesVolume ;
numberVar Pointer ;

Pointer := Pointer + 1;
Salesmen[Pointer] := {table.salesmanName};
SalesVolume[Pointer] := Totext(Sum of Sales,0);
********************

Now comes the display...the only tricky part

You are limited to 254 char/formula...so let's say each salesman's name is maximum 25 chars each then you have room for about 10 salesmen / formula


So you require 8 formula sets of salesman/salesvolume

You can make the last page anyway you want but let us say you want 4 columns of Salesman/SalesVolume across

then you make 2 sections of your report footer a and b with 4 sets / section and enable the "suppress blank section" on both

@displaySalesman1

WhilePrintingRecords;

StringVar Array Salesmen ;
numberVar icounter;
numberVar Result := "";

For icounter := 1 to 10 do
(
Result := Result + Salesmen[icounter] + chr(13) + chr(10)
);
Result;


@displaySalesVolume1

WhilePrintingRecords;

StringVar Array SalesVolume ;
numberVar icounter;
numberVar Result := "";

For icounter := 1 to 10 do
(
Result := Result + SalesVolume [icounter] + chr(13) + chr(10)
);
Result;

The next formulas, @displaySalesmen2 and displaySalesVolume2, would be from Icounter := 11 to 20

remember the last formulas,@displaySalesmen8 and displaySalesVolume8, would be from Icounter := 71 to 75

Another reason for the separate formulas is to get a rasor sharp column for Salesman and Sales Volume

So that is the basics of what you want to do....if you want more information than this just add arrays and capture/display what you wish in a similar manner.




Jim Broadbent
 
You could do a crosstab with the salesperson's name as the row, with no column selected, and sales amount as the summary. Place this in the report footer. This will give you a list of salespeople with total sales, regardless of office.

-LB
 
As lbass suggests, a crosstab at the end does what you're asking, I had misread the original post.

-k
 
thanks alot for the replies. the crosstab does exactly what i want, with one problem that i can't figure out. my report is in landscape format, thye crosstab is on the left of the page with just 2 columns. in some offices there's 100 salespeople, so i have this really narrow table going downwards, for about 5 pages, and alot of empty space beside it. is there a way to make the table display records downwards then start again to the right as soon as it hits the end of the page? like the multiple columns setting in details section.
 
I just tried this and it seemed to work, although you'll need a good estimate of the number of rows you can fit per page. Let's assume that you want three "columns" each with salesperson name and sales amount.

First add the crosstab to your report footer repeatedly until you have the number of columns you want (here we'll talk about three).

Create three formulas. The first {@amt1} should look like this:

if {salesperson.ID} in 1 to 25 then {sales.amt}

if {salesperson.ID} in 26 to 50 then {sales.amt}//for {@amt2}

if {salesperson.ID} in 51 to 75 then {sales.amt}//for {@amt3}

For each cross tab use one of the formulas above for your summarized field. Then go to format crosstab->customize style and check off suppress empty rows and suppress empty columns. Your report footer should now appear with multiple columns. In the same customize style screen, you could also click on "format grid" and get rid of the crosstab lines if you wish.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top