Results 1 to 2 of 2

Thread: Data reports format

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2003
    Location
    Noida
    Posts
    21

    Data reports format

    I have two tables: main and t1

    main table:

    itemno --------- itemname
    1 --------------- A
    2 --------------- B
    3 --------------- C

    t1 table:

    itemno ----- pdate --------- Amount
    1 --------------- 1/1/2004 -------------- 50
    1 --------------- 1/1/2004 ------------- 150
    2 --------------- 2/1/2004 ------------- 500
    3 -------------- 3/1/2004 ------------- 150
    1 --------------- 3/1/2004 ------------- 250
    1 --------------- 3/1/2004 ----------- 350
    2 --------------- 4/1/2004 ------------ 540
    3 --------------- 4/1/2004 ------------ 500

    I need to generate repot in following format;

    Jan --------- Feb--------- March------- April
    A --------- 200 --------- 0 --------- 600--------- 0
    B --------- 0--------- 500--------- 0 --------- 540
    C --------- 0--------- 0--------- 150 --------- 500

    Can I create data reports in this way? (broken lines are just for separating the data , it's not required in data reprot.)

    Thanx in advance,
    Saurabh
    Last edited by sjain; Feb 16th, 2004 at 01:29 AM.
    sjain

  2. #2
    Member
    Join Date
    Jan 2004
    Posts
    37
    In Access you want to select the SUM of amount, GROUPed BY itemname and Format(pdate,'mmmm'), and PIVOT that result.

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