Print Page | Close Window

CrossTab Help...

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6370
Printed Date: 01 May 2024 at 11:17pm


Topic: CrossTab Help...
Posted By: _Wired_
Subject: CrossTab Help...
Date Posted: 15 May 2009 at 8:41pm

im trying to do a report with the output is the above picture.. the color blue cells is the contractors.. it must be dynamic.. list of contractors can be expanded or lessen... the violet cell is the name of the vessels.. it must be dynamic also.. then the black cells.. these are the counts of manpower of contractors that will be present in that vessel.. and it must be dynamic also.. is this possible to do in crosstab? please help.. thanksSmile




Replies:
Posted By: DBlank
Date Posted: 15 May 2009 at 10:50pm
Maybe...
Set you crosstab column to the Contractor name field.
Set your row to use the Vessels field and summarize on probably a sum of the manpower field (although this will just be a number not number and letter). Not sure about the last part without seeing the data.
All parts of a crosstab are inherently dynamic and will change as the data in pulled into the report changes.


Posted By: _Wired_
Date Posted: 15 May 2009 at 11:34pm
thanks for the reply.. my problem only is the "summarized" i dont know how to figure it out... Unhappy


Posted By: DBlank
Date Posted: 16 May 2009 at 8:19am

Can you post some sample data as rows and explain them a little? Like what is the Letter for next to the number in you summarized cells? Maybe I can figure it out if I can see what your raw data looks like...

It looks like you actually have a sub grouping in the rows of the crosstab. You indicate 3 rows for daddy 4 for Sussie and 1 for baby. This makes me think you need a double grouping for your rows, primary by the Vessel field and secondary by soemething else but I don't know what.
Your summary might be some kind of count or distinct count of employee number, or a sum of a total workers field or something like that. I can only guess. Without seeing actual data that is the best I can do for you.


Posted By: _Wired_
Date Posted: 18 May 2009 at 6:20pm

Sorry.. i forgot to indicate the legend... here it is.. black cells are the number of manpower from contractors who is present in a certain vessels..  you notice that under the BIG DADDY vessel and G&R contractor there are 3 rows.. sometimes it could be 4 rows, 5 rows, 2 rows..


Posted By: DBlank
Date Posted: 19 May 2009 at 11:26am

Is your actually data one column that has the number and type of employee together like your crosstab ("1W") or two columns with the type and # split out seperately?

This will change your design a bit but here is how to handle it.
If it is two columns add another grouping to your rows in the crosstab as the "worker type" field then sum on the employees # field.
If it is one column you will need 2 make two formulas to split it apart. Then add the formula that has the type as your grouping and sum on the other.
I can't write the formulas unless I know the exact data set up but most like you will just be able to use a left(field,1) and a right(field,1) to split it up. If you need help with that please post some sample data.


Posted By: _Wired_
Date Posted: 02 Jun 2009 at 12:28am
hi sir.. here's the sample data..



Posted By: DBlank
Date Posted: 02 Jun 2009 at 7:07am
I cannot see any data.


Posted By: _Wired_
Date Posted: 02 Jun 2009 at 7:20pm
you can't see any picture attached? even in my previews post? here's the linkof the sample data's >>> http://i42.tinypic.com/fema14.jpg .... and here's is the link for the output >>> http://i41.tinypic.com/34e6ja1.jpg
thanks


Posted By: DBlank
Date Posted: 02 Jun 2009 at 7:54pm
Odd. I could not see the pic at my work but I can see it using my home computer. IT must be using some filter there I was not aware of, anyway...
For your Crosstab set it up as:
Set your Column to use the CnName field.
Set your Rows to use the Vname and Pcode (Primary Vcode and secondary PCode).
Use the CountofWorker field as the field to Summarize as a SUM.
This won't look exactly like your original post request but I think it does what you need...
Hope it helps.


