Planet Jaspersoft

April 11, 2018

Hi,

Problem Statement : 
How to remove yAxis values from  a highcharts column or bar graph ?
Solution: 
1) Navigate to the Advanced properties of the column graph.
2) From the list of folders in the advanced properties choose "yAxis" and expand it.
3) Scroll down till you find again a folder called "lables".
4) In the labels folder select "format" property (by default it would have default value as {value}) and double click or click on modify button.
5) Change the value of it from {value} to {}
6) Save your report and preview the the visualization
 


Output should look like as below


I hope this helps someone. 

- Sadakar Pochampalli

April 11, 2018

March 15, 2018

Hi,

Group count calculation can be done as follows in jasper reports.

Scenario : 
Report Design:
<GroupNumber>  <GroupBand>
                             <detailband>

Example: 
   IamGroupValue1
         row1_value
         row2_value
         row3_value
2    IamGroupValue2
       row1_value
       row2_value
  IamGroupValue2
      row1_value
      row2_value
      row3_value
      row4_value
...
...
...

Steps:
1) Create your group (lets say Group1 , give the field value by which you want to group by)
2) Observe variables - there it creates a variable called "Group1_Count"
3) Create a new variable of Integer type , let say : groupCount
4) Give below expression for the groupCount variable
      $V{Group1_COUNT} == 1 ? ($V{groupCount} + 1) : $V{groupCount}
5) Put Increment Type= [Group]Group1 and Reset Type =Report and Initial Value=1
6) Pull this variable onto the group header where you want to get it.
7) Run the report observe the group count in output.

Calculation Image: 

Reference : 
https://stackoverflow.com/questions/17480184/how-to-show-the-number-of-group


March 15, 2018

March 11, 2018

Hi,

To get the text only background with given color in jasper text elements, write below code.

"<style backcolor=\"yellow\">Hello .! My background color is yellow </style>"

Importantly , give MarkUp=Styled in the TextField properties

Click on image to get better view: 


Sample output:


