Re: need urgent help with report

Tom Nesler <[email protected]> Mon, 6 May 2002 08:36:46 -0700 (PDT)
Newsgroups gmane.comp.lang.delphi.quick-reports
Message-ID <[email protected]>
Hi Andy!
--- soyoukan <[email protected]> wrote:
> my "sql" TQUERY sorts out the correct records and sorts them by day-
> mon-year and transaction type = C (credit) or D (debit)
> and there can be a variable number of records found including zero.  
> 
> my QR report currently does some of what i want but i dont know how 
> to modify it to do exactly what i want..
> 
> rebpageheader
> rbdetail
> rbpagefooter
> 
> 
> Page Heading:  accounts for april 2002 
> 
> rbDETAILband
> listings:  day    transaction   c or d   inv#   stock      amount
>            04     badges          c        N      Y         5.00
>            05     hire of hall    d        N      N       (25.00)
> 
> etc.etc.etc
> 
> Page footer:  Page: xxx                              total:(20.00)
> 
> 
> amendment required is to put all credits on one page and debits 
> second page... plus obviously have the end total refer to appropriate
> 
> amounts BUT if going over to 2 pages, the total DOES not print until 
> 2nd page.
> 
> IDEALLY, i would like to complicate matters by having credit / debit 
> side by side - but this is way out of my league!

From what you are saying, it sounds like you are using a grouping
footer rather than a page footer.  What you are doing should work fine.
 Can you create a dummy field to total to see if the problem is with
your input query?


As to having the debits and credits in different columns you can do
this by placing two QRExpr components in your detail band and using an 
IF function like this:

IF(Query1.amount > 0,Query1.amount,'')  For Credit side and
IF(Query1.amount < 0,-1 * Query1.amount,'') for the Debit side.

As for getting the totals to work for each column, I am stumped. 
Anyone know of a trick for this?

Hope this helps,

=====
Tom Nesler

Live Long...Code Well... and Prosper! V

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com