Page 1 of 1

Total

Posted: Wed Aug 26, 2009 7:12 am
by jayanthi
Hello,

I have cross tab which has column Total, but it displays total of crosstab1_sum1 and crosstab1_sum2.
1. I need to display the sum of crosstab1_sum1 and crosstab1_sum2 in CrossTab1_ColTotal1
2. Also i need to show sum of CrossTab1_ColTotal1 at the end of cross tab report.

Please give me an idea

Regards
Jay

Total

Posted: Wed Aug 26, 2009 9:35 am
by Andrew
Hello,

Could you provide us with more information how do you create the crosstab. What are fields and how many of them do you use?

Thank you.

Total

Posted: Thu Aug 27, 2009 12:00 am
by jayanthi
Thanx for your reply.

I have a table tbl_days with columns days(int), TripType(string), TimeIn(int), TimeOut(Int)

1. Cross tab layout is: days under Rows, TripType under Columns, Count of TimeIn,TimeOut under Summary.

2. Cross tab style is TripType in column wise, days in row wise, Count of TimeIn as In, Count of TimeOut as Out GROUP BY days,TripType

3. Have Cross-Column Total (CrossTab1_ColTotal1) which displays Total of In,Out separately but i need to display Total of In and Out as single value.

eg:

Total
------
3|2
2|0
1|1
has to be displayed as like

Total
------
5
2
2

4. also at the i need the sum of total as 9

Regards
Jay

Total

Posted: Thu Aug 27, 2009 2:46 am
by Andrew
Hello,

Can you explain: do you want to output the TimeIn and TimeOut rows as separate values or to output as one value?

Thank you.

Total

Posted: Thu Aug 27, 2009 3:40 am
by jayanthi
Hai,

I need TimeIn,TimeOut ouput as separate values, but the total as single value.

Eg:

Note: '--------' used for space

Trip Type-------------General----------Night-------Total
------------------------In--------Out------In-----Out
-----------------------------------------------------------------------------------------
1-----------------------1---------0--------1-------1--------2|1
2-----------------------1---------1--------0-------0--------1|1
3-----------------------1---------1--------1-------1--------2|2
4-----------------------0---------0--------1-------1--------1|1
....
30----------------------0---------1--------1-------1--------1|2

In above Total is Sum of In| Sum of Out, but i need to print as Sum of In+Sum of Out, also i need final total at the end like below

Trip Type-------------General----------Night-------Total
------------------------In--------Out------In-----Out
-----------------------------------------------------------------------------------------
1-----------------------1---------0--------1-------1--------3
2-----------------------1---------1--------0-------0--------2
3-----------------------1---------1--------1-------1--------4
4-----------------------0---------0--------1-------1--------2
....
30----------------------0---------1--------1-------1--------3

-----------------------------------------------Total---------14

Jay

Total

Posted: Fri Aug 28, 2009 1:26 am
by Andrew
Hello,

Unfortunately, it is impossible to this using the cross-tab but you may get the table like this
Trip Type-------------General----------Night-------Total
------------------------In--------Out------In-----Out
1-----------------------1---------0--------1-------1--------2|1
2-----------------------1---------1--------0-------0--------1|1
3-----------------------1---------1--------1-------1--------2|2
4-----------------------0---------0--------1-------1--------1|1
....
30----------------------0---------1--------1-------1--------1|2
Please, select the horizontal order of Summary fields output (there is a button in the cross-tab designer).

Thank you.