Example JRXML:  (Studio 6.4 professional version)

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1  -->
<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="Blank_A4_1" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="01d3505b-1aa3-468b-ae16-491d8c5ceb57">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="555" height="79" uuid="1a620294-fdcf-42f3-8fc3-66548fc72941"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
<font size="14"/>
</textElement>
<textFieldExpression><![CDATA["<style backcolor=\"yellow\">Hello .! My background color is yellow </style>"]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="125" splitType="Stretch"/>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>

</jasperReport>

Reference: 
https://community.jaspersoft.com/questions/514115/setting-textelement-background-color-style-tag

March 11, 2018

January 13, 2018

Hi folks,

Happy New Year.! 2018.

It's been a long time, I have shared a technical write-up in Jaspersoft BI.

Today, here I come with an interesting concept, that is how to restrict the data for specific customers based on logged in user.

In this article, you will see, an end-to-end example starting from domain creation to ad-hoc view and then show you how to restrict the data.




The example(project zip file and explanation) is available as word document which you can download by clicking this link.


This example is also available in my YouTube channel. Watch out the video tutorial for the demonstration here

Page-1 Sample content 

Use case: Display brand wise store cost of customers in cross tabular (or pivot) view using ad-hoc reports.

To keep the demonstration simple and easy to understand the concept, let us take below three tables from foodmart database.

Tables: customer, product and sales_fact_1997

Let’s say customer1_userbelongs to "Alexandra Meyer" customer, customer2_user belongs to “Cathy Bohn” customer respectively and these users are created manually or populated by an ETL tool to the jaspersoft server (to jasperserver database).

When customer1_userlogs in and run the ad-hoc view/report he should be able to see only the data related to him and vice versa for the customer2_user


Page-4 Sample content 




Page-6 Sample content 

Sample snapshot of restricted data for customer1_user 


Read the full content by downloading the word/pdf document by clicking this link.


Stay tuned for more updates - an year for learning advanced concepts in Jaspersoft. 


Thank you
Until next, 
Sadakar Pochampalli 

January 13, 2018

October 25, 2017




<hc:chartProperty name="title.text" value="Chart Title in Center"/>
<hc:chartProperty name="title.verticalAlign" value="middle"/>
<hc:chartProperty name="title.floating_customSimpleMode" value="true"/>
<hc:chartProperty name="title.floating">






JRXML : Supports in 6.4 or later Pro

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1  -->
<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="Task_25_Oct_2017" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="62bf9297-750d-475a-94b8-bfd486dc5f00">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="foodmart"/>
<property name="ireport.jasperserver.url" value="http://localhost:8080/jasperserver-pro/"/>
<property name="ireport.jasperserver.user" value="superuser"/>
<property name="ireport.jasperserver.report.resource" value="/EarthlySystems/Task_25_Oct_2017_files/main_jrxml"/>
<property name="ireport.jasperserver.reportUnit" value="/EarthlySystems/Task_25_Oct_2017"/>
<subDataset name="Dataset1_Donut" uuid="b8746b75-d0d2-4837-9d6e-bf909eee2911">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="foodmart"/>
<queryString language="SQL">
<![CDATA[(SELECT 'Slice1' AS category, 15 AS value FROM customer limit 1)
UNION ALL
(SELECT 'Slice2' AS category,75 AS Value FROM customer limit 1)]]>
</queryString>
<field name="category" class="java.lang.String"/>
<field name="value" class="java.lang.Integer"/>
</subDataset>
<queryString language="SQL">
<![CDATA[]]>
</queryString>
<title>
<band height="320" splitType="Stretch">
<componentElement>
<reportElement x="60" y="0" width="400" height="320" uuid="9c464bcb-b23c-47d8-9b02-b0413f44c203">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<hc:chart xmlns:hc="http://jaspersoft.com/highcharts" xsi:schemaLocation="http://jaspersoft.com/highcharts http://jaspersoft.com/schema/highcharts.xsd" type="Pie">
<hc:chartSetting name="default">
<hc:chartProperty name="title.text" value="Chart Title in Center"/>
<hc:chartProperty name="credits.enabled" value="false"/>
<hc:chartProperty name="credits.href" value=""/>
<hc:chartProperty name="credits.text" value=""/>
<hc:chartProperty name="yAxis.title.text" value=""/>
<hc:chartProperty name="chart.zoomType" value="xy"/>
<hc:chartProperty name="plotOptions.pie.showInLegend" value="false"/>
<hc:chartProperty name="legend.enabled_customSimpleMode" value="true"/>
<hc:chartProperty name="legend.enabled">
<hc:propertyExpression><![CDATA[false]]></hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="plotOptions.pie.dataLabels.enabled">
<hc:propertyExpression><![CDATA[false]]></hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="plotOptions.pie.innerSize" value="90%"/>
<hc:chartProperty name="plotOptions.pie.dataLabels.padding" value="0"/>
<hc:chartProperty name="title.verticalAlign" value="middle"/>
<hc:chartProperty name="title.floating_customSimpleMode" value="true"/>
<hc:chartProperty name="title.floating">
<hc:propertyExpression><![CDATA[true]]></hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="title.style.fontSize" value="14px"/>
<hc:chartProperty name="title.style.color" value="#C8CACF"/>
</hc:chartSetting>
<multiAxisData>
<multiAxisDataset>
<dataset>
<datasetRun subDataset="Dataset1_Donut" uuid="50243b95-3f10-43db-8d71-f23638e513b4"/>
</dataset>
</multiAxisDataset>
<dataAxis axis="Rows">
<axisLevel name="Level1">
<labelExpression><![CDATA["Level Label expression"]]></labelExpression>
<axisLevelBucket class="java.lang.String">
<bucketExpression><![CDATA[$F{category}]]></bucketExpression>
</axisLevelBucket>
</axisLevel>
</dataAxis>
<dataAxis axis="Columns"/>
<multiAxisMeasure name="Measure1" class="java.lang.Number" calculation="Nothing">
<labelExpression><![CDATA["Category:"]]></labelExpression>
<valueExpression><![CDATA[$F{value}]]></valueExpression>
</multiAxisMeasure>
</multiAxisData>
<hc:series name="Measure1"/>
</hc:chart>
</componentElement>
</band>
</title>
</jasperReport>

October 25, 2017

October 11, 2017

Hi,

Over a period of time, the product(jaspersoft) has improved by leaps and bounds .Though it had gained developer(s) attention, one may feel ambiguous in finding a particular property in highcharts advanced properties. So far, I found there are no cut corners instead to spend some good amount of time and the article is the outcome of latter.

Today, I have come across the titled task of this post and thought to put in this bank. You will see how to configure the "name(s)" of the label and "percentage(s)"of highcharts(HTML-5) in jaspersoft studio 6.4 pro.

The below property, you need to set in Advanced properties of HTML-5 pie chart and the following images will help you out where exactly you need to configure it.

plotOptions.pie.dataLabels.format = "{point.name} {point.percentage:.0f}%" 


Click on images to get the best sight of content highlighted. 


1) 


