Planet Jaspersoft

Filter by tags:

April 7, 2016

Hi,
This post will help you in understanding how to identify the ID for the filter that is being created in Ad Hoc view and then in Ad Hoc Report.

Software used for this example/discussion is : Japsersoft Server Professional 6.2

Please click on the images that you find in this post for getting the best view

Some points :
1) We create Fields as filters in Ad Hoc Views (or in Ad Hoc views).
2) We can't identify the ID's for the filters in Ad Hoc Reports.
3) Usually we Edit the Report to view the Data Sources,Controls & Resources and etc.
4) When you click on Controls & Resources for the Ad Hoc views you can not find the filters over there because its not a studio report.
5) To identify the filter/parameter ID, we have to go and look into the Domain and have to see the ID there for the field (which we used as filter/parameter)
6) As we use the field twice in View it doesn't take the ID we found in Domain.
7) As of Jasper 6.2, it takes "field_id_identified_in_domain"_1, 
for example : 
sales_stage_1 where sales_stage is the ID identified in domain for "Sales Stage" label/field.


Lets understand the above points using screenshots. 
1) Domain used for this example (Simple Domain) - Available in Pro server
2) Sample View (Filter is : A.Sales Stage ) 
* "Sales Stage" is the label name for "sales_stage" field from "Simple Domain"

3) Writing Ad Hoc Report using above view and the filter used is "Sales Stage" field

4) Now, if you try "Edit" ing the report you can't find the filter available from Studio as well from Server. 





5) Identifying the  ID for the "Sales Stage" filter from domain ("Simple Domain" is the domain name
ID for "Sales Stage" filed from the domain is : sales_stage


6) After identifying the filter use this ID along with _1 (underscore 1) post fixed to it
i.e.,
Field ID = sales_stage 
(This is the original field name from database table while writing the domain, you can change it also by clicking on edit button)
Filter ID = sales_stage_1  (As "Sales Stage" label or you can say "sales_stage" filed is being used twice in view, you have to take underscore with 1 )

This is what I identified while exploring passing the ID for a report developed developed using Ad Hoc Views

NOTE: Reader is encouraged to add if he/she find any other alternative way in comments box.


7) Now use this ID (sales_stage_1) in URL 

For example 1: 
http://localhost:8081/jasperserver-pro/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FTest%2FAd_Hoc_Reports&reportUnit=%2FTest%2FAd_Hoc_Reports%2FAd_Hoc_View_Report&standAlone=true
&sales_stage_1=Closed%20Won

Example-2 : 
http://localhost:8081/jasperserver-pro/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FTest%2FAd_Hoc_Reports&reportUnit=%2FTest%2FAd_Hoc_Reports%2FAd_Hoc_View_Report&standAlone=true
&sales_stage_1=Qualification 


I hope this helps some one. !

If you find it useful, please hit the share button help the community.!

Regards,
Sadakar Pochampalli 

April 7, 2016

April 5, 2016

Hi,


This post will teach you how to work with TOC report using Report books and best practices in Jasper Design Studio 6.2 Professional or later.

1) Report books is a new feature for TOC implementation in Japser Reports from 6.0 version.
2) Its always a best practice to write Report book JRXMLs in a separate project.
3) Saving report book doesn't support saving it in a folder in project.
4) All you need to know how to map exact data sources in Main Report book and content JRXML.
5) In addition to point-1 , need to know how to pass parameters correctly.
6) Understanding how book marks works on Text elements is required to work with Report books.

Questions : 
1) What is the difference between sub reports & Report books ?
2) What is the difference between drill down reports/ hyperlinks and book marks ?
3) Is it possible to get the TOC in word export as you see in PDF ? If yes, how ?

Report Books :
Jaspersoft Official documentation page : 
http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v60/report-books



Here you go with an example,

USE CASE :
Display State Table of contents for Customer Details Tabular Report 


1) Creating Project 
a) Click File->New -> Project -> JasperReprots Project -> Give name to the project (Lets say "ReportBooks_TOC_Example"

2) Creating Report Book
a)  Click on File->New -> JasperReport -> Report Books -> Select "Abstract Book" as shown in below image.

 3) Choosing Data source for Report book and writing Query. 


As shown in below images select foodmart data source and then write a sample query . Click on Next to get Report Book parts selection.



Report books contains 3 sections
They are
1) Front cover
2) Content
3) Back Cover
Select all of them and click on "Finish" button.

4) Observations
a) Generated JRXMLs in Project folder
b) Canvas of Report Book

