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

msavage_1

Members
  • Posts

    1
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by msavage_1

  1. I have been looking at the answers for the past two+ hours and I see some ideas but no sample code.  I'm very new to Jasper Reports so as much detail you can provide the better.

    I have an autometed scheduler running everyday at 8am to run a report.  Most days the query returns zero rows so I do not want the report to be created/emailed.

    I tried adding the whenNoDataType="NoPages" but that did not work. (see example below)

    In reading through the questions and answers it seems I must also add something like this...

    JasperPrint _prnt = JasperManager.fillReport( _rep, params, conn); 

    //check for pages here.--no pages helps here. 
    if(_prnt.getPages().size()==0){ 
    //redirect to std page 

    jasperPrint.getPages().isEmpty()

    But this is pretty foreign to me.  Can you provide me an example of where in the jrxml I would put the above text?  

     

    I appreciate the help

     

    EXAMPLE:

    <?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="POLA-Wharfage-Container" 
        language="groovy" 
        whenNoDataType="NoPages"
        pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" 
        uuid="e0269380-8eae-4dcf-b533-73344ccbfcd3">
        <property name="ireport.zoom" value="1.0"/>
        <property name="ireport.x" value="0"/>
        <property name="ireport.y" value="0"/>
        <queryString>
     

×
×
  • Create New...