Solved

variable number columns in Crystal Reports 9

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

724 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