Solved

variable number columns in Crystal Reports 9

Posted on 2003-12-02
4
660 Views
Last Modified: 2011-09-20
Im trying to create a report that its number of columns vary depending on which company it is based on. Does anybody know if it is possible?

For example.: Say we have 4 companies who require reporting on their customers who ring up and answer questions during an interview. Each company will have a different number of questions and therefore each company will require a different number of columns as the users would like the report to be set out as :

Company Name     Company Code     Question 1         Question 2           Question 3
Company 1            CC1                    Answer 1           Answer 2             Answer 3

At the moment i only know how to show the questions and answers in row format as this is simple using the group option but we rreally need to be able to show it in the above format.

Can anyone Help?
0
Comment
Question by:sbarwood
4 Comments
 
LVL 3

Accepted Solution

by:
AnnetteHarper earned 300 total points
ID: 9858428
You should be able to do this using a crosstab report if your data is structured like this...

Company Name, Company Code, Question Number, Answer

Then create the crosstab and put Question Number in the Columns area, Company Name and Company Code in the Rows area, and Answer in the Summary Fields area. (If your answer is text, you might need to set the summary type to minimum or maximum.)

If your data format has separate fields for each Question, then you will need to normalize it with a view first.
0
 
LVL 7

Expert Comment

by:mnye
ID: 9858454
How about this.  Group By Company and Company code then in the details section print out the questions. check out this question I answered yesterday, i gave him the solution I think you're looking for.  If not let me know.

http://www.experts-exchange.com/Databases/Crystal_Reports/Q_20809445.html

hth
matt
0
 
LVL 22

Expert Comment

by:_TAD_
ID: 9859536


you can always create a simple formula that pulls in all of the columns for every company.  Then... depending on if the value is null or not you can choose to make the column visible or not.
0
 
LVL 1

Expert Comment

by:klutza
ID: 9879238
I agree with AnnetteHarper's solution, but you might want to separate the companies by inserting a Group by Company and placing the crosstab at the Group Header/Footer. That way you can see the accurate number of columns for questions of each company.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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