Solved

variable number columns in Crystal Reports 9

Posted on 2003-12-02
4
654 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

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. …
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…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

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