Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated logic for Report
Message
 
 
À
14/08/2002 04:43:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00689239
Message ID:
01482902
Vues:
201
Great memory!

So, for the new problem one of the solutions will be to add one extra total line to the report and print this total line in the Summary and don't print it (controlled by Print When in the group and details lines).

Any other better ideas?

One extra solution is to have a separate Summary cursor with one record and print from that Summary cursor at the Summary band.

I think I'm going to go with the last idea. (Or we can create summary variables in the calling program (private) and try to use them instead in the Summary).

As for this report I only need a correct summary info.

>Nadya,
>
>If I understand correctly you want group/report totals/avg at the top of a group/report.
>
>It can be done (Had to do it for balance sheets where the total is printed before any detail)
>
>Basically, we produce a cursor that has the total info available when needed
>
>You need to run you report off a cursor
>
>prior to launching the report you modify the cursor a bit
>
>Let's go by a basic example
>
>Suppose a cursor
>
>State, year, week, amount
>
>
>select State, ;
>       Year, ;
>       Week, ;
>       amount ;
>    from Table1, Table2, ...
>    into cursor tmp1 ;
>    where ( .. ) ;
>    order by 1, 2, 3
>
>select State ,;
>       year, ;
>       week, ;
>       sum(amount) as State_year_week_amount ;
>    from tmp1 ;
>    into cursor tmp2 ;
>    group by 1, 2, 3
>
>Select tmp1.State, ;
>       tmp1.Year, ;
>       tmp1.Week, ;
>       tmp1.amount, ;
>       tmp2.State_year_week_amount ;
>    from tmp1, tmp2 ;
>    into cursor tmp ;
>    where   ( tmp1.State == tmp2.State ) ;
>        and ( tmp1.Year == tmp2.Year ) ;
>        and ( tmp1.Week == tmp2.Week ) ;
>   order by 1, 2, 3
>
>
>now you have State_year_week_amount available to print in the group header
>
>You can do similar for report totals (and print them on the first page only).
>
>just add the fields you need to the cusor with a select.
>Those fields will be available in the detail band, but there is no need to print them there. Only print them in a header
>
>In addition, if you need the whole summary upfront, add a blank state (group) which contains all the summary for the others, and join it with sql. It will be printed at the beginning of your report
>
>>Hi everybody,
>>
>>I have the following report:
>>
>>Transaction Filing Dates - '30 Day' Timeliness Scorecard for MA...
>>
>>Begining Issue Week: 200203 through Ending Issue Week: 200220
>>
>>Registry      Issue Week  Latest Filing Date Pub Delay Timely
>>
>>Barnstable    2002 03     12/14/2001          38        No
>>              2002 04     12/26/2001          33        No
>>....
>>
>>Registry Average for Report Period: Avg Timeliness 72.22%
>>=======================================
>>...
>>
>>======================
>>Massachusetts Average: Avg Timeliness all IssWeeks all registries 62.96%
>>
>>
>>I set up 4 report variables: Registry_Timely, Registry_Cnt (end on registry) and similar for report Rep_Timely Rep_Cnt (end on report).
>>
>>The user requested to repeat Registry Summary info right before State Summary, so they don't have to flip through the stack of paper...
>>
>>I explained, that it's quite complicated to achieve, but I'll try.
>>
>>However, I don't see an idea at this moment, how to produce such report. May be you can help me?
>>
>>Can I use two separate tables in one report?
>>
>>Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform