Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

very basic question re crosstab

edited December 2001 in General
Hi,

Have got a table containing following fields

Room
DayofWeek
Hours

I want to create a simple grid of rooms(rows) and daysofweek(columns) where
each cell contains the total number of hours for a room for that particular
day of the week. I drop Room onto 'new row' and DayofWeek onto 'new column'
and hours onto 'value'.
I can get a simple grid happening but i can't seem to get any function other
than 'count' for the hours. What I want is sum. I can change the function
from count to sum but it just changes back again. Obviously I'm not grasping
something very basic here. What is it?

Cheers

Tony Peppercorn

Techpoint Software

Comments

  • edited December 2001
    The problem must be in your SQL sentence, not in RB.
    Try retrieving the sum(hours) grouping by room and day.
    bye

  • edited December 2001
    thanks, that was what I was suspecting. I had naively thought that RB would
    do that for me

    cheers

    Tony

  • edited December 2001
    Although the sum(hours) will give you the results you want, RB will sum the
    hours for you. I have run into the situation where the interface did not
    allow me to choose the sum. I think it has to do with the pipeline knowing
    the datatype. You can change this property in your code if the interface
    does not let you.

    Steve


  • edited December 2001
    Thanks Steven,

    Somehow I lost the originla thread and only noticed this by accident. Will
    revisit it and give it a try. I ended up doing the report another way
    becuase I could not afford to spend the time trying to get crosstab to do
    what I wanted. Pity because it seems quite powerful. How do you find it?
    There does not seem to be a lot of documentation around.

    Cheers

    Tony Peppercorn


This discussion has been closed.