|
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...
|