deadsploid Posted April 12, 2023 Share Posted April 12, 2023 Hello, I am using Jasperserver version 8.1.1 and I want to generate a report via URL, but when I specify the data source in jdbc_datasource, my report is empty. However, the data source is entered correctly and if I use this data source in the report itself, it works fine, but not through jdbc_datasource. What could be the problem?Here is the URL: http://localhost:8080/jasperserver/rest_v2/reports/Reports/TEST/UAF.pdf?&j_username=a&j_password=a&jdbc_datasource=TESTI have read the Authentication Cookbook and JasperReports Server Administrator Guide, but still could not find the issue. Link to comment Share on other sites More sharing options...
anish.rai Posted April 12, 2023 Share Posted April 12, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
deadsploid Posted April 13, 2023 Author Share Posted April 13, 2023 Hello, I will wait for your answer) Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted April 24, 2023 Share Posted April 24, 2023 Hello,When you deploy a report to JRS (JasperReports Server) from JSS (Jaspersoft Studio) you also need to link the report to a data source connection already created on the server.The report deployed on the server will (generally not use the data adaptor from the Studio although there are a couple of exceptions.Creating the datasource connection in JRS is described at https://community.jaspersoft.com/documentation/tibco-jasperreports-server-community-project-administrator-guide/v80/jdbc-data-sources#kanchor180To use a JRS datasource connection in a report you may:do it from JSS when publishing it in the server as described at https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v8/publishing-report-jasperreports-server#kanchor275or you may define it in the settings (right click on the report and press edit from the repository) as described at https://community.jaspersoft.com/documentation/tibco-jasperreports-server-community-project-administrator-guide/v80/jasperreportPlease let me know if you need more info otherwise please marked this answer as the correct answer. Link to comment Share on other sites More sharing options...
deadsploid Posted April 27, 2023 Author Share Posted April 27, 2023 Hello rpeguet Thanks for the answer, but that's a little off the mark. I have data sources and a report connected to them, but the problem is that there are 14 data sources and this report should work in all sources. that is, in order to receive the required amount of information, I need to create 14 copies of the report and connect it to different sources. I would like to ask you for help, maybe you know how you can dynamically connect to sources or how to make it easier to add 14 copies and connect to the same number of sources. There are a lot of such reports and it will take a lot of time to add each one manually. Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted April 27, 2023 Share Posted April 27, 2023 Hi Deadsploid,In your case then you need to make the datasource connection used by the report dynamic using profile attributes.This is described in Chapter 4.1 Attributes in Data Source Definitions of the Admin guide.This means you will need to have different users for each database so that the same report can run against a different DB based on the logged in User ID. Would that work for you?It is currently not possible to set the datasource connection through a parameter value so the alternative would be to build your own datasource connection and make it dynamic as you prefer.I hope this helps, Link to comment Share on other sites More sharing options...
deadsploid Posted April 27, 2023 Author Share Posted April 27, 2023 I'm sorry to distract you again. I read this section, but I didn't understand anything. Do I need an account in the database and on the jasperserver to have the same names ? If you don't mind, please describe. Thank you very much in advance and I sincerely apologize Link to comment Share on other sites More sharing options...
Solution Raphaël Peguet Posted April 27, 2023 Solution Share Posted April 27, 2023 No worries, I am happy to help.The users in JRS don't need to be the same as the DB users, you create the users in JRS as you prefer and several users will use the same DB connection if they share the same profile attributes values defining the DB connection info.I have created a sample in my github at https://github.com/raphpeguet/JRS-demo-dynamic-DB-connection but I'm not sure if the import in the community edition of JRS will work since the export was done from the enterprise edition. If it doesn't work maybe you could create a new JRS instance using the free trial environment with the installer you get from jaspersoft.com/download.I hope this helps,Thank you for upvoting, downvoting or selecting the best answers in this thread to help us improve the experience on this forum. Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted May 3, 2023 Share Posted May 3, 2023 I'm unsure to understand your last question.You can map you DB users with JRS users the way you'd like. Of course we can only use 1 DB user to connect to the data and build a report so it's a x-1 relationship where 1 to many JRS users can share the same DB connections. 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