Prompting for a different data source in Crystal Reports 10

180 views Asked by At

G'day!

I'm using a command to bring up information from our main pay database. This part of the report is working just fine.

I'd like to be able to prompt the user to specify their datasource location using a parameter field, in case they'd like to be able to use one of their pay test databases. Kind of like prompting for a date, but being able to connect to a different database.

Is there a way to do this? I'd thought maybe creating a {?source} parameter field in the command, and beginning the command with USE {?source}, but it doesn't really feel right, or like it would work as I'm basically trying to change the current connection through code.

Thanks for your time!

1

There are 1 answers

0
Lan On

This is possible but the moment when the report is started will be too late to set the datasource. You can create some logic in your app to get the desired datasource and when the user starts the report you will set it