[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Break Logic ????



>      Product            Product Name    Product Plan          Amount
>      Car                Camry           2-door                 400
>                                         4-door                 1500
>      Truck              Jeep            2-door                 500
>
>      I tried using the on-break,{I have not tried the after/before to
>      calculate the totals}, but it prints a line for the repeating items, I
>      know I can use a hack by inserting these values into a temporary table
>      and use sql "group by's" to get the results and then formatted in sqr.

I can't be sure exactly what's going on without seeing the code you are
using and the output it produces, but I don't think you'll need to use
a temporary table.

Something like this should work unless the data you want aren't readily
available in your data model:

begin-select
product              (1,1)  on-break print=change/top-page level=1
product_name         (1,20) on-break print=change/top-page level=2
product_plan         (1,40)
sum(amount)  &amount (1,60)
   next-listing
from product
group by product, product_name, product_plan
end-select




Hope this helps.

                                                Nathan
----------------------------------------------------------------------------
Nathan Treadway    | Ray Ontko & Co. | info@ontko.com (auto-reply server)
nathant@ontko.com  | Richmond, IN    | ftp.ontko.com, http://www.ontko.com/