Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 16th, 2013, 10:45 AM
Authorized User
Points: 151, Level: 3
Points: 151, Level: 3 Points: 151, Level: 3 Points: 151, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 31
Thanks: 3
Thanked 0 Times in 0 Posts
Unhappy jasperreports and excel(preview flashes)

Hi,

I'm new to jasperreports. i downloaded iReports and When i'm trying to preview the data by clicking the preview tab, it is just flashing and going back, but i'm unable to see the data.

Below is my jrxml

Code:
<?xml version="1.0" encoding="UTF-8"?>

<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report5" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b8a981bc-ae9b-4fcf-8400-f9ecea0567f2">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="Crosstab Data Text" hAlign="Center"/>
<queryString>
<![CDATA[SELECT
   `Date assigned` AS Date_assigned,
   Units,
   `Assigned to PS` AS Assigned_to_PS
FROM
   [Sheet1$]]]>
</queryString>
<field name="Date_assigned" class="java.sql.Timestamp"/>
<field name="Units" class="java.lang.Double"/>
<field name="Assigned_to_PS" class="java.lang.String"/>
<group name="Date_assigned">
<groupExpression><![CDATA[$F{Date_assigned}]]></groupExpression>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</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">
<crosstab>
<reportElement uuid="db476b5b-d93f-4819-a8f6-174bfc88c9b7" x="343" y="0" width="105" height="42"/>
<rowGroup name="Date_assigned" width="70" totalPosition="End">
<bucket class="java.util.Date">
<bucketExpression><![CDATA[$F{Date_assigned}]]></bucketExpression>
</bucket>
<crosstabRowHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="cb26a0e2-7fa8-4124-be7f-f91e491801f7" style="Crosstab Data Text" x="0" y="0" width="70" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{Date_assigned}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabRowHeader>
<crosstabTotalRowHeader>
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<staticText>
<reportElement uuid="c97deff9-a499-4330-aa84-baf20315a1de" x="0" y="0" width="70" height="25"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Total Date_assigned]]></text>
</staticText>
</cellContents>
</crosstabTotalRowHeader>
</rowGroup>
<columnGroup name="Assigned_to_PS" height="30" totalPosition="End">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{Assigned_to_PS}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="7e26e7de-b54f-4490-9ea1-b087247e9c06" style="Crosstab Data Text" x="0" y="0" width="50" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$V{Assigned_to_PS}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<staticText>
<reportElement uuid="86c2ceb5-b2d2-4cc7-953e-0c039e807ec1" x="86" y="0" width="50" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Total Assigned_to_PS]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<measure name="UnitsMeasure" class="java.lang.Double" calculation="Sum">
<measureExpression><![CDATA[$F{Units}]]></measureExpression>
</measure>
<crosstabCell width="120" height="38">
<cellContents>
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="7729498a-0309-4052-a002-e58592da972b" style="Crosstab Data Text" x="28" y="0" width="50" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{UnitsMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="120" height="61" rowTotalGroup="Date_assigned">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="35ba6c60-5505-4eba-be7b-8627a9516c7d" style="Crosstab Data Text" x="28" y="0" width="50" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{UnitsMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="136" height="38" columnTotalGroup="Assigned_to_PS">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="c260e58c-5377-4582-bdfe-59a3f337feee" style="Crosstab Data Text" x="86" y="0" width="50" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{UnitsMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="136" height="61" rowTotalGroup="Date_assigned" columnTotalGroup="Assigned_to_PS">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="468233cd-75a6-4278-ba3f-de35032a5459" style="Crosstab Data Text" x="86" y="0" width="50" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{UnitsMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
</crosstab>
</band>
</summary>
</jasperReport>
This is actually a pivot table from excel data source, please let me know how do i preview it. And also i'm not getting any errors.
The expected output is as below.

HTML Code:
           Amreen    Anirudh Anand   Total
7/1/2013    158                      158
7/2/2013    23                        23
7/3/2013    152      748             900
7/4/2013                
7/5/2013                
7/6/2013    435                      435
7/7/2013    170                      170
7/8/2013    66                        66
7/9/2013    33               33       66
Total      1037      748     33     1818



Thanks
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.Net 2008 Save Print Preview DataGridView inside txt file or Excel remya1000 Visual Studio 2008 0 May 14th, 2012 11:43 PM
jasperreports ravikumar.n J2EE 1 October 22nd, 2008 03:20 AM
VBA Print preview in Excel 2007 solnajeff Excel VBA 1 June 23rd, 2008 01:21 PM
package net.sf.jasperreports.engine does not exist geeta.java BOOK: Beginning JavaServer Pages 1 January 8th, 2008 04:34 AM
Form flashes when I mouseover an unbound Label? wayne62682 Access 4 March 29th, 2006 11:11 AM



All times are GMT -4. The time now is 09:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.