Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: dynamic Column in crystal report Post Reply Post New Topic
Author Message
yoha_03
Newbie
Newbie
Avatar

Joined: 10 Aug 2007
Online Status: Offline
Posts: 2
Quote yoha_03 Replybullet Topic: dynamic Column in crystal report
    Posted: 10 Aug 2007 at 12:41am
i want to create table in crystal report like this:

Name\Class

Class A

Class B

Class C

Class D

Person 1

Attend

Attend

Not Attend

Not Attend

Person 2

Not Attend

Attend

Attend

Attend

Person 3

Attend

Not Attend

Attend

Not Attend

Person 4

Not Attend

Attend

Not Attend

Attend


but i want the row and the column can be dynamic so if in database there are 6 class and 8 person so there will be 6column and 8row

I can't find any solution to create dynamic column like that
can someone help??
thanks
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 10 Aug 2007 at 7:01am
I am guess you are using two or three tables, something like persons and classes and attendance.
 
Looking at you what you want to present it seems that Crystal will already do what you want.
 
Here is a layout that might work
 
Group1Hdr {PersonName} -  Name\ClassTextLabel, ClassATextLabel, CllassBTextLabel, etc.
Details - {PersonName} {ClassAttend} {ClassBAttend} etc
 
Suprress the PersonName field in the GroupHeader and you should be close to what you want. If your {Class*Attend} needs to be a formula so it shows the words Attend or Not Attend we would need a bit more information. What in the database tells you the person has attended or not? Once you have that you create a formula that will return the text Attend or Not Attend as is appropriate. However not knowing what this is we cant give you a sample solution.
 
You may have reasons this will not work but those were not explained.  
 
Hope this helps.
 
Regards,
 
John W.
 
IP IP Logged
yoha_03
Newbie
Newbie
Avatar

Joined: 10 Aug 2007
Online Status: Offline
Posts: 2
Quote yoha_03 Replybullet Posted: 11 Aug 2007 at 7:13am
thanks for your reply, but the problem is in the header i want to make class name as the title, in each column..so maybe there are 10 - 100 column depend on how many class in my database

now i use cross tab table but it's difficult to edit anything in that cross tab
thanks
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 11 Aug 2007 at 9:00am
I am not certain how you would do this without some serious coding outside of the designer.
 
It seems to me that Crystal Reports does a very good job of laying out a report. It does a good job of dealing with presenting data to the user. In the end it is a fixed design.
 
As an alternative you will need to build a report that handles from 10 to a 100 columns anyway. So build the report to handle the maximum number of colums (100) and turn off (suppress the unused ones)you do not need for that particular report.  I suspect you could use the count function on a given field to determine which ones you need. 
 
I am curious though, 100 columns is a lot of report data.  In my opinion, it may be too much for the user to take in. My question solely based on curiousity is what will be the dimensions of the report. It must be large. Having said that is there a way to redesign the report, since I am sure a person doesnt take a hundred classes at once, perhaps using time frames as a basis. If you could it might make the whole thing a lot more managable.
 
Sorry I could not be of more help.
 
Regards,
 
John W.
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.