Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Displaying Array Variables as separate fields Post Reply Post New Topic
Author Message
DJester
Newbie
Newbie
Avatar

Joined: 08 Sep 2008
Online Status: Offline
Posts: 7
Quote DJester Replybullet Topic: Displaying Array Variables as separate fields
     Posted: 08 Sep 2008 at 3:40pm
I use Crystal Reports 9 to design reports for our clients.  Our software is based on an MS Access database, and is basically a CRM.  The database has the same structure for everyone, so I can create any report using a "dummy" database, and the report gets ran on their database when they run the report.
There is one exception, each client may have a table (or tables) that have their own unique name, and a random number of fields.  Until now, the only solution to create reports to display info from these tables is to get the specific database in and design the report from that.

I'm working on a solution to this.  The proposed solution is for the software to copy the contents of the requested table into a temporary table before the report is ran.  I can design the report to pull from this temp table.  Because the number of fields is still unknown, I was thinking that the fields from the requested table could be combined into a single field, delimited by a specific character.

I would have, now, a table like this as an example:

ClientName, ClientID, TempField
Client A      , 01        , "Field1;Field2;Field3;Field4"

Using the Split() command, I can separate all the values from that single field into an array.  This array (with the above example) will have 4 values: "Field1", "Field2", "Field3", and "Field4".

Now, how can I display this info on the report?  Can I treat each variable in the array as a field?  Keep in mind that as I design this, that array can have any number of variables in it. 

Thanks for you help...
IP IP Logged
DJester
Newbie
Newbie
Avatar

Joined: 08 Sep 2008
Online Status: Offline
Posts: 7
Quote DJester Replybullet Posted: 10 Sep 2008 at 2:59pm
Come on... there must be someway to display all the variables in an array on a report.  Anyone?
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