Posted By: _Wired_
Date Posted: 02 Jun 2009 at 10:04pm
thanks for the reply... there's no SUM on the summary.. only maximum, minimum, count,  distinct count, mode, Nth largest, Nth smallest, and Nth most frequent... sorry.. im new in CR.. :)


Posted By: _Wired_
Date Posted: 02 Jun 2009 at 11:06pm
sorry sorry... my bad.. i declare the "countofworkers" as text... hehehehe.. thanks for your help.... god bless


Posted By: _Wired_
Date Posted: 16 Jun 2009 at 7:39pm
i have another problem...

ORIGINAL CROSSTAB

direct link of the pic >> http://i39.tinypic.com/xqknir.jpg

I put two textobject and 3 lines:

direct link of the pic >> http://i41.tinypic.com/r8tf95.jpg

Here's the problem.. in the first page.. i can see the textobject and lines that I inserted.. but in the second page, it's gone.. what seems to be the problem on it? I put the crosstab in the report footer section.

direct link of the pic >>
http://i40.tinypic.com/2n1991j.jpg


Posted By: DBlank
Date Posted: 17 Jun 2009 at 4:03pm
Hey Wired,
I am not sure how you will be able to do this. The crosstab can be set to repeat the headers on each page but your text objects and lines are not technically part of the headers. They will not repeat unless they are part of the header.


Posted By: _Wired_
Date Posted: 17 Jun 2009 at 6:10pm
thanks for the reply...
i already figure it out.. just make another report footer section.. and put the objects that u want to show in the second page... just align it...
i don't know what will happen if there will be a third page... hehehehe
maybe make another report footer again.. hehehehe..

i hope this will help to those who has the same problem.. god bless..


Posted By: _Wired_
Date Posted: 23 Jun 2009 at 8:23pm
i have problem again.... im trying to put another crosstab.. but the number of employees messed up... it doesn't show the original count of the employee... im trying to sum up the grand totals of the two crosstab... BTW i inserted another database fields for the data of my second crosstab..


Posted By: DBlank
Date Posted: 24 Jun 2009 at 6:59am
Sorry, having trouble understanding exactly how you need this presented.
I saw your other post and would agree with lockwelle's response on that. The grnad totals in the crosstab can be garnered via another solution and those two solutions can be added via a formula. For example:
formula1 as SUM(table1.field1)
formula2 as COUNT(table2. fieldA)
formula 3 as formula1 + formula2 


Posted By: _Wired_
Date Posted: 24 Jun 2009 at 6:25pm
THANKS FOR THE REPLY.. THIS IS MY DATAFIELD



MY REPORT WITH 1 CROSSTAB



THEN I INSERT ANOTHER CROSSTAB... LOOK AT THE DATA'S ON MY FIRST CROSSTAB... IT CHANGED.. EVEN THE 2ND CROSSTAB IT DOESN'T GIVE ME THE EXACT DATA






Posted By: DBlank
Date Posted: 24 Jun 2009 at 7:08pm
By adding in the second table you increased your data lines (looks like by 4). Since your crosstab sums the data rows your numbers will increase.
YOu can delete crosstab2 and your numbers will still be too large in crosstab1. It was adding the table to the report that did it not adding the crosstab.
You may have to do this as a subreport. You can used shared variables to get a sum from table2 and move it to the main report and add it to a sum from table 1 in there.


Posted By: _Wired_
Date Posted: 24 Jun 2009 at 7:32pm
thanks.. how do i add the grand total of crosstab 1 and grandtotal of the subreport?


Posted By: DBlank
Date Posted: 24 Jun 2009 at 7:51pm
i don't know if you can get them into your crosstab but if you create a subreport in that subreport create a shared variable that has the SUM (or Count or whatever) of the field you want assigned to it.
IN your main report create that same shared variable.
You can do a SUM (or count of whatever) of the field you want in the main report.
Create a formula field in the main report that adds variable and summary field.



Print Page | Close Window