Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove database name 6

Status
Not open for further replies.

Willie78

Technical User
Jun 4, 2004
67
GB
I'm having a nightmare with crystal reports 9. I write reports based on a sql database. The reports are used as templates.

The Templates are distributed with our product. Therefore the database name changes from company to company.


Now for ny problem
In CR v8 it was possible to remove a database name. In v9 I can edit the name using F2 on the initial catalog. changing this kinda works but it isn't possible to do this on my subreports.

I hope i have explained myself well.

Cheers

Paul
 
Paul,

It's a nightmare that never ends. I spent days and weeks trying to get an answer to this question. After much digging of my own, help from usergroups, and many calls to Crystal, it eventually boiled down to this...

1) In CR 8.5 it was doable because CR 8.5 used the Native SQL driver. Something about this connection made it possible.

2) When CR wrote version 9.0 they apparently found some circumstances where you could possibly get ironeous data sets from the database when the Native SQL driver was used.

3) CR decided that it was better to not allow that type of connection then to allow possible wrong/incomplete data to show up on the reports (I have never had any problem with wrong or incomplete data other than stupid programming mistakes on my part).

4) CR now requires the use of a non-native connection to SQL.

On a related topic, I tried various ways of changing the database connection through my application but never could find a way that worked. I'm kinda leaning towards it being related to this second observation:

a) In 8.5 you used to be able to programatically add existing reports as subreports to another report.

b) CR decided that that feature required $80,000 in liscencing per installation of our software.

c) when CR 9.0 came out, this abbility had been removed.

How do we handle these problems today? We still develop the basic report in version 8.5. We link it to the existing stored procedure, strip off the database name, throw all the fields into the detail section, save the report, and open it in version 9.0 for the final touch ups. One problem is that it can never be taken back to version 8.5. The only reason we're using 9.0 is that the've cleaned up some other issues with 8.5 such as conditional subtotals and some other things I can't even remember. As far as adding subreports programmatically, we had to give that up completely. The two instances in which we use that within our application now have to be developed uniquely for each client.

I've been hoping that when we upgrade to a newer version, we'll be able to go back to using the native driver for SQL and that that problem will be resolved. However, we've now got other things on our plate which have kept me from exploring CR 10.0.

Good luck. I wish I had better news.

Stacey
 
Thank you Stacey

Time to give up then..... On to v10 and see what they forgot to put in that version LOL.

Cheers

Paul
 
I agree that it's a pain in CR9, but not impossible. There are a few whitepapers on this at the BO site, as this wasn't possible with the earlier builds of CR9. If you're using CR 9.2.2.693 (after service packs), it should be possible:

It can also be done programatically by setting the report's ConnectionProperties at runtime. This document describes several scenarios for setting/changing db's at runtime for many different connection types:

-dave
 
Dave,

The info in the 1st link you provided is news to me. Thanks & a Star... :eek:)

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Dave

Thanks for the advise. I'm running v 9.2.2.634. I can clear the database name and the location of my main reports.

The thing is the sub-reports. They can't be changed as far as i can tell.

This has been a mess. I thought the upgrade would be better. LOL

Cheers

Paul
 
DAVE!
A star from me too. I guess it's not always good to be on the "cutting edge". At the time I was researching this, Crystal didn't have ANY service packs to v9. I'll give it a try.
Stacey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top