Jump to content
Changes to the Jaspersoft community edition download ×

bmeg

Members
  • Posts

    2
  • 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 bmeg

  1. Hello, Does anybody knows if is it possible to save interactive viewing changes on JasperReports server (pro version) just for one user? I mean that there is one report containing table component (.jrxml file) on server, multiple users and each user should have different viewing options (columns width, text size, formatting etc.). Thanks.
  2. Hello I'm using JesperReports Library and I'm trying to filter sql query. Unfortunately parameter is ignored and default value from <defaultValueExpression> is always used. Even if I would delete <defaultValueExpression> with its value It will never return correct result (Empty result every time). Part of my code is pasted below. .jrxml code <subDataset name="tableDataset" uuid="ad14c38d-49b3-49db-a2f7-1d24458f7e5f"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter "/> <parameter name="queryParam" class="java.lang.Integer"> <defaultValueExpression><![CDATA[210]]></defaultValueExpression> </parameter> <queryString language="SQL"> <![CDATA[sELECT * FROM skd where skd_km = $P{queryParam}]]> </queryString> <field name="skd_id" class="java.lang.Integer"/> <field name="skd_nd"/> <field name="skd_km" class="java.lang.Integer"/> <field name="skd_m" class="java.lang.Integer"/> <field name="skd_odc" /> <field name="skd_kod" class="java.lang.Long"/> <field name="skd_nr" class="java.lang.Integer"/> <field name="skd_pkt" class="java.lang.Integer"/></subDataset> .java code try (Connection conn = DriverManager.getConnection(dbURL, username, password)) { JasperReport jasperReport = JasperCompileManager.compileReport( "src/main/resources/tempSKDFiltered.jrxml"); Map<String, Object> parametersMap = new HashMap(); parametersMap.put("queryParam", 229); JasperPrint jasperPrint = JasperFillManager.fillReport( jasperReport, parametersMap, conn); JasperExportManager.exportReportToPdfFile( jasperPrint, "SKDFilter.pdf"); } catch (JRException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } } Does anybody have an idea what I'm doing wrong? Thanks.
×
×
  • Create New...