cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal reports 7 report with Crystal for VS 2013

Former Member
0 Kudos

When using an old Crystal reports 7 report within a new Visual studio project and Crystal reports For VS 2013, we are not able to change the data source no matter what we try. We removed parameters from the report and cleared all the check boxes related to saving data with the report without success. The report always displays the data that the original SQL query retrieves. The data set we provide through the code has no effect whatsoever. There is no way, as was previously possible, to change the SQL query directly.

The query in question accesses 10 tables and we provide a single data set with the result stored in a single table object. Attempting to change the table object name to one of the database table names causes the application to hang.

Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Yaron

My prefered way to test these reports would be to see if they work in the CRystal Reports 2013 9v. 14.1.x) designer before provceeding to work with the report in a .NET app. An eval of CR 2013 designer can be downloaded from here:

SME Free Trials | SME Software | SAP

However as Brian mentioned, doing such a huge version skip update may be quite futile...

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Got Enhancement ideas? Use the SAP Idea Place

Former Member
0 Kudos

As I replied to Brian, we will try this.

0 Kudos

Hi Yaron,

Do you have CR 7 installed on the same PC and your .NET app? If so that won't work properly, CR 7 was not side by side supported, meaning you cannot have CR 7 and any other version of CR or CR runtime installed on the same PC.

If you do rename the c:\windows\Crystal folder to anything else. This way CR for ,NET can't find it, also need to rename crpe32.dll located in \windows\system32 folder.

Best to install VS and CR for VS on a new PC that has never had an older verison of CR installed on it. Our installer back then never cleaned up properly on uninstall, actually it was issues in MSIExec...

What was the original CR 7 reports database driver, ODBC, OLE DB, Native SQL or???? or a Query Builder data source?

If CR cannot find the original database source can default to either the Xbase driver or it may try to connect via ODBC. It get complicated depending on the original data source. And may explain why you can't change it.

Can you attach the report? I can run it through my test app and possibly get some details from it to help determine the best upgrade path.

Rename the report to *.txt and then use the advanced editor to attach it. Don't zip it up, SCN will zip it for you and it will not zip a zip file.

Don

Former Member
0 Kudos
  • The report uses Microsoft ODBC for Oracle. The DSN (and driver) is installed on both machines.
  • We do not have CR 7 and any newer version of CR (either 2013 standalone of for VS) on the same machine. However we do have CR 2013 and CR for VS on the same machine.
  • I opened the report in CR 2013 on another machine and cleared the "Save data with report" check box under the File menu. This machine does NOT currently have the required drivers (Oracle client) to verify and preview the report, but the save operation succeeded and the file format is changed to 14 instead of 7.

None of this changed anything. The report object continues to have the HasSavedData property set to True and the HasRecords property set to False - and no new data is displayed.

I should mention that the SQL query involves 10 tables.

DellSC
Active Contributor
0 Kudos

From personal experience - if you made ANY manual changes to the query generated by joining tables in Crystal 8.5 or earlier or if your if your query was completely manual with no linked tables, it will not work in newer versions of Crystal.  There were some MAJOR changes to the internal structure of the .rpt file with Crystal 9 and at that point the ability to manually edit the SQL generated by Crystal went away.  It was replaced by the "Command" feature that allows you to write your own SQL for a report.  However, there is no way to automatically convert one to the other.  I can remember a project  in 2006 where we had three people take 2-3 weeks to re-write almost all of our reports (175-ish) from scratch to get around this issue when we upgraded from 8.5 to XIr2.

-Dell

Former Member
0 Kudos

That is what I am afraid of and why we seek an alternate option, but I take into consideration the fact that it might just be impossible to find one.

Former Member
0 Kudos

Currently we have been able to use the Command feature to make the report respond to new queries defined in our code, so thank you very much for that suggestion, Dell!

Answers (1)

Answers (1)

former_member292966
Active Contributor
0 Kudos

Hi Yaron,

That is a huge jump from 7 to 13 and the possibility of it working are pretty small but maybe not impossible.  The database engine has changed a lot between those versions and I believe that is part of the problem. 

A couple of things you can try but I'm not sure if it will help: 

1)  Make sure Save Data with Report is not set in the report.  This is a common reason why reports keep returning the same records, even after the dataset is changed. 

2)  If you have a stand alone version of Crystal Reports, any version other than the Visual Studio version, open the report in there and try to change the tables and resave the report. 

3)  Make a gradual upgrade of the report to accommodate the in between versions.  Go from 7 to 9, 9 to XI, XI to 13.  This is a bit more difficult because you'd have to have those versions. 

4)  Make sure you have verified the database in the report.  That usually fixes most issues but I'm skeptical about that too. 

Good luck,

Brian

Former Member
0 Kudos

1. Already done

2. We will try this.

3. That seems overly complicated.

4. Already done.

I should mention we need to handle about 130 reports...

Thanks for the pointers nonetheless!

Former Member
0 Kudos

Any idea how to get trial versions of CR 9 and XI?

0 Kudos

Hi Yaron,

No longer available from SAP download pages.

The MS Oracle driver only supported up to Oracle 7. Have you tried using the Set Location and updating the ODBC connection info to a DSN using Oracles ODBC driver?

Can you attach a report? I'll ahve a loot and see what it's doing, possibly there is some SDK API to change them.

Don

Former Member
0 Kudos

The Microsoft Oracle Driver works on the original machine (it is a Windows 2003 server).

The Oracle server's version is 10 here and 11 at the client's location.

I created a new ODBC DSN in the new machine that uses the Oracle ODBC driver and updated the report. I even changed the way the DataSet is created in the .net code to use the same exact ODBC DSN. The report still seems to use saved data.

As far as I understand, once you have a DataSet filled with data, the ReportDocument object should not care where it came from. So why would it even bother with logon information and be sensitive to whether it was retrieved using ODBC or something else?

0 Kudos

Can you attach one of those reports?

Click the Use advanced editor top right corner and rename your report from *.rpt to *.txt and attach it.

I'll have a look at it.

Correct, CR should not care what the report data source is when using a DS. But there are update routines when opening legacy report files in CR and the SDK and this may be the cause.

Don

Former Member
0 Kudos

I need to create a version of the report that I can pass to you, I hope to do that in a day or two.

In the meantime, can you expand on those upgrade routines? Is that something we can invoke ourselves? Would it have to be done on each and every one of the reports (I remind you that we have ~130 of those)?

0 Kudos

Hi Yaron,

I don't want an updated report, I want the version 7 report so I can see what is happening to it in our SDK.

No, none of the update routines are exposed for your use.

Don

PS - I don't need data either. if you can't save it in CR 7 then let me know and I'll  send you my direct e-mail address to send it to me with data. I'm covered under NDA so not data will be used but if they are Medical or other sensitive data then of course that is not covered under our NDA.

Former Member
0 Kudos

I am not talking about an upgraded version of the report but rather a Crystal reports 7 version with sensitive data removed. The database driver, report structure and version will remain the same.

0 Kudos

Ah good, that is what I suspected but wanted to be sure.

If you uncheck the Saved Data with report in CR Designer 7 does it not remove the data? Then view it again in CR does it show no data?

And yes I know you ahve a lot of reports, that why I wanted to get one to see what is happenign in the SDK.

Don

Former Member
0 Kudos

Here is a sample report.