Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dynamic Colums Post Reply Post New Topic
Author Message
MZee
Newbie
Newbie
Avatar

Joined: 26 Nov 2012
Online Status: Offline
Posts: 1
Quote MZee Replybullet Topic: Dynamic Colums
    Posted: 26 Nov 2012 at 1:09am
Hi There,


I've a req to build a crystal report(I'm using VS 2012). Column headers should be dynamic.

ex:-
Report should be like this

Empl   Dep1     Dep2    Dep3 (One possiblility)
Empl   Dep2     Dep 3   Dep 4 (Anothe possibility)


Empl   Dep 1   Dep2   Dep3......These are the column headers(caption) data will be in Detail section.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 26 Nov 2012 at 4:33am
CR won't allow dynamic columns...as that would imply that the schema is changing, and CR doesn't like that.
 
What you can do is using a stored procedure, return 2 tables.  the first table has the data, with values for each of the columns, the second table has the name of the columns....
 
or you could do a crosstab style report,
 
or actually looking at the sample a bit closer,
 
the stored proc could return the names of the columns for each employee in a 'header' table and the data in a 'detail' table that is linked by the employeeID or something like that .
 
Hope one of these ideas helps.
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.047 seconds.