Planet Jaspersoft

Filter by tags:

June 5, 2017

Calculate, first date of the given date , the day of the first date and return 0,1,2,3... for Sun, Mon, Tue,Wed and etc.



JRXML : Copy paste below code in a JRXML file and preview the report.
(Supports in 6.x CE & Pro Studio)

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.3.1.final using JasperReports Library version 6.3.1  -->
<!-- 2017-06-05T22:43:54 -->
<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="demo_calendar" columnCount="7" printOrder="Horizontal" pageWidth="1500" pageHeight="612" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="211" leftMargin="11" rightMargin="11" topMargin="10" bottomMargin="10" uuid="32abf871-39b8-4cc7-b03c-d950a55e2bfb">
 <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
 <property name="com.jaspersoft.studio.data.defaultdataadapter" value="foodmart"/>
 <property name="com.jaspersoft.studio.unit." value="pixel"/>
 <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="/Work/EarthlySystem/Reports/CalenderReport_files/main_jrxml"/>
 <property name="ireport.jasperserver.reportUnit" value="/Work/EarthlySystem/Reports/CalenderReport"/>
 <style name="Style1" forecolor="#050505">
  <conditionalStyle>
   <conditionExpression><![CDATA[$F{id}.intValue()%7==1]]></conditionExpression>
   <style forecolor="#FA0702"/>
  </conditionalStyle>
 </style>
 <parameter name="Date" class="java.util.Date">
  <defaultValueExpression><![CDATA[new Date()]]></defaultValueExpression>
 </parameter>
 <parameter name="FirstDateOfMonth" 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="FirstDayOfMonth" 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="DayReturnValueString" class="java.lang.String" isForPrompting="false">
  <parameterDescription><![CDATA[]]></parameterDescription>
  <defaultValueExpression><![CDATA[$P{FirstDayOfMonth}.equals("Sun") ? "0":
$P{FirstDayOfMonth}.equals("Mon") ? "1" :
$P{FirstDayOfMonth}.equals("Tue") ? "2" :
$P{FirstDayOfMonth}.equals("Wed") ? "3" :
$P{FirstDayOfMonth}.equals("Thu") ? "4" :
$P{FirstDayOfMonth}.equals("Fri") ? "5" :
$P{FirstDayOfMonth}.equals("Sat") ? "6" : "100"]]></defaultValueExpression>
 </parameter>
 <parameter name="DayReturnValueInteger" class="java.lang.Integer" isForPrompting="false">
  <parameterDescription><![CDATA[]]></parameterDescription>
  <defaultValueExpression><![CDATA[Integer.parseInt($P{DayReturnValueString})]]></defaultValueExpression>
 </parameter>
 <queryString>
  <![CDATA[select 1 as One]]>
 </queryString>
 <field name="one" class="java.lang.Integer"/>
 <title>
  <band height="180">
   <textField pattern="MMMM d, yyyy">
    <reportElement x="330" y="0" width="190" height="30" uuid="21293131-3839-43aa-b449-b19867eee2da"/>
    <textElement textAlignment="Left" verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA[$P{Date}]]></textFieldExpression>
   </textField>
   <staticText>
    <reportElement mode="Opaque" x="844" y="30" width="210" height="31" forecolor="#000000" backcolor="#FFFFFF" uuid="81be3ac1-c1c1-4573-86a7-67c891288f1c">
     <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
    </reportElement>
    <box>
     <pen lineWidth="1.0" lineColor="#B1B5B4"/>
    </box>
    <textElement textAlignment="Center" verticalAlignment="Middle">
     <font size="14" isBold="true"/>
    </textElement>
    <text><![CDATA[Thursday]]></text>
   </staticText>
   <staticText>
    <reportElement mode="Opaque" x="1055" y="30" width="210" height="31" forecolor="#000000" backcolor="#FFFFFF" uuid="9442d83e-3726-4db9-8746-04b2fea1449b">
     <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
     <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
    </reportElement>
    <box>
     <pen lineWidth="1.0" lineColor="#B1B5B4"/>
    </box>
    <textElement textAlignment="Center" verticalAlignment="Middle">
     <font size="14" isBold="true"/>
    </textElement>
    <text><![CDATA[Friday]]></text>
   </staticText>
   <staticText>
    <reportElement mode="Opaque" x="1266" y="30" width="210" height="31" forecolor="#000000" backcolor="#FFFFFF" uuid="edc883b5-0e35-4e17-8a45-56efc9dacf6a">
     <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
     <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
    </reportElement>
    <box>
     <pen lineWidth="1.0" lineColor="#B1B5B4"/>
    </box>
    <textElement textAlignment="Center" verticalAlignment="Middle">
     <font size="14" isBold="true"/>
    </textElement>
    <text><![CDATA[Saturday]]></text>
   </staticText>
   <textField>
    <reportElement x="330" y="30" width="190" height="30" uuid="ca304690-d49b-4280-8c75-8fd1451bd59f"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA[new SimpleDateFormat("MM/dd/yyyy").format(java.util.Date.parse(MONTH(NOW( )) + "/1/" + YEAR(NOW())))]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="330" y="61" width="190" height="30" uuid="5d27b8b2-76cf-4eed-8486-6644f5a2c77c"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA[$P{FirstDateOfMonth}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="330" y="90" width="190" height="30" uuid="66294bd1-0841-4c2a-b33a-928a0cb1aa0a"/>
    <textElement>
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA[$P{FirstDayOfMonth}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="330" y="120" width="190" height="30" uuid="83fa6364-da26-4578-beaf-58932abc6aab"/>
    <textElement>
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA[$P{DayReturnValueString}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="330" y="150" width="190" height="30" uuid="e341926d-38a0-40e7-b4a6-9232352a7247"/>
    <textElement>
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA[$P{DayReturnValueInteger}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="0" y="30" width="330" height="30" uuid="132ad66e-8839-4c41-8e00-9d77cf0ad6b8"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA["First Date Of Month In TEXT field"]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="0" y="60" width="330" height="30" uuid="166e5bec-db19-4a56-a335-470008c8094c"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA["First Date Of Month from Parameter Calcualtion"]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="0" y="91" width="330" height="30" uuid="dfd0e3d3-1641-4380-984f-0066d8a9112c"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA["Day Name of First Date Of Month"]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="0" y="120" width="330" height="30" uuid="d64905e0-2d87-415f-acab-3747492a2071"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA["Retruning 0,1,2... for Sun, Mon, Tue, ...."+"as a String"]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="0" y="150" width="330" height="30" uuid="99f5b0f5-cefb-449b-9edb-e444e4afa5d5"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA["Retruning 0,1,2... for Sun, Mon, Tue, ...."+"as an Integer"]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement x="0" y="0" width="330" height="30" uuid="09477045-1a0c-4c25-8776-715036b8c726"/>
    <textElement verticalAlignment="Middle">
     <font size="12" isBold="true"/>
    </textElement>
    <textFieldExpression><![CDATA["Date Entered"]]></textFieldExpression>
   </textField>
  </band>
 </title>
</jasperReport>

June 5, 2017

May 9, 2017


Below are the few common Jasper Reports Testing Scenarios 

General Browser UI
1) Verify the end-user is able to login with the credentials
For example: biuser/biuser
2) Verify report layout as per the mock-up
3) Verify the title of the report – preferable to keep at top middle of the report.
4) Verify the logo of the customer/client – preferable to keep left top of the report. 
5) Verify page number is displayed on the report and is in sequence
6) Verify font, font size of headers and of text consistent throughout the report 
7) Verify tooltip on the report wherever asked to provide
8) Verify report generated date and time.
9) Verify hyperlinks are working fine. 
10) Verify spell check on the report. 
11) Verify numeric values are left aligned and text is right aligned and test padding is applied for them. 
12) Verify pattern (or separator) for numeric values. 
13) Verify report left and right alignments. 
14) Verify NOTE is present wherever asked to provide. 
15) Verify report user guide is added as a PDF or Word as hyperlink to download the file. 
Excel Export 
1) Verify logos are exported to excel.
2) Verify font family and size is same as per the report design. 
3) Verify type of columns for numeric and date fields. Some user may apply formulas or functions in exported excel sheets. 
4) Verify for no empty rows and no empty columns. 
5) Verify exported excel file name should match with the report name. 
Filters testing: 
1) Verify for mandatory filters
2) Verify if the report has cascading filters
3) Verify filters values are in sorted order. 
4) No Data Display message 

