Jump to content
We've recently updated our Privacy Statement, available here ×

Let user choose DataSource at runtime


snoopyf

Recommended Posts

Hi everybody,

I'm searching for a possibility to let the user choose the DataSource for a report when he runs it. This should be done by presenting him a drop down list of available DataSources as a Parameter.

How could this be achieved?

Thx for any hint!

Snoopy

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...
Hi guys, Maybe is too late, but maybe some dude get this trouble in a future xD

 

Finally I've found a different solution, Is quite strange. I'm sending a DataSourceID parameter...

 

And In SQL Editor something like this

  DECLARE @cDBName VARCHAR(100)

  DECLARE @iDSNumber INTEGER

 

 SET @iDSNumber = $P{DataSourceNumber}

 

IF @iDSNumber = 1 

  SET @cDBName = 'Contoso'

ELSE

  SET @cDBName = 'Fabrikam'

 

EXEC (@cDBName + '.dbo.Procedure ' + '[' + @cCustName + '], ' + @iCountry)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...