a) Generated JRXML's in Project folder
Once you click on Finish button, the studio engine will generate below JRXMLs in project folder.
Abstract_Book.jrxml
Abstract_Book_backcover.jrxml
Abstract_Book_cover.jrxml
Abstract_Book_toc.jrxml


b) Canvas of Report Book - Canvas of report book looks as below. 


5) Lets have a quick look into the report book output and observe few more things. 
a) Click on Preview button (It will generate .jasper files for .jrxml files - you can do it by compiling too).
b) The default Preview should generate 3 tabs as shown in below image.
c) When you click on "TocReport" tab you will not find any thing, you need to change/remove the default styles on all the text fields. 


In the TOC JRXML make sure the content is dis-styled to get the labels view-able
  Understanding TOC JRXML
1) It is not required to connect to any data source in this JRXML
2) Don't change any field lables in it. The lables are pre-built for generating TOC.
3) You can change the styles for the lables.
4) You can not keep two labels in single Detail band.


6) Lets understand few more things in ReportBook JRXML

a) Report book out line is divided into 3 parats,
b) In each part, you will either keep .jasper or .jrxml files.
c) This outline section has the other general reporting elements as shown in below image.
d) Properties of the Report book is same as general report.
c) Each Report book part has its own properties as shown in below.

Cover page part properties.  - Notice that the evaluation time for this part is "Default"
Similarly the back cover has "Default" evaluation time as shown in below image. 

Toc Page part Properties - IMP : The evaluation time for TOC page is "Report"
 
7) Now create a content JRXML in the same project folder ( Tabular Report with State wise grouped example for content). 
Lets say the report name is : ContentReport.jrxml
Data source connection & Query :



Report Sample output(making sure that report working fine individually)


8) Giving Book Marks to the "state_province" text field to get the states in TOC jrxml 

a) Select the "$F{state_province}" text field and in its hyperlink give
Anchor Name Expression = $F{state_province}
Bookmark level=1 
(NOTE : By default TOC jrxml has 3 levels in which 1st level will be given to "$F{state_province}" text field. )



9) Now , Add this ContentReport.jrxml  to the ReportBook.jrxml

a) Right click on the content canvas  and then click on "Add book part"

b)  Select the ContentReport.jasper or ContentReport.jrxml and Report Connection as shown in below


Observation : Make sure that "Connection Expression" is set 

10) Save the report, Compile and Run. 

Sample output : (Shown TOC part) - Download the PDF output to view the TOC functionality. 

 Navigation output sample to Mexico grouped data or to 262nd page.

This way you can work with TOC -Report books in Jasper Design Studio.

Publishing TOC Report to Jasper Server and viewing the output
a) Click on Publish button and choose the folder of your choice 

 b) Observe the JRXMLs as resources to the Main Report book JRXML(not visible)
 c) Configure the data source.
 d) Successful of resources.
  
e) Viewing output in Jasper server

Observe the book mark popup and tabs for Report book sections. 

TOCReport Sample

 Performing click Action on "OR" state to drill down to the OR state grouped by data.



Download : All the examples works only on Professional or Enterprise Jasper 6.2
1) Studio Example Project Zip File
2) PDF Export output file
3) Jasper Server Export output.

Click Me to download 

Or Direct Link :
https://drive.google.com/folderview?id=0BymV_QP4TGBEUUVaaW1hM08xOE0&usp=sharing

I hope this helps someone getting started with it.

If you find it useful, please click on share button and help the community.

Thank you for visiting this page.

With Best Regards,
Sadakar Pochampalli 

April 5, 2016

Hi,

This tutorial will help you to understand how to Map parameters from view type dash lets in Dashboard designer in Jasperserver 6.2.

Lets take "Simple Domain" available in Jasper Professional or Enterprise edition and create two views as shown in below images.

View-1 : with "Sales Stage" parameter/filter

(Click on image to get the best view)


View-2 : with "Sales Stage" and "Title" parameter

 Creating Dashboard with Views. 
1) Click on Create --> Dashboard
2) From the exiting content drag and drop the views (Ad hoc view , Ad hoc view 2)
3) Your dashboard design should looks as follows. 
4)  Parameters Mapping & Grouping
Mapping for : Pass parameters from View-1 to View-2
* View-1 has "Sales Stage" filter and View-2 has "Sales Stage" and "Title" filter.
* Out of these parameters "Sales Stage" is common for both the views.
* Observe in View-1 "Title" is the category field (X-Axis). When you perform click action on this   category the category name value should be passed to View-2 and it should be caught by "Title" filter/parameter in it(View-2).
* This can be done by right clicking on the dashlet-1 and setting the hyperlink as shown in below image 

* Please see the top section  in below image(Parameter Mapping Image) for  - how the filters are mapped.

Grouping for : Making dashboard dynamic with dash let parameters - Common & non-common parameters assigning to the dash lets.
It can also available in Parameter grouping section as well in filter button on top of the dashboard


(Click on image for best view of the content )

 Now, save the dashboard and Run it. 

While performing click action on a category: 
 (Click on image to get the best view)


After performing click action see the change in right side dash let : 



This way one can achieve inter dash lets communication in new jasper 6.2 server.

Download Example : Works only on Professional and Enterprise Servers  on food mart database. 

Click Me. 

Domains download for the example used : Click Me

I hope it helps someone for quick understanding.

If you find it useful, click on share button and help the community.


Some points :
1) Is it possible 

Until Next ..
Sadakar Pochampalli 


April 5, 2016

April 4, 2016

Even though the recent version of Jaspersoft Studio Community Edition has a JDBC Driver selection for Redshift, the connection doesnot […]

April 4, 2016

March 29, 2016

Hi,

In this post you can learn how to get Expand and Collapse options when exporting a grouped by data excel report.

Steps : 
1) Design report as follows 
     
      Group Header  ($F{city})
             Detail (some fields)
      Group Footer (Dummy Text field with 0 height). 

(Click on image to get the best view)


2) Apply Body property to the fields that you keep in Detail Band
net.sf.jasperreports.export.xls.row.outline.level.1=Body

(click on Image to get the best of content)
 

3) Apply End property to the dummy field that you keep in Footer band.
net.sf.jasperreports.export.xls.row.outline.level.1=END

(Click on image to get the best view)
4) Sample Excel outputs
(Collapsed Stage)
A group expansion stage : 

References : 
http://jasperreports.sourceforge.net/sample.reference/xlsfeatures/


Sample JRXML ( works on 6.2 or later Jasper Studio professional with foodmart database )
 <?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0  -->
