vmb
vmb

Reputation: 3028

How to get geoLocation in BIRT report

I am using BIRT reporting tool for generating report.I have requirement to show geo location name corresponding to longitude and latitude.In report i want display,corresponding geo location name(ie:using Google map API's) in a table.I dont need to display google map.How can i do this in BIRT report.

Upvotes: 0

Views: 722

Answers (2)

Dominique
Dominique

Reputation: 4332

You can insert the jsfiddle you mentionned as it is in a birt text element, see a live example of google API embedded in a BIRT report here.

Though it is important to note it makes use of a client-side geocoding API, whereas usual BIRT scripts are server-side javascripts. This implies limitations:

To introduce a client-side javascript in BIRT, we have to:

  • Insert a BIRT text element in the report
  • Set the type to "HTML" in the dropdown at the top of the element
  • Insert the HTML markup & Javascript code as text content

That's quite easy, but when we get a such content through a client-side javascript, it won't be available for exports PDF, Powerpoint etc: it only appears in HTML format.

In order to make it available for other formats such PDF, we have to use a java geocoder API such google's, and provide relevant "jar" libraries to the BIRT engine as explained here.

Some geocoding java API are free and/or open source but the geocoding services might be limited. Read carefully the terms of use.

Upvotes: 3

kenshinji
kenshinji

Reputation: 2081

As far as I know, it is possible to call external java package from report generated by BIRT tool, so, my thinking is you may write a java method to call google geocoding API(which could resolve the geo location name from longitude and latitude), then call the java method from report.

Upvotes: 0

Related Questions