2)
3)

 4)

5)

Until the next tip.!

- Sadakar Pochampalli

October 11, 2017

July 6, 2017

It is always fun playing with date related calculations in Jasper reports.

Here is another use case to find out below shown(2nd Image) dates in Jasper Reports.

Sample Design : (Click on image to get best view of content)


Sample Output: (Click on image to get best view of content)




Example Developed in : Jaspersoft Studio Professional 6.4
(NOTE: If you get any error while doing copy paste the below JRXML code, just replace the very first line of xml from other jrxml opened in your studio).


NOTE : 
Analise the calculations in Parameters ( In some cases, we can develop the same using variables)

JRXML : Developed in 6.4 Pro  (Copy - Paste below code in a JRXML opened in your studio)

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1  -->
<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="Previous and Next Months" pageWidth="1000" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="960" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="be22b853-8ecd-45d5-993a-456ecbf2733b">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <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="ireport.jasperserver.url" value="http://localhost:8080/jasperserver-pro/"/>
    <property name="ireport.jasperserver.user" value="superuser"/>
    <property name="ireport.jasperserver.report.resource" value="/EarthlySystems/Previous_and_Next_Months_files/main_jrxml"/>
    <property name="ireport.jasperserver.reportUnit" value="/EarthlySystems/Previous_and_Next_Months"/>
    <import value="org.apache.commons.lang.time.*"/>
    <parameter name="Date" class="java.util.Date">
        <defaultValueExpression><![CDATA[new Date()]]></defaultValueExpression>
    </parameter>
    <parameter name="PreviousMonthDate" class="java.util.Date" isForPrompting="false">
        <defaultValueExpression><![CDATA[DateUtils.addMonths($P{Date},-1)]]></defaultValueExpression>
    </parameter>
    <parameter name="NextMonthDate" class="java.util.Date" isForPrompting="false">
        <defaultValueExpression><![CDATA[DateUtils.addMonths($P{Date},1)]]></defaultValueExpression>
    </parameter>
    <parameter name="FirstDateOfCurrentMonth" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[new SimpleDateFormat("MM/dd/yyyy").format(java.util.Date.parse(MONTH($P{Date}) + "/1/" + YEAR($P{Date})))]]></defaultValueExpression>
    </parameter>
    <parameter name="FirstDayOfCurrentMonth" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[new SimpleDateFormat("EEE").format(java.util.Date.parse(MONTH($P{Date}) + "/1/" + YEAR($P{Date})))]]></defaultValueExpression>
    </parameter>
    <parameter name="FirstDateOfPreviousMonth" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[new SimpleDateFormat("MM/dd/yyyy").format(java.util.Date.parse(MONTH($P{PreviousMonthDate}) + "/1/" + YEAR($P{PreviousMonthDate})))]]></defaultValueExpression>
    </parameter>
    <parameter name="FirstDayOfPreviousMonth" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[new SimpleDateFormat("EEE").format(java.util.Date.parse(MONTH($P{PreviousMonthDate}) + "/1/" + YEAR($P{PreviousMonthDate})))]]></defaultValueExpression>
    </parameter>
    <parameter name="FirstDateOfNextMonth" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[new SimpleDateFormat("MM/dd/yyyy").format(java.util.Date.parse(MONTH($P{NextMonthDate}) + "/1/" + YEAR($P{NextMonthDate})))]]></defaultValueExpression>
    </parameter>
    <parameter name="FirstDayOfNextMonth" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[new SimpleDateFormat("EEE").format(java.util.Date.parse(MONTH($P{NextMonthDate}) + "/1/" + YEAR($P{NextMonthDate})))]]></defaultValueExpression>
    </parameter>
    <parameter name="CurrentDateFirstDayValueString" class="java.lang.String" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
        <defaultValueExpression><![CDATA[$P{FirstDayOfCurrentMonth}.equals("Sun") ? "0":
$P{FirstDayOfCurrentMonth}.equals("Mon") ? "1" :
$P{FirstDayOfCurrentMonth}.equals("Tue") ? "2" :
$P{FirstDayOfCurrentMonth}.equals("Wed") ? "3" :
$P{FirstDayOfCurrentMonth}.equals("Thu") ? "4" :
$P{FirstDayOfCurrentMonth}.equals("Fri") ? "5" :
$P{FirstDayOfCurrentMonth}.equals("Sat") ? "6" : "100"]]></defaultValueExpression>
    </parameter>
    <parameter name="CurrentDateFirstDayValueInteger" class="java.lang.Integer" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
        <defaultValueExpression><![CDATA[Integer.parseInt($P{CurrentDateFirstDayValueString})]]></defaultValueExpression>
    </parameter>
    <parameter name="PreviousMonthFirstDayValueString" class="java.lang.String" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
        <defaultValueExpression><![CDATA[$P{FirstDayOfPreviousMonth}.equals("Sun") ? "0":
$P{FirstDayOfPreviousMonth}.equals("Mon") ? "1" :
$P{FirstDayOfPreviousMonth}.equals("Tue") ? "2" :
$P{FirstDayOfPreviousMonth}.equals("Wed") ? "3" :
$P{FirstDayOfPreviousMonth}.equals("Thu") ? "4" :
$P{FirstDayOfPreviousMonth}.equals("Fri") ? "5" :
$P{FirstDayOfPreviousMonth}.equals("Sat") ? "6" : "100"]]></defaultValueExpression>
    </parameter>
    <parameter name="PerviousMonthFirstDayValueInteger" class="java.lang.Integer" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
        <defaultValueExpression><![CDATA[Integer.parseInt($P{PreviousMonthFirstDayValueString})]]></defaultValueExpression>
    </parameter>
    <parameter name="NextMonthFirstDayValueString" class="java.lang.String" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
        <defaultValueExpression><![CDATA[$P{FirstDayOfNextMonth}.equals("Sun") ? "0":
$P{FirstDayOfNextMonth}.equals("Mon") ? "1" :
$P{FirstDayOfNextMonth}.equals("Tue") ? "2" :
$P{FirstDayOfNextMonth}.equals("Wed") ? "3" :
$P{FirstDayOfNextMonth}.equals("Thu") ? "4" :
$P{FirstDayOfNextMonth}.equals("Fri") ? "5" :
$P{FirstDayOfNextMonth}.equals("Sat") ? "6" : "100"]]></defaultValueExpression>
    </parameter>
    <parameter name="NextMonthFirstDayValueInteger" class="java.lang.Integer" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
        <defaultValueExpression><![CDATA[Integer.parseInt($P{NextMonthFirstDayValueString})]]></defaultValueExpression>
    </parameter>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="175" splitType="Stretch">
            <textField>
                <reportElement x="100" y="0" width="100" height="30" uuid="686f531e-d1c4-44ef-884d-378f2a36fc1e"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{Date}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="100" y="30" width="100" height="30" uuid="5ca971f8-a82e-4cd2-97b5-9e1e8055e59f">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{PreviousMonthDate}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="100" y="60" width="100" height="30" uuid="6f1e9e0c-16f7-4ff1-b14f-21d1da654222"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{NextMonthDate}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="0" y="0" width="100" height="30" uuid="16e4c44e-16c8-477e-a31d-f8fe7582ae7f"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["Current Date"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="0" y="30" width="100" height="30" uuid="0b313be3-2ed2-4f90-933b-cbc57673ea69"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["Previous Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="0" y="60" width="100" height="30" uuid="a2585866-90c0-4b59-b68a-509247a5927e"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["Next Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="390" y="0" width="100" height="30" uuid="09a6c4ad-4b9a-43be-a05e-bc57a5b18bf9"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{FirstDateOfCurrentMonth}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="230" y="0" width="160" height="30" uuid="b67025b7-8677-4a3f-8f8d-1162bf7d26e3"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["First Date of Current Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="670" y="0" width="100" height="30" uuid="421e66b1-d745-4117-bee0-0af184eaca3d"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{FirstDayOfCurrentMonth}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="510" y="0" width="160" height="30" uuid="d180e9ba-ae84-4b94-9b51-43648bba475a"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["First Day of Current Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="230" y="30" width="160" height="30" uuid="7157a773-e62f-4e0c-9f03-4696a30a9136"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["First Date of Previous Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="390" y="30" width="100" height="30" uuid="3d3ed51e-f5f0-4892-9c42-ae52ef3b7651"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{FirstDateOfPreviousMonth}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="510" y="30" width="160" height="30" uuid="b384ade7-ea31-45ec-a756-82c37b8f6e02"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["First Day of Previous Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="670" y="30" width="100" height="30" uuid="4990802a-be00-4306-91f6-1a5e50c4bc98"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{FirstDayOfPreviousMonth}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="230" y="60" width="160" height="30" uuid="87c32b3a-5794-4853-b5de-129f0273b839"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["First Date of Next  Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="390" y="60" width="100" height="30" uuid="5d12680a-5c90-4b9f-af78-c41df1c5167d"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{FirstDateOfNextMonth}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="510" y="60" width="160" height="30" uuid="c981572c-6f18-4eb9-a7b9-d875d19f26ca"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["First Day of Next  Month"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="670" y="60" width="100" height="30" uuid="77c38b0a-3206-4767-9519-0e497db7cbe0"/>
                <textElement verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{FirstDayOfNextMonth}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="770" y="0" width="80" height="30" uuid="259b0efd-cf1c-4963-a4e3-1785d602d59c"/>
                <textElement textAlignment="Left" verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{CurrentDateFirstDayValueInteger}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="770" y="30" width="80" height="30" uuid="f10baf74-a727-48d9-bfcf-1b6d3452736f"/>
                <textElement textAlignment="Left" verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{PerviousMonthFirstDayValueInteger}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="770" y="60" width="80" height="30" uuid="71be88e2-4893-41d5-bef4-6bbdb4cb7c6a"/>
                <textElement textAlignment="Left" verticalAlignment="Middle">
                    <font size="11" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{NextMonthFirstDayValueInteger}]]></textFieldExpression>
            </textField>
            <textField hyperlinkType="ReportExecution" hyperlinkTarget="Blank">
                <reportElement x="139" y="126" width="281" height="30" uuid="7d969a03-940c-4081-8210-d90686c0ae5c"/>
                <textElement>
                    <font size="14"/>
                </textElement>
                <textFieldExpression><![CDATA["Previous Month"]]></textFieldExpression>
                <hyperlinkParameter name="_report">
                    <hyperlinkParameterExpression><![CDATA["/EarthlySystems/Previous_and_Next_Months"]]></hyperlinkParameterExpression>
                </hyperlinkParameter>
                <hyperlinkParameter name="Date">
                    <hyperlinkParameterExpression><![CDATA[$P{PreviousMonthDate}]]></hyperlinkParameterExpression>
                </hyperlinkParameter>
                <hyperlinkParameter name="DayReturnValueInteger">
                    <hyperlinkParameterExpression><![CDATA[$P{PerviousMonthFirstDayValueInteger}]]></hyperlinkParameterExpression>
                </hyperlinkParameter>
            </textField>
            <textField hyperlinkType="ReportExecution" hyperlinkTarget="Blank">
                <reportElement x="440" y="126" width="281" height="30" uuid="64116c95-e582-476e-b5ca-fe88e26c7d77"/>
                <textElement>
                    <font size="14"/>
                </textElement>
                <textFieldExpression><![CDATA["Next  Month"]]></textFieldExpression>
                <hyperlinkParameter name="_report">
                    <hyperlinkParameterExpression><![CDATA["/EarthlySystems/Previous_and_Next_Months"]]></hyperlinkParameterExpression>
                </hyperlinkParameter>
                <hyperlinkParameter name="Date">
                    <hyperlinkParameterExpression><![CDATA[$P{NextMonthDate}]]></hyperlinkParameterExpression>
                </hyperlinkParameter>
                <hyperlinkParameter name="DayReturnValueInteger">
                    <hyperlinkParameterExpression><![CDATA[$P{NextMonthFirstDayValueInteger}]]></hyperlinkParameterExpression>
                </hyperlinkParameter>
            </textField>
        </band>
    </title>
    <pageHeader>
        <band height="35" splitType="Stretch"/>
    </pageHeader>
    <columnHeader>
        <band height="61" splitType="Stretch"/>
    </columnHeader>
    <detail>
        <band height="125" splitType="Stretch"/>
    </detail>
    <columnFooter>
        <band height="45" splitType="Stretch"/>
    </columnFooter>
    <pageFooter>
        <band height="54" splitType="Stretch"/>
    </pageFooter>
    <summary>
        <band height="42" splitType="Stretch"/>
    </summary>
</jasperReport>


I hope it helps some one in community.!

Cheers.!
Sadakar Pochampalli

July 6, 2017

July 5, 2017

Jaspersoft 6.4 Highlights

  • Extended dashboard authoring for hyperlinking, formatting, and editing
  • Granular admin exporting control
  • Built-in support for popular technologies like Salesforce and PhantomJS
  • Updated interface for designing charts in Jaspersoft Studio

Read Detailed Highlights here : Click this link

July 5, 2017

This expression in Jasper reports is useful for a text that need to get into a new line whenever an & occurs but the problem is though the text gets into a new line it is displaying an extra & on output. 

Hence, using another replaceAll function from core java for field object we can overcome getting extra &.


Sample Expression:
 $F{ProjectDescription}.replaceAll("lt;br&gt;", "<br>" ).replaceAll("&","")

Tip Credits: Nimmana

July 5, 2017

June 14, 2017


Change the host name with your computer name or localhost in below two files
listener.ora and
tnsnames.ora

Navigation path to the files :
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN

Now, from the windows services, restart OracleXETNSListener and try connecting to XE SID as shown in below image.

Username : sys , Password : tiger (that is given at the time of installation)

Default password is : sysdba for sys user to connect to xe




The reason for changing host name in my case : 
Recently, I have changed the windows 10  system name and from that point of time, I didn't start oracle db in local but today when I started the oracle db and the listener, the connection for xe SID with sys/tiger credentials not worked.

listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = INISAH)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)


tnsnames.ora
XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = INISAH)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )


June 14, 2017

Pages

Feedback
randomness