May 9, 2017

March 29, 2017

This is a quick re-visit of JFree Stacked Bar chart in Jasper.

Query Format : 
select * from 
(
(
SELECT 
'Store Sales' as Sales, 
date(t.the_date) as date,
SUM(sf7.Store_sales) as SalesFact
FROM sales_fact_1997 sf7  JOIN time_by_day t 
ON sf7.time_id=t.time_id GROUP BY Sales,the_date ORDER BY date
limit 25
)

UNION
(
SELECT 
'Unit Sales' as Sales,
date(t.the_date) as date,
SUM(sf7.unit_sales) as SalesFact  
FROM sales_fact_1997 sf7  JOIN time_by_day t 
ON sf7.time_id=t.time_id GROUP BY Sales,the_date ORDER BY date
limit 25
)
) a ORDER BY a.date

Query Output:
Sales          date          salesfact

"Unit Sales";"2012-01-01";348.0000
"Store Sales";"2012-01-01";706.3400
"Unit Sales";"2012-01-02";635.0000
"Store Sales";"2012-01-02";1304.5300
"Store Sales";"2012-01-03";1294.1200
"Unit Sales";"2012-01-03";589.0000
"Unit Sales";"2012-01-04";20.0000
"Store Sales";"2012-01-04";42.8700
"Store Sales";"2012-01-05";1987.1900
"Unit Sales";"2012-01-05";966.0000