<!-- 2016-03-29T18:23:38 -->
<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="Expand and Collapse Excel" pageWidth="595" pageHeight="842" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="58e9ce0f-5fbd-48ec-8645-53f5a0b2ad01">
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.unit." value="pixel"/>
    <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="foodmart"/>
    <property name="ireport.jasperserver.url" value="http://localhost:8081/jasperserver-pro/"/>
    <property name="ireport.jasperserver.user" value="superuser"/>
    <property name="ireport.jasperserver.report.resource" value="/2_Training_Naresh/Reports/21_Expand_and_Collapse_Excel_Export_files/main_jrxml"/>
    <property name="ireport.jasperserver.reportUnit" value="/2_Training_Naresh/Reports/21_Expand_and_Collapse_Excel_Export"/>
    <queryString>
        <![CDATA[SELECT * FROM customer ORDER BY city]]>
    </queryString>
    <field name="customer_id" class="java.lang.Integer"/>
    <field name="account_num" class="java.lang.Long"/>
    <field name="lname" class="java.lang.String"/>
    <field name="fname" class="java.lang.String"/>
    <field name="mi" class="java.lang.String"/>
    <field name="address1" class="java.lang.String"/>
    <field name="address2" class="java.lang.String"/>
    <field name="address3" class="java.lang.String"/>
    <field name="address4" class="java.lang.String"/>
    <field name="city" class="java.lang.String"/>
    <field name="state_province" class="java.lang.String"/>
    <field name="postal_code" class="java.lang.String"/>
    <field name="country" class="java.lang.String"/>
    <field name="customer_region_id" class="java.lang.Integer"/>
    <field name="phone1" class="java.lang.String"/>
    <field name="phone2" class="java.lang.String"/>
    <field name="birthdate" class="java.sql.Date"/>
    <field name="marital_status" class="java.lang.String"/>
    <field name="yearly_income" class="java.lang.String"/>
    <field name="gender" class="java.lang.String"/>
    <field name="total_children" class="java.lang.Integer"/>
    <field name="num_children_at_home" class="java.lang.Integer"/>
    <field name="education" class="java.lang.String"/>
    <field name="date_accnt_opened" class="java.sql.Date"/>
    <field name="member_card" class="java.lang.String"/>
    <field name="occupation" class="java.lang.String"/>
    <field name="houseowner" class="java.lang.String"/>
    <field name="num_cars_owned" class="java.lang.Integer"/>
    <field name="fullname" class="java.lang.String"/>
    <group name="city">
        <groupExpression><![CDATA[$F{city}]]></groupExpression>
        <groupHeader>
            <band height="16">
                <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                <textField>
                    <reportElement x="0" y="0" width="100" height="16" uuid="752494bc-a3a7-447b-b24a-16dd57b4e203">
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    </reportElement>
                    <box leftPadding="5"/>
                    <textElement verticalAlignment="Middle">
                        <font isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{city}]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="100" y="0" width="100" height="16" uuid="4edb4831-d823-471c-8cdf-9621627e0fc9">
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    </reportElement>
                    <textElement verticalAlignment="Middle">
                        <font isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[""]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="200" y="0" width="100" height="16" uuid="925b91cc-0b9e-4c68-b43e-01546ae19316">
                        <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    </reportElement>
                    <textElement textAlignment="Center" verticalAlignment="Middle"/>
                    <textFieldExpression><![CDATA[""]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="300" y="0" width="120" height="16" uuid="607f71cb-a9c1-4417-bfa3-cc4bac1f81c2">
                        <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    </reportElement>
                    <textElement textAlignment="Center" verticalAlignment="Middle"/>
                    <textFieldExpression><![CDATA[""]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="420" y="0" width="175" height="16" uuid="1508d978-b950-4f89-a362-d944afcd326c">
                        <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    </reportElement>
                    <textElement textAlignment="Center" verticalAlignment="Middle"/>
                    <textFieldExpression><![CDATA[""]]></textFieldExpression>
                </textField>
            </band>
        </groupHeader>
        <groupFooter>
            <band>
                <textField>
                    <reportElement x="0" y="0" width="100" height="0" uuid="24a95893-5789-4871-bca0-f6d7f8a9bcf4">
                        <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="END"/>
                    </reportElement>
                    <textFieldExpression><![CDATA["Text Field"]]></textFieldExpression>
                </textField>
            </band>
        </groupFooter>
    </group>
    <columnHeader>
        <band height="16" splitType="Stretch">
            <printWhenExpression><![CDATA[$V{PAGE_COUNT}==1]]></printWhenExpression>
            <staticText>
                <reportElement x="100" y="0" width="100" height="16" uuid="0d2dd0ef-ad82-40cb-b7af-6cdbedc6fa12"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <text><![CDATA[Customer ID]]></text>
            </staticText>
            <staticText>
                <reportElement x="200" y="0" width="100" height="16" uuid="b1f7385d-2678-405c-bdc1-1ebf363d1f16"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <text><![CDATA[Customer Name]]></text>
            </staticText>
            <staticText>
                <reportElement x="300" y="0" width="120" height="16" uuid="72efd2e8-b27c-49f5-bbf6-7f0cf7b65868"/>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <text><![CDATA[Occupation]]></text>
            </staticText>
            <staticText>
                <reportElement x="420" y="0" width="175" height="16" uuid="71a0dffd-4d85-40f0-b04e-b966697b8a14">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center"/>
                <text><![CDATA[Phone Number]]></text>
            </staticText>
            <textField>
                <reportElement x="0" y="0" width="100" height="16" uuid="126c9bef-1748-4333-b3c4-dd641268e523">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement verticalAlignment="Middle">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[""]]></textFieldExpression>
            </textField>
        </band>
    </columnHeader>
    <detail>
        <band height="16" splitType="Stretch">
            <textField>
                <reportElement x="100" y="0" width="100" height="16" uuid="262d3c0f-c9d4-4198-a6f1-4235e12967f6">
                    <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA[$F{customer_id}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="200" y="0" width="100" height="16" uuid="23a4613e-cbc2-49fa-8b85-c8c1c2b85538">
                    <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA[$F{fullname}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="300" y="0" width="120" height="16" uuid="9bdd418b-5ed5-4731-bb47-5f662f214693">
                    <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA[$F{occupation}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="420" y="0" width="175" height="16" uuid="1f727d26-1462-4c6a-8e6b-5dbb0e05668d">
                    <property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                <textFieldExpression><![CDATA[$F{phone1}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="0" y="0" width="100" height="16" uuid="282bb881-bc06-490f-83b2-a34764648547">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement verticalAlignment="Middle">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[""]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>
 


I hope it helps some one. .! & thank you to the friend who explained this to me today.  :-) :-)

References: 
http://jasperreports.sourceforge.net/sample.reference/xlsfeatures/ 

March 29, 2016

March 27, 2016

Hi,
When you see \.metadata\.log error while launching Studio, you can follow below steps to launch it successfully,

Steps :
1) Go to C:\Users\sadakar\JaspersoftWorkspace\.metadata\.plugins\org.eclipse.core.resources
2) Delete .snap file
3) Now, launch Studio

:-)

March 27, 2016

March 18, 2016

Hi Folks,

Usually we write grid reports by making use of column header and Detail band or table component in JRXML file. 

