Solved

Wrapping Crosstabs

Posted on 2014-04-22
9
191 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

14 Experts available now in Live!

Get 1:1 Help Now