Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Table Names Change Post Reply Post New Topic
Author Message
chris.solan
Newbie
Newbie
Avatar

Joined: 10 Sep 2012
Location: United States
Online Status: Offline
Posts: 3
Quote chris.solan Replybullet Topic: Table Names Change
     Posted: 01 Aug 2013 at 2:26am
Hello Everyone,
Here is the situation. I have to pull a crystal report every day from a single table on a database. This process needs to be automated. I have no issues with the crystal report data, or the automation, the issue is that every day the table I need to pull the data from changes. It changes in a predictable pattern, journal_yyyymmdd, but the table name does change. The fields inside the table remain the same, just the table name changes. How can I add this logic to the crystal report itself so it will change which table it reads from every day? Thanks in advance for any help you can provide.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Aug 2013 at 5:11am
use a stored procedure to read the table and return the results to your report...this way the table name in the report doesn't change.

The stored procedure can have logic to select from different tables using dynamic sql.

HTH
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