Results 1 to 4 of 4

Thread: Data Report Problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Location
    India
    Posts
    16

    Unhappy Data Report Problem

    I have a transaction table which contains 2 columns, Amount and Cat_id (category)

    eg my table is like

    Amount | Cat_id
    500 | 1
    300 | 1
    800 | 2
    400 | 2


    So now ive 2 queries
    select amount from transaction where category = 1;

    select amount from transaction where category = 2;

    I want to display the result of these 2 queries in my data report. I also have crystal reports, so even if u tell how to do this in that crystal that would also be apreciated.

    If i try to add these queries in two seperate commands in the data environment and then place it in the data report then it shows an error.


    So I created 2 views cat1 and cat 2 with those above queries, created a new query which takes the value from those two views and placed it on the data report.

    But now wen i see the report i get this

    Cat_1 | Cat_2
    500 | 800
    300 | 800
    500 | 400
    300 | 400


    While i want my report like this.

    Cat_1 | Cat_2
    500 | 800
    300 | 400

    Please help me guys, have to build a small program.

    Hope you guys understood what i want to say.

  2. #2
    Addicted Member
    Join Date
    Mar 2004
    Posts
    222
    you just do group by cat_id in report

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Location
    India
    Posts
    16
    Originally posted by purusingh1
    you just do group by cat_id in report
    Can you please tell me the full query so that i get the output like this.

    Cat_1 | Cat_2
    500 | 800
    300 | 400

  4. #4
    Addicted Member
    Join Date
    Mar 2004
    Posts
    222

    Data Report Problem

    That means you need cross tab report . I don't know whether it is possible or not in datareport but you can do it in crystall report.

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