When write a grid report using column headers, we make use of Styles and conditional expression with REPORT_COUNT variable to get the alternative colors, similarly when we use Table component, we take check box utility in its style section to get the alternative colors functionally.

Today, I need to implement the row or column banding in cross tab component - cross tab also mean to display grid data but the data will be grouped by rows and columns. Neither we can't use  REPORT_COUNT variable on cross tab fields nor any utility.

Here are the steps to have row or column banding.

1) Write your cross tabular report.
2) Go to Style section from report outline or cross tab outline.
3) Create a Style -> Create two conditional Styles. One for row banding another for column banding.
    Lets say Style name is Style1
4) Write below condition in 1st condition & on its Appearance section choose row banding color.
    $V{ROW_COUNT}%2==0
5) Write below condition in 2nd condition of same Style1& on its Appearance section choose another color for column
   $V{COLUMN_COUNT}%2==0
6) Now , go the cross tabs text elements and select them and apply Style1 in Appearance section for Style property.
7) Save your report and preview.

NOTE : 
1) While choosing colors on condition do not uncheck "Transperant" property.
2) On cross tab text fields you must uncheck "Transparent" property.
3)  COLUMN_COUNT and ROW_COUNT are built in variables that you can see in grayed out color in Variables section.
4) ROW_COUNT is not available by default in variables section in 6.2 studio.

Sample output : 
1) Cross tab row banding
 
2) Cross tab row banding + Column banding


Style code in JRXML : 
    <style name="Style1">
        <conditionalStyle>
            <conditionExpression><![CDATA[$V{ROW_COUNT}%2==0]]></conditionExpression>
            <style backcolor="#C6EDF7"/>
        </conditionalStyle>
        <conditionalStyle>
            <conditionExpression><![CDATA[$V{COLUMN_COUNT}%2==0]]></conditionExpression>
            <style backcolor="#DBB2D3"/>
        </conditionalStyle>
    </style>


Applying Row banding code sample on a text field
<textField>
   <reportElement style="Style1" mode="Opaque" x="0" y="0" width="60" height="20" uuid="2dd638c2-fd6a-4bbf-8fb9-f9807dc1ee97"/>
   <textElement textAlignment="Left" verticalAlignment="Middle"/>
   <textFieldExpression><![CDATA[$V{education1}]]></textFieldExpression>
     </textField>



 References : 
http://jasperreports.sourceforge.net/sample.reference/crosstabs/index.html


