Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Report table name at runtime

Status
Not open for further replies.

newora

Programmer
Aug 19, 2003
133
GB
I wonder if someone could please help me with regards to an issue that I am having with Crystal Reports 6 (still yet to upgrade I am afraid).

I have created a report with just one Oracle database table on it. This table is effectively a 'template' table and at runtime when the user runs the report, I create a new dababase table from the template table and then fill the new table with the appropriate data.

I thus then want to tell the Crystal report that the table in the database has changed name (the new table is still in the same database schema). The new table name is exactly the same format as the template table, of course - is is just called something different.

I thought that I might be able to do this via the datafiles property of the Crystal report active X control, but it only seems to work for Acess databases, so I can see from the documenattion.

Maybe what I am trying to do is not possible, but any help / comments would be much appreciated.

Thanks
Newora
 
You should post technical information.

Such as how this table is being created?

I suggest that you change architecture, at the time of table creation, also rewrite a View that the report is based on to point to this new table.

Now you never need to reset the report, just the means by which you are creating database objects and which objects are created.

-k
 
Thanks for the reply.

The unique table is being created by the program
issuing an SQL command to the Oracle database (create table unique_table_name as select * from template_table_name). Currently I create the unique table name by appending the date/time to a base name, which I know could still cause problems, but I wanted to get some ideas developed/tested.

I apologise for being dumb but I do not understand when you say rewrite the view - I know what a view is but I am not using a view - I suppose I could and the use the view in the report. Is that that you mean and then change / modify the table name that the view selects into?

Thanks again for your help!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top