DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Need Help From a Experience Report Developer!!!

Threaded View

  1. #1
    Join Date
    Jun 2004
    Posts
    125

    Need Help From a Experience Report Developer!!!

    Hi, I am trying to create a report which is grouped by act_register_date and have a count(column), sum(column) and show them the count and other columns in a repeating frame. Th exact same thing for the previous year side by side and also show the percent difference between each year, also in the repeating frame. As, you know they have to be part of the Group unless I use a formula. But the data is coming from a same table. This is the format.

    Date- ShipCount2003 - ShipCount2004- %Diff
    7-1-04 - 36 - 22- .94
    7-2-04 - 15 - 25- .15
    7-4-04 - 41 - 51- .05

    I broke each group by act_regsiter_date. The other problem is I can get the result but the date does not show the shipments for 2003
    in which there were no shipments for the dates in 2004. Because the date is coming from the query for 2004.
    When I try one method it fixes one thing but breaks other and vice versa for other approches. I tried to add a formula in 2004 query group and wrote a cursor for 2003 shipments and place the values in the place holder and then show it in the repeating frame but it only shows the value of last date over and over again.

    May be I need to change the format to work with it. See if someone can help me with this.

    To get 2004 shipments: A separate Group

    SELECT act_register_date, count(reg_num), nvl(sum(est_total_weight), 0), nvl(sum(est_line_haul_amt), 0)
    FROM shipment
    WHERE act_register_date between :From_date AND :To_date
    AND est_total_weight is not null
    AND est_line_haul_amt is not null
    AND shipment_code = 'MM'
    AND code = 1

    To get 2003 Shipments: A separate Group
    SELECT act_register_date, count(reg_num), nvl(sum(est_total_weight), 0), nvl(sum(est_line_haul_amt), 0)
    FROM shipment
    WHERE act_register_date between add_months(:From_date, -12) AND add_months(:To_date, -12)
    AND est_total_weight is not null
    AND est_line_haul_amt is not null
    AND shipment_code = 'MM'
    AND code = 1
    GROUP BY act_register_date
    GROUP BY act_register_date


    THANKS.
    Last edited by see_one; 08-13-2004 at 05:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width