Solved

Wrapping Crosstabs

Posted on 2014-04-22
9
203 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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 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 101

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

627 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