Chart Design : 

Final Output:


JRXML Code : 

Jasper Design Studio Version : Professional 6.3 (If you are using CE studio code may not work)

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.3.0.final using JasperReports Library version 6.3.0  -->
<!-- 2017-03-30T02:48:52 -->
<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="BarChartCustomization_XAxisLabels" pageWidth="800" pageHeight="842" columnWidth="760" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9e71469d-a266-48ee-9989-9c4913b1190f">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="foodmart"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<queryString>
<![CDATA[select * from 
(
(
SELECT 
'Store Sales' as Sales, 
date(t.the_date) as date,
SUM(sf7.Store_sales) as SalesFact
FROM sales_fact_1997 sf7  JOIN time_by_day t 
ON sf7.time_id=t.time_id GROUP BY Sales,the_date ORDER BY date
limit 5
)

UNION
(
SELECT 
'Unit Sales' as Sales,
date(t.the_date) as date,
SUM(sf7.unit_sales) as SalesFact  
FROM sales_fact_1997 sf7  JOIN time_by_day t 
ON sf7.time_id=t.time_id GROUP BY Sales,the_date ORDER BY date
limit 5
)
) a ORDER BY a.date]]>
</queryString>
<field name="sales" class="java.lang.String"/>
<field name="date" class="java.sql.Date"/>
<field name="salesfact" class="java.math.BigDecimal"/>
<background>
<band splitType="Stretch"/>
</background>
<summary>
<band height="360" splitType="Stretch">
<stackedBarChart>
<chart evaluationTime="Report">
<reportElement x="0" y="0" width="760" height="360" uuid="f13a44b1-bb8f-49b9-8bd8-4b048ef7e26d"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA[$F{sales}]]></seriesExpression>
<categoryExpression><![CDATA[$F{date}.toString()]]></categoryExpression>
<valueExpression><![CDATA[$F{salesfact}]]></valueExpression>
</categorySeries>
</categoryDataset>
<barPlot>
<plot labelRotation="60.0">
<seriesColor seriesOrder="0" color="#BF6B83"/>
<seriesColor seriesOrder="1" color="#129D10"/>
</plot>
<itemLabel/>
<categoryAxisFormat labelRotation="60.0">
<axisFormat/>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat/>
</valueAxisFormat>
</barPlot>
</stackedBarChart>
</band>
</summary>
</jasperReport>

