Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dynamic Grid Columns Post Reply Post New Topic
Author Message
BloodWist
Newbie
Newbie


Joined: 28 Jan 2011
Online Status: Offline
Posts: 3
Quote BloodWist Replybullet Topic: Dynamic Grid Columns
     Posted: 28 Jan 2011 at 2:08am
Hi everyone,

I want to know how do I create a Grid but with N columns (the number of columns depends on the user input). I think would be something like the basic repeat funcion of the CR but horizontally.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 31 Jan 2011 at 3:08am
I am guessing that these would be tied to fields in the data?  Are there also N of them?  If so, I doubt that you can do it.  The schema of the table is not set, and CR isn't too fond of changing schema.  If the number of fields has a fixed max, so that all the fields are know at design time, it might be possible...
 
I would dynamically move and resize the columns. I've done this once, and while it never went into production, it would have been a nightmare to maintain.
 
Good luck
IP IP Logged
BloodWist
Newbie
Newbie


Joined: 28 Jan 2011
Online Status: Offline
Posts: 3
Quote BloodWist Replybullet Posted: 31 Jan 2011 at 4:01am
In that case, I know that the "Next" function in formula gets the next register in the dataset, what about the one after this? I tried "Next(Next(field))" but it didn't work. How do I get the Nth element after the current?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 31 Jan 2011 at 6:32am
you can't.  Next and Previous only operate on the immediate row of data...it doesn't allow for recursive calls.
 
A sub report might work, but I doubt it.
 
To be fair, I don't think that there is any reporting tool out there that will do what you want.
 
IP IP Logged
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