cancel
Showing results for 
Search instead for 
Did you mean: 

Changing connection type at runtime

Former Member
0 Kudos

Hello, I am experiencing some strange issues here.

I guess it all comes down to this: If we create a report in Crystal Reports that uses a data source of specific type (let' say ODBC) can we specify at different data source (and type - let's say a custom one like crdb_ado) at runtime?

I am currently trying this and I am getting connection refused errors. Any advice?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Need more info...

What do you mean by "runtime" in CR Designer, in an application using the SDK's or in BOE?

Don

Former Member
0 Kudos

Hi Don,

Thanks for the reply! Not in CR Designer but afterwards when the report is deployed in BOE.

In BOE CMC 4.0 I thought I can go to Database Configuration for the report and change the default database to configuration settings. For example: if default connection type was ODBC and I change that to a custom one using crdb_ado and run the report right there within CMC, it fails.

Similarly if I try to run it through the java SDK, the run launches but again fails (when I checked status in CMC).

Same issue vise-versa, if report was created with OLEDB/ADO in CR Designer and I try above steps to run as ODBC.

0 Kudos

Thanks for clarifying.

No, Setting location will sometimes work if you change the DB source from one type to another but typically if you create a Report based on Oracle then in BOE it will work by simply setting the new Oracle Server info.

There is a lot of parts in a report that are dynamically created and configured based on the data source. Changing them mid stream won't always work.... and typically doesn't.

CR assumes when you puiblish a report it is finshed and works against that type/name brand DB it was created off of.

Another reason is some drivers don't support what others do so if you change the data source you lose that functionality and thus renders the report useless and will generate an error.

Don

Former Member
0 Kudos

This certainly makes sense, thanks for the clear answer.

Last part that I am a bit confused about is why the dropdown is there. In CMC, when I go to the published report properties and I change from default database configuration to custom, it allows me to select another connection type from the dropdown (DB2, Oracle, ODBC, Informix, etc). What's the point of this if the connection type is not interchangeable (Except for server info ie host/port/username/pass/table-prefix)

Is it simply a matter of SOME connection types being interchangeable and others not (at runtime) ?

Again, thanks for your time.

0 Kudos

Yes and No.... It's likely due to the Change Wizard doesn't read the original source, because it's dynamic, BOE can't determine what the original source type was, other than generic SQL or PC types etc.. So it's simply easier for BOE to fill the drop down list with what ever we support. Sometimes it can also dynamic, if CR can't find the Client it won't list the DB.

In this case also those types are likely hard coded into the Wizard. Makes it easier to maintain and a lot less work for the Logic...

Thanks again

Don

Former Member
0 Kudos

Thanks for the clarification Don. Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

You can create two connections of different type in Business View Manager and then create a Dynamic Data Connection on top of them.

Create other layers like Data Foundation ,Business Element and Business View on top of that.

you can use the Business View for reporting. It will prompt you to choose the DataConnection at runtime

Hope this helps

Regards,

Shantanu