Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Wrapping Crosstabs

Posted on 2014-04-22
9
Medium Priority
?
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 

Author Comment

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

http://scn.sap.com/message/8345958#8345958
0
 
LVL 35

Assisted Solution

by:James0628
James0628 earned 600 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 101

Assisted Solution

by:mlmcc
mlmcc earned 600 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

671 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