Jump to content

pramod3181990

Members
  • Posts

    5
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by pramod3181990

  1. Yes, you can have more than one query in jrxml although you can run only one query. You can have a condition based on which you want you want to fire the query during run time and I think this is what you want.

    Take a look at the follwing:

    <parameter name="param" class="java.lang.String">
             <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <parameter name="query" class="java.lang.String" isForPrompting="false">
             <defaultValueExpression><![CDATA[(new String("postgres").equals($P{param}) ? "select * from employee limit 5" : "select * from employee where ROWNUM>=1")]]></defaultValueExpression>
    </parameter>
    <queryString>
                 <![CDATA[$P!{dbType}]]>
    </queryString>
    Here's the explanation:
    Use the first parameter(param) for entering the value based on which you want your query to be picked during run time. Based on this value the query is picked and gets set in the second parameter(query). You can see the conditional operator being used in the second parameter. This checks the condition
    and returns the query. 
    I hope this helps.

     

     

  2.  I need to learn how to generate jasper reports using ireport 4.1.1. Since I am required to learn this as quickly as possible I want to know how to use all the options available in the palette from which u just drag and drop things. I don't have time to write code for generating the reports so what I really want is to know more about how I can explore the functionality of palette.

    Please reply asap.

×
×
  • Create New...