Solved

variable number columns in Crystal Reports 9

Posted on 2003-12-02
4
643 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
Comment Utility
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
Comment Utility
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_
Comment Utility


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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now