Solved

variable number columns in Crystal Reports 9

Posted on 2003-12-02
4
666 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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