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

amitsd

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by amitsd

  1. Problem DescriptionGoogle Map component by default displays controls that allow to choose between report types like terrain, satellite, etc. or Pegman control to start "street view". There is no way in Jaspersoft Reports to control visibility of these controls. SolutionJasperReports library does not provide any API or parameters to configure the visibility of the controls on Google Map. But fortunately, Google Maps API support this through the MapsOptions. Till the time TIBCO decides to add this configuration through JasperReports component library, I am managing with a work-around. NOTE: This solution is making changes to the jasperreports.jar provided with the JSR deployment. So make sure to keep a backup copy of original jar so that you can revert, if needed. Also, these changes will have to be re-applied when JSR upgrades to later version. Locate jasperreports.jar in the webapps folder. In Pro version 6.3.0, I found it under /var/lib/tomcat7/webapps/jasperserver-pro/WEB-INF/lib. Now open this jar using tools like 7-zip (no need to extact, we will make changes within the jar).Open file netsfjasperreportscomponentsmapresourcesrequirejasperreports-map.js and locate the function _showMap. This includes the declartion of 'myOptions' object which contain MapOptions for the Google Map. Add your customization code in this object as follows:myOptions = { zoom: zoom, center: new gg.LatLng(latitude,longitude), mapTypeId: gg.MapTypeId[mapType], autocloseinfo: true, streetViewControl: false, // This is to hide Pegman control /* add your customation here as per Google Maps API documentation */},[/code] Now, open file netsfjasperreportscomponentsmapresourcestemplatesMapElementHtmlTemplate.vm and apply similar change where map object is created.var map = new google.maps.Map(document.getElementById('${mapCanvasId}'),{ zoom: ${zoom}, center: new google.maps.LatLng(${latitude}, ${longitude}), mapTypeId: google.maps.MapTypeId.${mapType}, autocloseinfo: true, streetViewControl: false, // This is to hide Pegman control /* add your customation here as per Google Maps API documentation */});[/code] Save the changes, re-package the .jar archive with updated files and restart the server. NOTE: This work-around applies to the entire Jaspersoft Server, so all the reports on that server will use the same Google Maps configuration.
  2. Hi, I am running JRS-Pro 6.3.0 on AWS. I have created a report using Jasper Studio and added it to JSR manually by uploading the jrxml file. I need to pass 3 parameters, so I have created 3 Input Controls in the report on JSR and named them same as the parameters names. One of them is a multi-select list, so the corresponding param data type is set to java.util.List in jrxml. (I have also tried setting it to java.util.Collection.) I tested this in Studio and everything is working fine. Eventually, I am embedding this report as HTTP URL in a separate web app. So I am passing parameters on the HTTP URL. I am getting error message "HTML response error code: 500". My observation is that except multi-select param, all other params are working fine. The URL looks like below: http://<AWSIP>/jasperserver-pro/flow.html?_flowId=viewReportFlow&decorate=no&viewAsDashboardFrame=true&reportUnit=/organizations/org1/Reports/Report1&j_username=user1&j_password=user@123&USER_ID=1&USER_ID=2&USER_ID=3&START_DATE=2017-03-01&END_DATE=2017-03-05 Not sure what could be the problem. Thank you, Amit
  3. Hi, I am running JRS-Pro 6.3.0 on AWS. I am embedding the report in my web app using the HTTP URL and passing j_username for authentication. This works fine when I am passing userid of the server root. But if I pass userid created under an organization, it returns the error code 400. The URL looks like below: http://<AWS IP>/jasperserver-pro/flow.html?_flowId=viewReportFlow&decorate=no&viewAsDashboardFrame=true&reportUnit=/organizations/org1/Reports/Report1&j_username=user1|org1&j_password=user@123 I have assigned this 'user1' to the role ROLE_USER and made sure that both this, user and the role are given permission 'Execute Only' for the entire organization 'org1'. Please help me resolve this. Thanks, Amit
×
×
  • Create New...