Full Sample JRXML : Jaspersoft Design Studio 6.2 Professional code and runs on foodmart db of postgres

 
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0  -->
<!-- 2016-03-19T01:30:11 -->
<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="cross tab" pageWidth="900" pageHeight="842" columnWidth="860" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="919521d7-927b-4cd9-b646-0b6cc361b467">
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.unit." value="pixel"/>
    <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
    <style name="Crosstab_CH" mode="Opaque" backcolor="#F0F8FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Crosstab_CG" mode="Opaque" backcolor="#BFE1FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Crosstab_CT" mode="Opaque" backcolor="#005FB3">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Crosstab_CD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Style1">
        <conditionalStyle>
            <conditionExpression><![CDATA[$V{ROW_COUNT}%2==0]]></conditionExpression>
            <style backcolor="#C6EDF7"/>
        </conditionalStyle>
        <conditionalStyle>
            <conditionExpression><![CDATA[$V{COLUMN_COUNT}%2==0]]></conditionExpression>
            <style backcolor="#DBB2D3"/>
        </conditionalStyle>
    </style>
    <queryString>
        <![CDATA[SELECT * FROM customer]]>
    </queryString>
    <field name="customer_id" class="java.lang.Integer"/>
    <field name="account_num" class="java.lang.Long"/>
    <field name="lname" class="java.lang.String"/>
    <field name="fname" class="java.lang.String"/>
    <field name="mi" class="java.lang.String"/>
    <field name="address1" class="java.lang.String"/>
    <field name="address2" class="java.lang.String"/>
    <field name="address3" class="java.lang.String"/>
    <field name="address4" class="java.lang.String"/>
    <field name="city" class="java.lang.String"/>
    <field name="state_province" class="java.lang.String"/>
    <field name="postal_code" class="java.lang.String"/>
    <field name="country" class="java.lang.String"/>
    <field name="customer_region_id" class="java.lang.Integer"/>
    <field name="phone1" class="java.lang.String"/>
    <field name="phone2" class="java.lang.String"/>
    <field name="birthdate" class="java.sql.Date"/>
    <field name="marital_status" class="java.lang.String"/>
    <field name="yearly_income" class="java.lang.String"/>
    <field name="gender" class="java.lang.String"/>
    <field name="total_children" class="java.lang.Integer"/>
    <field name="num_children_at_home" class="java.lang.Integer"/>
    <field name="education" class="java.lang.String"/>
    <field name="date_accnt_opened" class="java.sql.Date"/>
    <field name="member_card" class="java.lang.String"/>
    <field name="occupation" class="java.lang.String"/>
    <field name="houseowner" class="java.lang.String"/>
    <field name="num_cars_owned" class="java.lang.Integer"/>
    <field name="fullname" class="java.lang.String"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="50"/>
    </title>
    <summary>
        <band height="65" splitType="Stretch">
            <crosstab>
                <reportElement x="0" y="0" width="860" height="65" uuid="a84e27b9-2297-4bb0-9e07-61e9dd9ba7db">
                    <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
                </reportElement>
                <rowGroup name="education1" width="60" totalPosition="End">
                    <bucket class="java.lang.String">
                        <bucketExpression><![CDATA[$F{education}]]></bucketExpression>
                    </bucket>
                    <crosstabRowHeader>
                        <cellContents mode="Opaque" style="Crosstab_CH">
                            <textField>
                                <reportElement style="Style1" mode="Opaque" x="0" y="0" width="60" height="20" uuid="2dd638c2-fd6a-4bbf-8fb9-f9807dc1ee97"/>
                                <textElement textAlignment="Left" verticalAlignment="Middle"/>
                                <textFieldExpression><![CDATA[$V{education1}]]></textFieldExpression>
                            </textField>
                        </cellContents>
                    </crosstabRowHeader>
                    <crosstabTotalRowHeader>
                        <cellContents mode="Opaque" style="Crosstab_CT">
                            <staticText>
                                <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="30a79663-0b76-4abc-9bdf-ea5e07e948b2"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <text><![CDATA[Total education1]]></text>
                            </staticText>
                        </cellContents>
                    </crosstabTotalRowHeader>
                </rowGroup>
                <columnGroup name="occupation1" height="20" totalPosition="End">
                    <bucket class="java.lang.String">
                        <bucketExpression><![CDATA[$F{occupation}]]></bucketExpression>
                    </bucket>
                    <crosstabColumnHeader>
                        <cellContents mode="Opaque" style="Crosstab_CH">
                            <textField>
                                <reportElement x="0" y="0" width="60" height="20" uuid="9253a1ec-7290-4556-8c8e-342f8f25855f"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <textFieldExpression><![CDATA[$V{occupation1}]]></textFieldExpression>
                            </textField>
                        </cellContents>
                    </crosstabColumnHeader>
                    <crosstabTotalColumnHeader>
                        <cellContents mode="Opaque" style="Crosstab_CT">
                            <staticText>
                                <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="d93ba240-0361-4d4a-b9b7-c044815db4b5"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <text><![CDATA[Total occupation1]]></text>
                            </staticText>
                        </cellContents>
                    </crosstabTotalColumnHeader>
                </columnGroup>
                <columnGroup name="gender1" height="20">
                    <bucket class="java.lang.String">
                        <bucketExpression><![CDATA[$F{gender}]]></bucketExpression>
                    </bucket>
                    <crosstabColumnHeader>
                        <cellContents mode="Opaque" style="Crosstab_CH">
                            <textField>
                                <reportElement x="0" y="0" width="60" height="20" uuid="490b42a0-ef38-4349-9800-d14fc159a8f6"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <textFieldExpression><![CDATA[$V{gender1}]]></textFieldExpression>
                            </textField>
                        </cellContents>
                    </crosstabColumnHeader>
                    <crosstabTotalColumnHeader>
                        <cellContents>
                            <staticText>
                                <reportElement x="0" y="0" width="60" height="20" uuid="84014d77-4b07-4b51-85ac-21eb7ba521f5"/>
                                <text><![CDATA[Total Column Group1]]></text>
                            </staticText>
                        </cellContents>
                    </crosstabTotalColumnHeader>
                </columnGroup>
                <measure name="total_children_MEASURE1" class="java.lang.Integer" calculation="Sum">
                    <measureExpression><![CDATA[$F{total_children}]]></measureExpression>
                </measure>
                <crosstabCell width="60" height="20">
                    <cellContents mode="Opaque" style="Crosstab_CD">
                        <textField>
                            <reportElement style="Style1" mode="Opaque" x="0" y="0" width="60" height="20" uuid="96136dd9-4455-4486-86a4-4837a7361a6f"/>
                            <textElement textAlignment="Center" verticalAlignment="Middle"/>
                            <textFieldExpression><![CDATA[$V{total_children_MEASURE1}]]></textFieldExpression>
                        </textField>
                    </cellContents>
                </crosstabCell>
                <crosstabCell width="60" height="20" columnTotalGroup="occupation1">
                    <cellContents mode="Opaque" style="Crosstab_CT">
                        <textField>
                            <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="8d952fc1-2878-4ba9-8224-9b1637995a15"/>
                            <textElement textAlignment="Center" verticalAlignment="Middle"/>
                            <textFieldExpression><![CDATA[$V{total_children_MEASURE1}]]></textFieldExpression>
                        </textField>
                    </cellContents>
                </crosstabCell>
                <crosstabCell width="60" height="20" rowTotalGroup="education1">
                    <cellContents mode="Opaque" style="Crosstab_CT">
                        <textField>
                            <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="fa8c9b2f-c393-4ab9-b8d0-d20e564d03e7"/>
                            <textElement textAlignment="Center" verticalAlignment="Middle"/>
                            <textFieldExpression><![CDATA[$V{total_children_MEASURE1}]]></textFieldExpression>
                        </textField>
                    </cellContents>
                </crosstabCell>
                <crosstabCell width="60" height="20" rowTotalGroup="education1" columnTotalGroup="occupation1">
                    <cellContents mode="Opaque" style="Crosstab_CT">
                        <textField>
                            <reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="9f0a729a-a6b0-49c5-938c-604267f0d758"/>
                            <textElement textAlignment="Center" verticalAlignment="Middle"/>
                            <textFieldExpression><![CDATA[$V{total_children_MEASURE1}]]></textFieldExpression>
                        </textField>
                    </cellContents>
                </crosstabCell>
                <crosstabCell width="60" height="20" columnTotalGroup="gender1">
                    <cellContents/>
                </crosstabCell>
                <crosstabCell width="60" height="20" rowTotalGroup="education1" columnTotalGroup="gender1">
                    <cellContents mode="Opaque" style="Crosstab_CT"/>
                </crosstabCell>
            </crosstab>
        </band>
    </summary>
