Jump to content
We've recently updated our Privacy Statement, available here ×

Data Source Error


asfandyar.khalil

Recommended Posts

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

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

<!-- Created with Jaspersoft Studio version 6.3.1.final using JasperReports Library version 6.3.1  -->

<!-- 2017-09-26T16:03:22 -->

<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_014" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="842" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="fc398cc5-1420-4d68-ba36-1088f0cff748">

    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="chart"/>

    <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="#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="Crosstab_CG" 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="Crosstab_CT" 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="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>

    <subDataset name="CROSSTAB" uuid="89bd39c8-839e-49fd-aa39-fe5bf6334b55">

        <property name="com.jaspersoft.studio.data.defaultdataadapter" value="crosstab"/>

        <queryString language="XLS">

            <![CDATA[]]>

        </queryString>

        <field name="Source Network Group" class="java.lang.String"/>

        <field name="ICSs" class="java.lang.String"/>

        <field name="Values" class="java.lang.Integer"/>

    </subDataset>

    <queryString language="XLS">

        <![CDATA[]]>

    </queryString>

    <field name="Source Network" class="java.lang.String"/>

    <field name="Prcnt. of ISCs Phishing" class="java.lang.Integer"/>

    <field name="# of ISCs Phishing" class="java.lang.Integer"/>

    <field name="Total ISCs" class="java.lang.Integer"/>

    <background>

        <band splitType="Stretch"/>

    </background>

    <pageHeader>

        <band height="367" splitType="Stretch">

            <barChart>

                <chart evaluationTime="Report">

                    <reportElement x="0" y="0" width="842" height="367" uuid="815da873-f36b-4c75-aab4-3c44f7190b2e"/>

                    <chartTitle/>

                    <chartSubtitle/>

                    <chartLegend/>

                </chart>

                <categoryDataset>

                    <categorySeries>

                        <seriesExpression><![CDATA[$F{Prcnt. of ISCs Phishing}]]></seriesExpression>

                        <categoryExpression><![CDATA[$F{Source Network}]]></categoryExpression>

                        <valueExpression><![CDATA[$F{Prcnt. of ISCs Phishing}]]></valueExpression>

                        <labelExpression><![CDATA[$F{Source Network}]]></labelExpression>

                    </categorySeries>

                </categoryDataset>

                <barPlot>

                    <plot/>

                    <itemLabel/>

                    <categoryAxisFormat>

                        <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/>

                    </categoryAxisFormat>

                    <valueAxisFormat>

                        <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/>

                    </valueAxisFormat>

                </barPlot>

            </barChart>

        </band>

    </pageHeader>

    <summary>

        <band height="60" splitType="Stretch">

            <crosstab>

                <reportElement x="10" y="0" width="822" height="60" uuid="d5c523a8-0380-40b9-be03-1bc337c016fa">

                    <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>

                    <property name="com.jaspersoft.studio.crosstab.style.header" value="Crosstab_CH"/>

                    <property name="com.jaspersoft.studio.crosstab.style.group" value="Crosstab_CG"/>

                    <property name="com.jaspersoft.studio.crosstab.style.total" value="Crosstab_CT"/>

                    <property name="com.jaspersoft.studio.crosstab.style.detail" value="Crosstab_CD"/>

                </reportElement>

                <crosstabDataset>

                    <dataset>

                        <datasetRun subDataset="CROSSTAB" uuid="4003cbe2-b878-411c-8f9b-23f0dcbf9fa9"/>

                    </dataset>

                </crosstabDataset>

                <rowGroup name="ICSs" width="60" totalPosition="End">

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

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

                    </bucket>

                    <crosstabRowHeader>

                        <cellContents mode="Opaque" style="Crosstab_CH">

                            <textField>

                                <reportElement x="0" y="0" width="60" height="20" uuid="6ffb4233-e596-4334-bfb0-1495544fd8a9"/>

                                <textFieldExpression><![CDATA[$V{ICSs}]]></textFieldExpression>

                            </textField>

                        </cellContents>

                    </crosstabRowHeader>

                    <crosstabTotalRowHeader>

                        <cellContents mode="Opaque" style="Crosstab_CT">

                            <staticText>

                                <reportElement x="0" y="0" width="60" height="20" uuid="18a09636-17bc-4bd9-9064-7d5c55f90b39"/>

                                <text><![CDATA[Total ICSs]]></text>

                            </staticText>

                        </cellContents>

                    </crosstabTotalRowHeader>

                </rowGroup>

                <columnGroup name="Source Network Group" height="20" totalPosition="End">

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

                        <bucketExpression><![CDATA[$F{Source Network Group}]]></bucketExpression>

                    </bucket>

                    <crosstabColumnHeader>

                        <cellContents mode="Opaque" style="Crosstab_CH">

                            <textField>

                                <reportElement x="0" y="0" width="60" height="20" uuid="ad65d5c4-ac7a-4936-b9d9-aab7d1fa96d0"/>

                                <textFieldExpression><![CDATA[$V{Source Network Group}]]></textFieldExpression>

                            </textField>

                        </cellContents>

                    </crosstabColumnHeader>

                    <crosstabTotalColumnHeader>

                        <cellContents mode="Opaque" style="Crosstab_CT">

                            <staticText>

                                <reportElement x="0" y="0" width="60" height="20" uuid="884d18ab-4afd-424e-805a-ae7d964dddb6"/>

                                <text><![CDATA[Total Source Network Group]]></text>

                            </staticText>

                        </cellContents>

                    </crosstabTotalColumnHeader>

                </columnGroup>

                <measure name="Values_MEASURE" class="java.lang.Integer" calculation="Sum">

                    <measureExpression><![CDATA[$F{Values}]]></measureExpression>

                </measure>

                <crosstabCell width="60" height="20">

                    <cellContents mode="Opaque" style="Crosstab_CD">

                        <textField>

                            <reportElement x="0" y="0" width="60" height="20" uuid="6cdf5e28-2cb9-4e15-b065-256d2f8b2af2"/>

                            <textFieldExpression><![CDATA[$V{Values_MEASURE}]]></textFieldExpression>

                        </textField>

                    </cellContents>

                </crosstabCell>

                <crosstabCell width="60" height="20" columnTotalGroup="Source Network Group">

                    <cellContents mode="Opaque" style="Crosstab_CT">

                        <textField>

                            <reportElement x="0" y="0" width="60" height="20" uuid="4216d617-af20-476e-8221-b8010ba09e27"/>

                            <textFieldExpression><![CDATA[$V{Values_MEASURE}]]></textFieldExpression>

                        </textField>

                    </cellContents>

                </crosstabCell>

                <crosstabCell width="60" height="20" rowTotalGroup="ICSs">

                    <cellContents mode="Opaque" style="Crosstab_CT">

                        <textField>

                            <reportElement x="0" y="0" width="60" height="20" uuid="77238a5b-45d5-4f2e-b9b2-64c5f0e80575"/>

                            <textFieldExpression><![CDATA[$V{Values_MEASURE}]]></textFieldExpression>

                        </textField>

                    </cellContents>

                </crosstabCell>

                <crosstabCell width="60" height="20" rowTotalGroup="ICSs" columnTotalGroup="Source Network Group">

                    <cellContents mode="Opaque" style="Crosstab_CT">

                        <textField>

                            <reportElement x="0" y="0" width="60" height="20" uuid="881eb974-6290-4220-b561-69fc9dfa8eba"/>

                            <textFieldExpression><![CDATA[$V{Values_MEASURE}]]></textFieldExpression>

                        </textField>

                    </cellContents>

                </crosstabCell>

            </crosstab>

        </band>

    </summary>

</jasperReport>

 

Above is my source code. I assign main dataset to a chart while a subset to a crosstab. But I am getting the error below

 

NoSuchMethodException: net.sf.jasperreports.engine.data.ExcelDataSource.()

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Usually this issue occurs when you set the queryString language="XLS" without having a XLS file related to it.

In your example, the queryString language is "XLS" for both subdataset and main dataset. Make sure there is a XLS file associated with both "chart" and "crosstab" data adapters.

Link to comment
Share on other sites

The selected Data Adapter is "chart".

 

But in a source, the below below querystring tag seems a cause of problem. The bold charaters shown below are red in the source.

<queryString language="XLS">
            <![CDATA[ ]]>
        </queryString>

 

 

<queryString language="XLS">
        <![CDATA[ ]]>
    </queryString>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...