on ‎2022 Jul 24 6:16 PM
RPT designed for Informix does not work with PostgreSQL.
Detail:
I am using Crystal 2020 to design RPT files. Initially RPTs were designed for Informix database and linked Informix stored procedure into the report.
Then we wrote a C# application to load RPT files and dynamically loaded Informix ODBC Data Source to print the report. Report printed successfully and no issue at all with Informix. Similarly we have designed 500 reports and all were working perfectly with Informix ODBC driver data source.
Now the requirement is changed and customer want to use PostgreSQL database. We used same RPTs designed for Informix and provided PostgreSQL ODBC data source in C# application and then tried to print reports but all the reports are empty. My understanding is that the Crystal report is database independent and same RPT file will work with all databases if we dynamically providing/loading ODBC data source (DSN).
I tried to figure out the root cause and opened RPT in Crystal 2020 and linked similar function from PostgreSQL. Now I noticed that the returned fields name from stored procedure does not have any suffix ":n" while ":n" suffix is added to the field names returned by the Informix's stored procedures. And I think Crystal RPT expect exact same field name with suffix (:1,:2,:3..) in report to display because same fields are used in report to display. To make Informix's RPT work with PostgreSQL I have to manually replace all field name in RPT with new one (like ddr_key1:1 to ddr_key1 and batch_key1:1 to batch_key1)
Attaching Screenshot:

Please help me to design a universal RPT which could work with all Data Bases or could print crystal report after dynamically loading any ODBC data Source from different database. I am not sure if that possible with Crystal Report.
So the point is I don't want to redesign all 500+ reports again or replace field name everywhere in each and every RPT files which were designed for Informix and were working perfectly with Informix.
I want to design single RPT file that could work with all databases without any major changes or redesigning RPTs.
Request clarification before answering.
What happens if you replace the connection in CR Designer?
If it works without the Field Mapping UI popup then ReplaceConnection should work for you.
If the Field MApping UI pop's up then only option is to fix each report manually.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.