Results 1 to 9 of 9

Thread: crystal report help...please!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    5

    crystal report help...please!!!

    hello
    i'm using crystal reports for the first time , and i've this complicated thing to figure out. i want a report which shows the field names on the right side(row wise)and each record coming on the side.Basically a columnar ordered data.

    i tried using the crosstab option in crystal reports, but didn't help.actually i don't have any summarized fields here, i mean no calculations.maybe i 'm not on the right track??
    well...i don't have any clue on how to go about.
    and i need it real urgent.....
    please help me out...!!!!!
    thanks in advance!!!

  2. #2
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Thumbs down using crystal reports for a while...

    but haven't done this before and at this moment I can't do any experiment because I am too busy as today is the last day of my project submission...

    By the way one of my report looks like this if you find it useful...

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    5
    The point is i don't have subtotals. All my fileds are strings.
    and i want my data in this format:

    ******** record1 record2 record3 record4
    Fieldname1

    Fieldname2

    Fieldname3

    Fieldname4

    Fieldname5


    Please help me if anyone can....its very urgent!!!!!!

  4. #4
    khalik
    Guest
    AFAIK crystal report cross tab report support it...
    if u are using sql server i have some thing
    BOL

    Code:
    USE Northwind
    GO
    
    CREATE TABLE Pivot
    ( Year      SMALLINT,
      Quarter   TINYINT, 
      Amount      DECIMAL(2,1) )
    GO
    INSERT INTO Pivot VALUES (1990, 1, 1.1)
    INSERT INTO Pivot VALUES (1990, 2, 1.2)
    INSERT INTO Pivot VALUES (1990, 3, 1.3)
    INSERT INTO Pivot VALUES (1990, 4, 1.4)
    INSERT INTO Pivot VALUES (1991, 1, 2.1)
    INSERT INTO Pivot VALUES (1991, 2, 2.2)
    INSERT INTO Pivot VALUES (1991, 3, 2.3)
    INSERT INTO Pivot VALUES (1991, 4, 2.4)
    GO
    
    This is the SELECT statement used to create the rotated results:
    
    SELECT Year, 
        SUM(CASE Quarter WHEN 1 THEN Amount ELSE 0 END) AS Q1,
        SUM(CASE Quarter WHEN 2 THEN Amount ELSE 0 END) AS Q2,
        SUM(CASE Quarter WHEN 3 THEN Amount ELSE 0 END) AS Q3,
        SUM(CASE Quarter WHEN 4 THEN Amount ELSE 0 END) AS Q4
    FROM Northwind.dbo.Pivot
    GROUP BY Year
    GO
    
    
    
    SELECT P1.*, (P1.Q1 + P1.Q2 + P1.Q3 + P1.Q4) AS YearTotal
    FROM (SELECT Year,
                 SUM(CASE P.Quarter WHEN 1 THEN P.Amount ELSE 0 END) AS Q1,
                 SUM(CASE P.Quarter WHEN 2 THEN P.Amount ELSE 0 END) AS Q2,
                 SUM(CASE P.Quarter WHEN 3 THEN P.Amount ELSE 0 END) AS Q3,
                 SUM(CASE P.Quarter WHEN 4 THEN P.Amount ELSE 0 END) AS Q4
         FROM Pivot AS P
         GROUP BY P.Year) AS P1
    GO
    by this u result will be a cross tab...

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    5
    thnks for the reply , but i'm using Access Database...
    Is there any way out??

  6. #6
    khalik
    Guest
    Originally posted by deepashri
    thnks for the reply , but i'm using Access Database...
    Is there any way out??
    not sure about it... something like TRANSFORM should be
    search for it... it should do try wizards

  7. #7

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    5
    transform ??how do i use that option. nothing seems to work...can anyone please....try...!!

  8. #8
    khalik
    Guest
    Originally posted by deepashri
    transform ??how do i use that option. nothing seems to work...can anyone please....try...!!
    ref help the best or try to build a cross tab query using wizard and go to sql mode and see the query... but mostly it should be a numeric field...

  9. #9

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    5
    i've refered the help and have already tried many things under crosstab. It is all strings field.
    since i'm just one day old with this crystal report and its pretty urgent, i'm in a helpless position !

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