Solved

Wrapping Crosstabs

Posted on 2014-04-22
9
189 Views
Last Modified: 2014-05-06
I have a report that shows panels of tests run.  Each panel can have 2 tests or 20 tests.
My problem is when there are say, more than 6 tests, the crosstab runs across the page.  I've been searching for a way to make the crosstab wrap and so far everything I have found seems very complicated.

Do any of you know how to make a crosstab wrap so it's something like

client ID      Test 1     Test 2     Test 3    Test 4   Test 5
xxxa               Pos         Neg         Neg       Pos       Neg
xxxb               Neg         Neg        Neg        Neg      Neg

Then start another crosstab below this one with Test 6 and so on?

Maybe create groups where column number is in 1-6, then Group A, column number in 7-12, then Group B?

Is that even doable?
0
Comment
Question by:CAHFS
9 Comments
 
LVL 18

Expert Comment

by:vasto
ID: 40016423
Groups will work. if the value for the transposed field is in (Test 1     Test 2     Test 3    Test 4   Test 5) = Group A, else ...
0
 

Author Comment

by:CAHFS
ID: 40016464
Except I don't really have test 1, test 2, etc. It's the actual test names that make up the column headers.  That's why I thought maybe if there was a way to count columns?  
I just created a formula that said:
whileprintingrecords;
If count({C_SIMPLE_RESULTS_V.TESTCODE}, {C_SIMPLE_RESULTS_V.PANELID}) in [1,2,3,4,5,6] then '1-st part'
else '2-nd part'

but i couldn't set it as a group and when i tried setting it as a top level column header, it just made one big group called 2-nd part...  Probably because I had it count instead of actually listing the column number but I can't seem to figure out how to do that.
0
 
LVL 18

Expert Comment

by:vasto
ID: 40016505
I don't think whileprintingrecords will work for this scenario. You need to create a field which will have a rank value, this should be done in SQL. Then create a group on this field and place one cross tab in each group

What is your database ?
0
 

Author Comment

by:CAHFS
ID: 40016598
I think I found something that works

http://scn.sap.com/message/8345958#8345958
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 34

Assisted Solution

by:James0628
James0628 earned 150 total points
ID: 40017108
FWIW, your idea to use Count (in post 40016464) wouldn't work, because Count always gives you a total.  It's not an ongoing count.  So, for example, Count ({TESTCODE}, {PANELID}) would just tell you the total number of records in the current PANELID group.

 James
0
 

Author Comment

by:CAHFS
ID: 40027939
Well, my solution was short-lived.

i'm not quite sure what it's counting but it seems to count values within the columns maybe?

It worked great when i had one animal.  But as soon as I entered 2, it started acting wonky. Right now i have the formula supposedly counting 11 columns.  What I think it's doing instead is counting 11 cells because if you notice, I have 11 results.  the "second table" starts with test L.pom MAT's Pending result.  

Any ideas?

screen shot
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 150 total points
ID: 40027967
DO you have 1 record with all the tests or do you have 1 record per test?

mlmcc
0
 

Accepted Solution

by:
CAHFS earned 0 total points
ID: 40027986
1 record per test.

ok, think i got it now, unless you see something wrong with this.  
Found something at http://www.logicaltrinkets.com/wordpress/?tag=crystal-reports


Adapted these so instead of months, i'm using my test names, and instead of 3 columns, i'm using 6,  and it seems to be working out so far.

1. Create a @EachXXX formula

WhileReadingRecords;
if StrCmp (Global StringVar PrevMonth, {Command.MONTH}) <> 0 then
  Global Numbervar MonthNo := MonthNo + 1;
;
Global StringVar PrevMonth := {Command.MONTH};
2. Create a @GroupXXX formula

EvaluateAfter ({@EachMonth});
Global Numbervar MonthNo;
Int((MonthNo - 1)/3)
0
 

Author Closing Comment

by:CAHFS
ID: 40043934
Giving everyone points, feel this was a joint effort :)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now