Solved

Wrapping Crosstabs

Posted on 2014-04-22
9
192 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

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

http://scn.sap.com/message/8345958#8345958
0
 
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

810 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