March 29, 2017

March 22, 2017


Are you a community customer ?
Is your 30-day trail license expired for studio and server ?
Do you want to learn or explore TIBCO jaspersoft Studio Professional features ?
Do you want to learn Enterprise server features (limited in demo as end user) ?
Did you ask your folks to explore self service BI ?
Did you ask your folks to explore self service Dashboards ?

Here you go with Online demo server. You can evaluate TIBCO jasperserver as an end user.

Copy paste or click on below URL
https://mobiledemo.jaspersoft.com/jasperserver-pro/

UserName/Password : joeuser/joeuser


Exploring Self Service BI with Ad-Hoc Views 
Sample Example : Sales Trend By State 

Connecting to this demo server in Studio : 

Exploring out of the examples : 
Viewing the same in server


This way, a new customer or migrating customer or a community folk who wants to explore jasper can dig the enterprise features.

As this server is accessible only with enduser permissions, if you want to explore security side you can refer to the documentation at http://community.jaspersoft.com/documentation?version=33331


- Sadakar Pochampalli 

March 22, 2017

March 9, 2017

This is a redistribution of import and export features of MySQL workbench.


6.5.1 Table Data Export and Import Wizard


https://dev.mysql.com/doc/workbench/en/wb-admin-export-import-table.html



he wizard is accessible from the object browser's context menu by right-clicking on a table and choose either Table Data Export Wizard orTable Data Import Wizard.
Figure 6.14 Table Data Wizards: Open
Table Data Wizards: Open

Table Data Export Wizard

Export table data to either a JSON or CSV file. The following example exports the sakila.actor table to a CSV file.
Figure 6.15 Table Data Export: Source
Table Data Export: Source

Figure 6.16 Table Data Export: CSV Configuration
Table Data Export: Configuration

Figure 6.17 Table Data Export: Results
Table Data Export: Results

Table Data Import Wizard

Import table data from either a JSON or CSV file. The following example imports the sakila.actor table from a CSV file.
Figure 6.18 Table Data Import: CSV Source
Table Data Import: CSV Source

Figure 6.19 Table Data Import: Destination Table
Table Data Import: Destination Table

Figure 6.20 Table Data Import: CSV Configuration
Table Data Import: CSV Configuration

Note
The Encoding field should correspond with your CSV file.
Figure 6.21 Table Data Import: Results
Table Data Import: Results

March 9, 2017

January 6, 2017

Want to change the look of JasperReports Server for each of your tenants or organizations? Check out this tutorial to learn more.

January 6, 2017

January 5, 2017

Want to change the look of JasperReports Server? Jaspersoft themes allow you to modify CSS and images to customize any aspect of the server including colors, logos, fonts and object placement.

January 5, 2017

October 14, 2016

In a Datawarehouse setup, the quintessential decision needs to be taken is how to load the data. There are couple of standard ways in DW Full Load : Where the complete set of data will be loaded into DW table from source table Incremental Load : Where the subset of data is loaded into DW […]

October 14, 2016

October 4, 2016

RAJESH SIRSIKAR TECH LEAD Date of Birth 08July 1982 Address 125Mahaveer Calyx, Arekere Post 560076 Phone +91 – 9972212121 E-mail rajeshsirsikar.jaspe

October 4, 2016

Pages

Feedback
randomness