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

BIG ISSUE? -> correlation between SORTING and an error on datasource LIST


visert

Recommended Posts

Hi to all

I'm fighting against a strange situation.

XML datasource... where are defined:


<dataroot>
    <responsabili>
        <responsabile>
            <name>mario rossi 1</name>
        </responsabile>
        <responsabile>
            <name>mario rossi 2</name>
        </responsabile>
        <responsabile>
            <name>mario rossi 3</name>
        </responsabile>
        <responsabile>
            <name>mario rossi 4</name>
        </responsabile>
    </responsabili>

    <QRY_output>
            <COD_PROGRAMMA_RPP>RPP01</COD_PROGRAMMA_RPP>
            <COD_LDS>LDS18</COD_LDS>
            <VALORE_TARGET>4</VALORE_TARGET>
    </QRY_output>
    <QRY_output>
            <COD_PROGRAMMA_RPP>RPP01</COD_PROGRAMMA_RPP>
            <COD_LDS>LDS18</COD_LDS>
            <VALORE_TARGET>5</VALORE_TARGET>
    </QRY_output>

...

...and so on...

...
</dataroot>

I want a list on title band (with the list of all "responsabile" record)

and in detail band a grouped report of "VALORE_TARGET"... grouping for COD_PROGRAMMA_RPP and then for "COD_LDS"....

 

The BIG PROBLEM is.. without SORTING field...the grouping does not work (I read on the "iReport Ultimate Guide"...

"JasperReports groups records by evaluating the group expression. Every time the expression’s value changes, a new group
instance is created. The engine does not perform any record sorting if not explicitly requested, so when we define groups we
should always provide for the sorting. For instance, if we want to group a set of addresses by country, we have to sort the
records before running the report.
"

But if I sort the field to use the groups...then I receive this error on the LIST (SEE CODE BELOW).... WHY????? :-(

I attach the files... I hope that someone could help me!

bye

 

Code:
Error filling print... Error evaluating expression :      Source text : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/dataroot/responsabili/responsabile") net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :      Source text : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/dataroot/responsabili/responsabile") 
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...