gjhinc Posted September 27, 2013 Share Posted September 27, 2013 I have a java servlet that happily produces all kinds of jasper reports including reports with images. I may just be a little out of touch, not having used jasper reports since 2003. But the map component has me stumped.I generally use iReport Designer to build reports and then just plop the .jrxml into a directory within my webapp. All reports, again, rendering fine in both worlds; iReport Designer and my webapp. Only when using the map component do I not get anything rendered in the webapp. No exceptions. The jrxml compiles into .jasper. Just a blank web page. Gotta be missing a jar? Thanks in advance for any help.<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ThreatLocations" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="a91c9cc5-2833-4b84-bb1c-c4bac23e3901"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString language="SQL"> <![CDATA[select distinct(vg_threat.ip_address) as ip, gc_geo_loc.latitude, gc_geo_loc.longitude from vg_threat join gc_geo_loc on vg_threat.geo_id=gc_geo_loc.geo_id;]]> </queryString> <field name="ip" class="java.lang.String"/> <field name="latitude" class="java.lang.Float"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="longitude" class="java.lang.Float"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <summary> <band height="400"> <componentElement> <reportElement uuid="cfe61f90-68c0-4e10-b55c-5a4142c7b382" x="0" y="0" width="802" height="400"/> <mp:map xmlns:mp="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <mp:latitudeExpression><![CDATA[$F{latitude}]]></mp:latitudeExpression> <mp:longitudeExpression><![CDATA[$F{longitude}]]></mp:longitudeExpression> <mp:zoomExpression><![CDATA[2]]></mp:zoomExpression> <mp:markerData> <mp:item> <mp:itemProperty name="latitude"> <valueExpression><![CDATA[$F{latitude}]]></valueExpression> </mp:itemProperty> <mp:itemProperty name="longitude"> <valueExpression><![CDATA[$F{longitude}]]></valueExpression> </mp:itemProperty> </mp:item> </mp:markerData> </mp:map> </componentElement> </band> </summary></jasperReport>[/code] 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