Jump to content
Changes to the Jaspersoft community edition download ×

Recommended Posts

I am having an odd issue that I cannot seem to find an answer to.


We are using Jasperreports Pro version 5.2 (limited right now to this version), and we are trying to use the google map component to show status information on a number of sites.


The report is created in iReport and published directly into the repository for retrieval. At this point, we are not using a custom java call to build, retrieve, etc...just trying to open the report from the repository.


I have the map working perfectly fine when we refer to the server by ONLY it's internal hostname (ex: server1). However, if we use a CNAME, or an external name (ex: reportserver), or the FQDN of the jasper server (ex: server1.domain.com), the report loads the map, you can actually see the map for approximately 1/2 second before it dumps to a grey screen stating "Oops, something went wrong".


When I observe the behavior using Chrome Developer Tools, I see an error related to "no api key". However, this ONLY shows up when the jasperserver is referenced by anything other than it's direct hostname. If I refer to the jasperserver by it's hostname, then that API Key error is not displayed...but the report runs perfectly.


I have created a project and obtained both client and server API keys for the Google maps projects (leaving the name filters clear...essentially accepting all referrers), but in iReport there is no direct setting to apply the key. I did copy settings from a report built using JasperStudio Pro...but the property setting (property name="net.sf.jasperreports.components.map.key" value="API KEY HERE"/>) that it creates seems to have no effect on my 5.2 report.


We do need to be able to access these reports from internal as well as external sources, so just using the internal hostname of the server isn't really an option.


I have tried to dig through the Jaspersoft community and docs, but there is little to no information on this.


If possible, these are the questions that I would like to pose:


  1. Has anyone else come across this issue and been able to resolve the problem?



  2. Since we can successfully run the report by direct server name, is there some "alias" setting I am missing within jasperserver? Meaning: it seems that the report server is announcing itself as "server1" regardless of what the client is using as the browser address which is why the report would execute the map call, but then fail (similar to an iframe cross-domain type of thing)...but maybe I'm way off on that.



  3. Any suggestions would be greatly appreciated.




Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 9 months later...

Hi, we've had a similar problem which was caused by the map components hard coded with http protocol while running on https. The complete site had resulted into a mixed content of http and https and thus the http components (the map) was blocked by the browsers. I replaced the hard coded addresses into https addresses of google API and it is working now.

 

Ondrej

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...