</jasperReport>

March 18, 2016

March 11, 2016

Hi,

Jasper server 6.2 Pro/EE releases have lots of improvements and new features. Today, I have gone through one of the features on server side in dashboard designer ,  that is Exporting dashboard to 4 variety of formats namely PDF, MS-Word , PNG image and OTD.

In this tip, you will learn/see how to export dashboard in above formats

1) Dashboard designer properties section has a check box(In the designer mode of dashboard right click anywhere on the canvas)  to enable dashboard export button when previewing.

2) After checking it in dashboard designer properties if you try exporting the dashboard you may get error message.

3) To make sure the export button working correctly, you need to install the PhantomJS software in the machine/server where your jasperserver is hosted/installed.

4) Download and keep the PhantomJS in C drive or somewhere in the directory.

PhantomJS download Link : 
http://phantomjs.org/download.html

5) Extract the zip file and keep the phantomjs-2.1.1-windows folder in C drive.  
Example : C:\phantomjs-2.1.1-windows
Inside into it, in the bin folder you can see  phantomjs.exe file.

6) You need to give the above .exe path  in js.config.properties file
File Path :
C:\Jaspersoft\jasperreports-server-6.2.0\apache-tomcat\webapps\jasperserver-pro\WEB-INF

i.e., Add below line in above file

phantomjs.binary=C:\\phantomjs-2.1.1-windows\\bin\\phantomjs.exe

7) Restart the the Jasper server if it is already running and see the preview of dashboard and make use of export button.


Example :  1) Exporting Supermart dashboard to PDF

1) Open the dashboard in Edit mode  or go to the dashboard designer

2) Click the settings button and check the "Show export button" option.
3) Save your dashboard and click on run button

4) Click on "Export" Button to export to PDF or PNG or DOCX or OTD

5) Sample Export to PDF
Image-1 : 

Image-2 :


I hope it helps someone in configuring and in how to do .

Until Next  Post..
Sadakar Pochampalli 





March 11, 2016

March 7, 2016

Hi All,

This tip is useful when you work with grid reports.

Detail Overflow :
The element will be printed when the band overflows to a new page or a new column.

Stretch with Overflow : 
Tell the report engine to allow the text field to stretch downwards in order to display all its text when it doesn't fit in the defined text field height.
This property will work irrespective of cell height that you provide.

(NOTE : You can hover the mouse on the property to view the purpose of it, this way you can learn each and every property available in Studio)

Both are the properties of a text field.


