admin.vizexperts Posted March 24, 2014 Share Posted March 24, 2014 Hello All,I am beginner in jsasper reports.I have created a report using ireport 5.5.0 and deploy it in jasperserver 5.5.0.I am able to run from my web application using REST API.Now i have a requirement to chagne the datasource reference at run time.More specific: Currently i am using the PostgreSql as a database.There might be requirement that i need to use MySQL (at run time) having database with same name and schema.So, pleaes tell me how can i change the datasource reference using REST webservice.Thanks Link to comment Share on other sites More sharing options...
hozawa Posted March 24, 2014 Share Posted March 24, 2014 Why don't use just create 2 reports to use as a data source- one using PostgreSQL as a resource and another using MySQL. In your report, just change the url to get the data. Link to comment Share on other sites More sharing options...
admin.vizexperts Posted March 24, 2014 Author Share Posted March 24, 2014 Thanks hozawa for your prompt reply. I can do this, but our requirement is to call same template but with different data source as per requirement. Link to comment Share on other sites More sharing options...
hozawa Posted March 24, 2014 Share Posted March 24, 2014 If your look at the jrxml file, you'll find that datasource is just a data in CDATA. Have you tried parameterizing it? That way you can just send parameters to switch. Link to comment Share on other sites More sharing options...
admin.vizexperts Posted March 25, 2014 Author Share Posted March 25, 2014 I am to parameterize the queryString, but not found any info for dataSourceReference. That we need to define at the time of deployment of report into jasperserver. In addition i have not added any datasource at the time of deployment. I have taken a parameter for datasource. From my web application I have passed the already added database(in jasperserver) reference to my xmlstring. But it is showing blank report. Link to comment Share on other sites More sharing options...
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