Skip to Content
avatar image
Former Member

Copy report, change tables, and export

We're about to undertake a major refactoring of the data tables used for our product. We'll be converting all of our standard (in-house) reports manually, but our customers are able to make custom reports of their own. Our goal is to create a conversion program that can open their rpt file, check a manifest file, change the table/fields, and save it as a new report.

For example, TABLE_ALL might contain "Field1, Field2, Field3, Field4", and a report is based on TABLE_ALL. I would want to change the Tables/Fields from





to be populated by 2 tables TABLE_1 {ID, Field1, Field2} and TABLE_2 {ID, Field3, Field4}, joined on ID.

I know how to do this at runtime using SetDataSource, but the goal is to change the rpt itself so that the next time the report is opened, it looks at the new tables and gets new data from them without something to manually populate the data at run time.

I've also been able to change the table name itself and save, but that only allows a 1:1 table substitution where the new table has the same columns as the old one, and doesn't allow joins.

I hope this makes sense...

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    May 11, 2017 at 02:20 PM

    Hi Joe,

    I updated the Tag to CR for VS.

    It's not possible, maybe....

    CR .NET SDK does not allow Field Mapping, what it does if it can't find the exact tables/fields it removes them from the report.

    Same as if you would be converting a mutliple table report to a Command, CR SDK and Designer are not able to do this.

    So their only option is to convert them manually using CR Designer like you did.

    The download WIKI for CR for VS is here:

    a ways down there is a link to get a Parameter sample app, in it there is a drop down function to get various parts of the report. It may help you a bit but what you are asking for our SDK's are not capable of doing it.

    What you could possibly do in code is Clone all of the objects and update them one by one with the .ADD or .Modify function. It may work for you but the amount of time you will use to develop may not justify the costs.

    You can find sample on our WIKI page for the RAS SDK to create new reports, that may help also:


    Add comment
    10|10000 characters needed characters exceeded