Example Details Overflow : 
On the text field(all text fields) select
Position Type = Float
Stretch Type = Relative to Tallest Object
Detail Overflow = check this
Stretch with Overflow = check this

Page-1 output :
 
Page-2 output:

From the above images, what you can understand is when Detail overflow is checked the text Static Text and Image filed data is repeating in next page.
If you uncheck it it will not repeat in page-2 :

for example
On the text field(all text fields) select
Position Type = Float
Stretch Type = Relative to Tallest Object
Detail Overflow = Uncheck this 
Stretch with Overflow = check this

Page-1 output portion in the bottom :
Page-2 output

Hope it helps someone.! 
Cheers.!!

 Sample JRXML : Japsersoft stduio Professional 6.2


<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0  -->
<!-- 2016-03-08T12:50:05 -->
<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="Test" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f86bcfb7-d774-451f-9f46-c58f57e0efbb">
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="foodmart"/>
    <queryString>
        <![CDATA[select * from dummy]]>
    </queryString>
    <field name="sno" class="java.lang.Integer"/>
    <field name="filed1" class="java.lang.Integer"/>
    <field name="filed2" class="java.lang.String"/>
    <columnHeader>
        <band height="30">
            <staticText>
                <reportElement x="0" y="0" width="120" height="30" uuid="0cd17b54-755c-42fe-9363-7266a24337e3"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <text><![CDATA[Static Text]]></text>
            </staticText>
            <staticText>
                <reportElement x="170" y="0" width="130" height="30" uuid="f216b782-3080-4ba8-8cc3-2609c684f4be"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <text><![CDATA[filed1]]></text>
            </staticText>
            <staticText>
                <reportElement x="300" y="0" width="90" height="30" uuid="71985024-8b9a-49ae-81e0-6d6e9335cec7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <text><![CDATA[filed2]]></text>
            </staticText>
            <staticText>
                <reportElement x="120" y="0" width="50" height="30" uuid="d45c0977-d842-424b-ab44-7edd5672b72d"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <text><![CDATA[Image]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="30">
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="120" height="30" isPrintWhenDetailOverflows="true" uuid="fb93f1ac-7f7a-48fe-afa7-4aab5370cbec"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textFieldExpression><![CDATA[""]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="170" y="0" width="130" height="30" uuid="b5a72533-c1b6-4af9-a0b7-06d099981190"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textFieldExpression><![CDATA[$F{filed1}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="300" y="0" width="90" height="30" uuid="bab5a3e9-22db-46b0-9302-f7614a6f6add"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textFieldExpression><![CDATA[$F{filed2}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="120" height="30" uuid="d4338fad-1803-491e-90ef-8e01cb3de80d"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textFieldExpression><![CDATA["Hello"]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="170" y="0" width="130" height="30" uuid="8cdac468-0a3f-4ed3-844b-473e1371f92e"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textFieldExpression><![CDATA[""]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="120" y="0" width="50" height="30" uuid="6ab2f4f8-04cd-4a6f-b945-3a7af4b8c3fa"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textFieldExpression><![CDATA["Hello"]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>

March 7, 2016

March 4, 2016

Hi Folks,

This tip is useful if you are loading thousands of values into an input control(single/multi).
How  much time the input control pane is taking to load when you run a large report in which one of the parameter is having thousands of values in it.

The end user(lets say a banking employee) might get nervous to wait for the input pane window opened to run this report(imagine if he will be waiting for 3 to 5 min to load the input pane itself, how much time he/she would has to wait to load the report  - Of course, it is based on your SQL logic but lets say your report is executing in 5 min b'z of heavy transnational data)

Add a check box(boolean) parameter to your input controls pane window and pass this parameter to all your other parameters in the report - i.e., cascade all the other parameters with this boolean parameter.

Once you cascade all the parameters, now when you run the report, the input controls pane for that report will load in matter of seconds hence the user will get experienced of the report is loading.

Lets' see an example for cascading use case with multi select parameter and boolean value

Explaining only on server side :  Cascade "paramCity" multi select parameter with boolean check box parameter. i.e., when you check the tick box then the values in "City" parameter should get loaded.

SELECT distinct state_province,city FROM customer WHERE 'true'=$P{param_CheckMe}

NOTE : In jasper boolean parameters returns true or false. While cascading make sure true should be given in single quotes as shown in above SQL code. 

and the other parameter is "paramCheckMe" is of type "boolean" created.

Screenshots : 



No values populated in "City" parameter when unchecking the boolean parameter (uncheck)

Values populated in "City" parameter when checking the boolean parameter (uncheck)

I hope this helps some one.!

March 4, 2016

Pages

Feedback