Jump to content

mytval

Members
  • Posts

    23
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by mytval

  1.  Hi,

    I had troubles with my installation of iReport 4.1.1 and I decided to reinstall it.

    Problem: When I come with my new iReport installation, I have memorized the datasources and plugins installed in the previous version.

     

    How come is it possible to make it totally clean?

     

    Regards,

    M.

  2.  Hi, 

    It looks like it a biger issue as when creating a crosstab, I got an incomplete XML.

     

     

    Indeed I got generated this extract:

    <bucket>

    <bucketExpression><![CDATA[$F{host}]]></bucketExpression>

    </bucket>

     

    instead of:

    <bucket class="java.lang.String">

    <bucketExpression><![CDATA[$F{host}]]></bucketExpression>

    </bucket>

    That give me an error at the compilation step:

    net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :      1. Class not set for bucket: host[/code]

     

    When I try to reinstall it gives me the same error. 

     

     

     

  3.   I got it working. 

    Actually when I switched to the XML view, I realized there were no class declaration when using the concerned field. 

    Indeed I had:

    <bucket>

    <bucketExpression><![CDATA[$F{host}]]></bucketExpression>

    </bucket>

     

    instead of:

    <bucket class="java.lang.String">

    <bucketExpression><![CDATA[$F{host}]]></bucketExpression>

    </bucket>

     

    I set the missing daclarations and It worked!!!!

    Could someone tell me how to make it work automatically ?

  4.  I got it working. 

    Actually when I switched to the XML view, I realized there were no class declaration when using the concerned field. 

    Indeed I had:


    <bucket>

    <bucketExpression><![CDATA[$F{host}]]></bucketExpression>

    </bucket>

    instead of:

    <bucket class="java.lang.String">

    <bucketExpression><![CDATA[$F{host}]]></bucketExpression>

    </bucket>

    I set the missing daclarations and It worked!!!!

    Could someone tell me how to make it work automatically ?

  5.  Hi,
     
    I'm trying to build a report with a crosstab within the summary band.
    I added my dataset and I can preview the data correctly.
    I also can fill the column (host) and row (service) of my crosstab correctly.
     
    But when I get to compile my report I have this error message, concerning my row and column fields: see code 
     
     
    Any suggestion?
    Cheers,
    M. 
    Code:


    Post Edited by mytval at 08/25/2011 20:44
  6.  Hi,

    I'm not using a main query but only datasets. One of those datasets is used to fill (not successfully done yet but still worling on it) the crosstab.

    If think the dataset is correctly configured as the wizard propose me the right fields. 

  7.  Hi,

    happy to know that you got it working your way!

    I'm newbie ti this but I met the same problem when trying to display a datetime format into time format.

    As I specified at the begining it just consisted to use the function TIME(datetime) and I got it working like that: 

    <![CDATA["time(time)"]]>

     

    If it wasn't the right format then use the function SimpleDateFormat(datetime or time, "%H %i %s") or SEC_TO_TIME(time_in_sec).

    Your formula seems to be hard to understand... I hope you'll find the proper way to do it so that you're code will be more readable.

     

    Cheers,

    M.

     

     

  8.  Hi,

    I'm working with iReport 4.1.1.

    I created a table within the summary band.

    When trying to access the 'Preview' view I don't see any compiling progression bar, no error message and I got redirected back to the 'Designer' view.

    What is going on? 

    Help!!!

    Cheers.

  9.  Hi,

     

    I'm trying to display a crosstable (detail or summary band) but when trying to access the "Preview" section, I get the message "The document has no page" and I couldn't see any results.

    I have no error message.

    My table, called "mytable", in the database aren't empty so I don't get what's going on!!!

     

    mytable looks like that:

    id | callhost | department      | time

    1 |  paris      | commercial       | 2010-02-10 04:20:15

    2 |  orleans | client support    | 2010-02-10 01:30:10

    3 |  nice       | sales&support  | 2010-02-10 03:60:15

     

    Please refers to my XML file in the code section below.

     

     

    Could someone help me with crosstable please?

    Cheers

    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="xqueries-stats" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">	<property name="ireport.zoom" value="1.0"/>	<property name="ireport.x" value="0"/>	<property name="ireport.y" value="77"/>	<style name="Crosstab Data Text" hAlign="Center"/>	<subDataset name="mydataset">		<queryString language="SQL">			<![CDATA[select * from mytable]]>		</queryString>		<field name="id" class="java.lang.Long"/>		<field name="callhost" class="java.lang.String"/>		<field name="department" class="java.lang.String"/>		<field name="time" class="java.sql.Timestamp"/>	</subDataset>	<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="125" splitType="Stretch">			<crosstab>				<reportElement x="0" y="0" width="555" height="125"/>				<crosstabDataset>					<dataset>						<datasetRun subDataset="mydataset">							<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>						</datasetRun>					</dataset>				</crosstabDataset>				<rowGroup name="callhost" width="70" totalPosition="End">					<bucket class="java.lang.String">						<bucketExpression><![CDATA[$F{callhost}]]></bucketExpression>					</bucket>					<crosstabRowHeader>						<cellContents backcolor="#FF6347" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<textField>								<reportElement style="Crosstab Data Text" x="0" y="0" width="70" height="25"/>								<textElement/>								<textFieldExpression><![CDATA[$V{callhost}]]></textFieldExpression>							</textField>						</cellContents>					</crosstabRowHeader>					<crosstabTotalRowHeader>						<cellContents backcolor="#FFC9BF" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<staticText>								<reportElement x="0" y="0" width="70" height="25"/>								<textElement textAlignment="Center" verticalAlignment="Middle"/>								<text><![CDATA[Total callhost]]></text>							</staticText>						</cellContents>					</crosstabTotalRowHeader>				</rowGroup>				<columnGroup name="department" height="30" totalPosition="End">					<bucket class="java.lang.String">						<bucketExpression><![CDATA[$F{department}]]></bucketExpression>					</bucket>					<crosstabColumnHeader>						<cellContents backcolor="#FF6347" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<textField>								<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="30"/>								<textElement/>								<textFieldExpression><![CDATA[$V{department}]]></textFieldExpression>							</textField>						</cellContents>					</crosstabColumnHeader>					<crosstabTotalColumnHeader>						<cellContents backcolor="#FFC9BF" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<staticText>								<reportElement x="0" y="0" width="50" height="30"/>								<textElement textAlignment="Center" verticalAlignment="Middle"/>								<text><![CDATA[Total department]]></text>							</staticText>						</cellContents>					</crosstabTotalColumnHeader>				</columnGroup>				<measure name="timeMeasure" class="java.lang.Integer" calculation="Count">					<measureExpression><![CDATA[$F{time}]]></measureExpression>				</measure>				<crosstabCell width="50" height="25">					<cellContents>						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>				<crosstabCell height="25" rowTotalGroup="callhost">					<cellContents backcolor="#FFC9BF" mode="Opaque">						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>				<crosstabCell width="50" height="25" columnTotalGroup="department">					<cellContents backcolor="#FFC9BF" mode="Opaque">						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>				<crosstabCell height="25" rowTotalGroup="callhost" columnTotalGroup="department">					<cellContents backcolor="#FFC9BF" mode="Opaque">						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>			</crosstab>		</band>	</summary></jasperReport>
  10.  And mytable looks like that:

    id | callhost | department      | time

    1 |  paris      | commercial       | 2010-02-10 04:20:15

    2 |  orleans | client support    | 2010-02-10 01:30:10

    3 |  nice       | sales&support  | 2010-02-10 03:60:15

  11.  Here is my XML file

    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="xqueries-stats" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">	<property name="ireport.zoom" value="1.0"/>	<property name="ireport.x" value="0"/>	<property name="ireport.y" value="77"/>	<style name="Crosstab Data Text" hAlign="Center"/>	<subDataset name="mydataset">		<queryString language="SQL">			<![CDATA[select * from mytable]]>		</queryString>		<field name="id" class="java.lang.Long"/>		<field name="callhost" class="java.lang.String"/>		<field name="department" class="java.lang.String"/>		<field name="time" class="java.sql.Timestamp"/>	</subDataset>	<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="125" splitType="Stretch">			<crosstab>				<reportElement x="0" y="0" width="555" height="125"/>				<crosstabDataset>					<dataset>						<datasetRun subDataset="mydataset">							<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>						</datasetRun>					</dataset>				</crosstabDataset>				<rowGroup name="callhost" width="70" totalPosition="End">					<bucket class="java.lang.String">						<bucketExpression><![CDATA[$F{callhost}]]></bucketExpression>					</bucket>					<crosstabRowHeader>						<cellContents backcolor="#FF6347" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<textField>								<reportElement style="Crosstab Data Text" x="0" y="0" width="70" height="25"/>								<textElement/>								<textFieldExpression><![CDATA[$V{callhost}]]></textFieldExpression>							</textField>						</cellContents>					</crosstabRowHeader>					<crosstabTotalRowHeader>						<cellContents backcolor="#FFC9BF" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<staticText>								<reportElement x="0" y="0" width="70" height="25"/>								<textElement textAlignment="Center" verticalAlignment="Middle"/>								<text><![CDATA[Total callhost]]></text>							</staticText>						</cellContents>					</crosstabTotalRowHeader>				</rowGroup>				<columnGroup name="department" height="30" totalPosition="End">					<bucket class="java.lang.String">						<bucketExpression><![CDATA[$F{department}]]></bucketExpression>					</bucket>					<crosstabColumnHeader>						<cellContents backcolor="#FF6347" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<textField>								<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="30"/>								<textElement/>								<textFieldExpression><![CDATA[$V{department}]]></textFieldExpression>							</textField>						</cellContents>					</crosstabColumnHeader>					<crosstabTotalColumnHeader>						<cellContents backcolor="#FFC9BF" mode="Opaque">							<box>								<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>							</box>							<staticText>								<reportElement x="0" y="0" width="50" height="30"/>								<textElement textAlignment="Center" verticalAlignment="Middle"/>								<text><![CDATA[Total department]]></text>							</staticText>						</cellContents>					</crosstabTotalColumnHeader>				</columnGroup>				<measure name="timeMeasure" class="java.lang.Integer" calculation="Count">					<measureExpression><![CDATA[$F{time}]]></measureExpression>				</measure>				<crosstabCell width="50" height="25">					<cellContents>						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>				<crosstabCell height="25" rowTotalGroup="callhost">					<cellContents backcolor="#FFC9BF" mode="Opaque">						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>				<crosstabCell width="50" height="25" columnTotalGroup="department">					<cellContents backcolor="#FFC9BF" mode="Opaque">						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>				<crosstabCell height="25" rowTotalGroup="callhost" columnTotalGroup="department">					<cellContents backcolor="#FFC9BF" mode="Opaque">						<box>							<pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/>						</box>						<textField>							<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>							<textElement/>							<textFieldExpression><![CDATA[$V{timeMeasure}]]></textFieldExpression>						</textField>					</cellContents>				</crosstabCell>			</crosstab>		</band>	</summary></jasperReport>
  12.  Hi,

     

    I'm trying to display a crosstable (detail or summary band) but when trying to access the "Preview" section, I get the message "The document has no page" and I couldn't see any results.

    My table in the database aren't empty so I don't get what's going on!!!

     

    Could someone help me with crosstable?

    Cheers

  13.  Hi,

    I'm totaly brand new to reporting and for iReport.

    I'm trying to get how it work and especially about the detail and summary bands. Indeed as it's possible to get several details bands wihtin one report I had a preference for this one. But I have to admit I don't know much about each band role.

    It seems like some components aren't working in the detail band but work fine for the summary band: e.g. table. Why my table are well displayed when located in summary and not in detail? 

     

    Thanks in advance!

     

  14.  Hi all,

    I'm totally new to the reporting world and my first trials are with iReport 4.1.1

     

    I'm looking for the right way to have multiple queries into the same report... I founded a post wich enumerates 3 methods: using sub dataset, using sub report, using tables (http://stackoverflow.com/questions/3927183/using-multiple-tables-in-ireport).

     

    Could someone be more expansive about that? Even a link redirection would be welcome.

     

    Thank's a lot!

     

×
×
  • Create New...