oscar16071987 Posted April 28, 2014 Posted April 28, 2014 Hi guys!, I'm trying to find the parameter for switch the datasource dynamically, It's possible? Thanks for help me Best regards Oscar Romero
ybablyuk Posted April 30, 2014 Posted April 30, 2014 Hi Oscar,You can try use parameter $P{REPORT_CONNECTION} for change datasource dynamically.
oscar16071987 Posted April 30, 2014 Author Posted April 30, 2014 Thanks for help me yurab. Currently I have this JasperServer version: Product Version: 4.7.0 Build: 20120815_1737 But the parameter is ignored or something else, We are using the same report for 2 different databases. I'm sending the parameters like this... http:// localhost/doreport.php?uri=/reports/customers/s04&PARAM_dm=0&format=PDF&PARAM_REPORT_CONNECTION=DATA_SOURCE_NAME I'm using a PHP Library and PARAM_XXX is required for this lib. Everything works only the REPORT_CONNECTION it doesn't. Thanks for your help Best regards, Oscar Romero
oscar16071987 Posted May 2, 2014 Author Posted May 2, 2014 Thanks for help me yurab. 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)
massimo.loporchio Posted May 4, 2016 Posted May 4, 2016 If you whant to know report->datasource dependencies use this query : select * from jireportunit, jijndijdbcdatasource, jiresource where reportDataSource = jijndijdbcdatasource.id and jndiName='jdbc/mysourcename' and jireportunit.id=jiresource.id ;
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now