Renaming tables in Crystal Reports
From the May 2010 GP Reports Viewer newsletter comes a tip for renaming the tables (or views or stored procedures) on Crystal Reports. Some may ask why this in needed – I actually use this quite a bit in the following scenario.
I often find that I am using one report as a template for another when working with Dynamics GP tables because the table structure is the same for many work, open and history tables. For example, if I am creating two versions of an SOP invoice – unposted and posted – most of the tables and fields are the same except for the two main tables. In that case, I just need to change SOP10100 to SOP30200 and SOP10200 to SOP30300. This is pretty straight forward to do in Crystal, however the name of the changed tables will still show with the original name almost everywhere, which can be quite confusing, especially when others may be working on the reports after you are done with them. You can change the display name of any table, view or stored procedure on a Crystal Report using the steps below.
Let’s start at the beginning. I have an SOP Unposted Transaction report that pulls from the following tables, shown in Crystal’s Field Explorer:
I update the tables by going to Database > Set Datasouce Location, selecting the table I want to change under Current Data Source, selecting the table to replace it with under Replace with and clicking Update: 
I repeat these steps for every table I need to change, however the list at the top (under Current Data Source) looks unchanged. Only if I expand the Properties for each table will I see the actual table name:
In Field Explorer I still see the old table names. Very confusing, especially when I come back and work on this months or years after the fact. So how do I change this? Here are the steps:
Open the Database Expert (Database > Database Expert) and find the table in the list on the right under Selected Tables:
Right click on the table, choose Rename:
Click OK when done. You will see the updated names in Field Explorer immediately:
If you would like to see more tips like this, take a look at our GP Reports Viewer newsletter archive. We have recently added a section for SSRS tips to the newsletter, so take a peek at those if you are starting to work with SSRS. If you are looking to print Crystal and SSRS reports in Dynamics GP, check out our GP Reports Viewer. We have demo videos and fully functional downloads available.
Filed under: Crystal Reports, Crystal tips for GP Tagged: Crystal Reports, GP Reports Viewer
This was originally posted here.

Like
Report
*This post is locked for comments