I have a Jasper report server (installed on www.example.com ) and a separate Java / JSP application (installed on www.example.net ), and I use various report generation options.
Option 1 (current working solution)
My current working solution is that the user logs into the Java / JSP application and selects the report. The application creates an XML representation of the report, which it saves as fileNameXML , and then sends it to the Jasper report server using the following code:
<IFRAME height="600" width="1000" src="https://www.example.com/jasperserver/flow.html? _flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow& ParentFolderUri=%2Freports& reportUnit=%2Freports%2FExample_Report_2&j_username=user& j_password=password& net.sf.jasperreports.xml.source=https://www.example.net/<%=fileNameXML%>"> </IFRAME>
(Note that even if I pass the username and password in the URL, security is not compromised because filenameXML is created using String fileName = UUID.randomUUID().toString() + fileExt; )
Option 2
I connect the Jasper Reports server directly to the SQL Server database at www.example.net and create reports this way. The disadvantage of this approach is that (a) I would need to configure all users in Jasper reports (b) I would need to pass parameters consciously so that each user can only access their own data (c) I only have access to the database, not to the calculations of my application.
My perfect solution
However, I would really like to have access to the calculations of my application through Jasper and bypass the entrance to my application.
One of the advantages of this is that my application does not yet have proper mobile access, and users can download the Jasper Mobile Application and access reports from there.
This will include the following:
- User is registered in Jasper
- User selects report
- Jasper calls my application with certain parameters
- The application creates an xml file
- The application returns a link to this file
- Jasper shows report
What is the best way to achieve this?
java jsp jasper-reports jasperserver
gordon613
source share