Jump to content
  • Automagically added List/Chart parameters


    Michael Schmid
    Assigned User chicuslavic
    CategoryBug report
    PriorityNormal
    ReproducibilityAlways
    ResolutionFixed
    SeverityMinor
    StatusResolved

    Hi,

     

    I'm working with XML Data source and it works quite well.

    But one thing is annoying - I don't know if it's a bug or simply works as designed.

     

    Assume I have a report based on XPath with the following properties set for the project:

     

    net.sf.jasperreports.xpath.executer.factory = net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory

    net.sf.jasperreports.query.executer.factory.xPath = net.sf.jasperreports.engine.query.JaxenXPathQueryExecuterFactory

    net.sf.jasperreports.query.executer.factory.XPath = net.sf.jasperreports.engine.query.JaxenXPathQueryExecuterFactory

     

    (Btw: Thanks again for the fix the JaxenXPathQueryExecuterFactory default parameters!)

     

    Now when I create a List or a Chart (might be the same for Table or Crosstable) that is also based on a Dataset with an XPath query, then JSS automagically adds in the Parameters dialog (and also in the JRXML source) on the List/Chart all the default parameter of a Jaxen XPath Query.

     

    In the JRXML we get:

     

    ParameterMap()

    $F{DEPTNO}

    $P{XML_DATA_DOCUMENT}

    $P{DOCUMENT_BUILDER_FACTORY}

    $P{XML_NAMESPACE_MAP}

    $P{XML_DATE_PATTERN}

    $P{XML_NUMBER_PATTERN}

    $P{XML_LOCALE}

    $P{XML_TIME_ZONE}

     

    Well, I can remove these (XML_DATA_DOCUMENT etc.) manually so that only the DEPTNO parameter is left.

    My own function ParameterMap() does the job of setting those (and other) interesting parameters.

     

    But, when I save, close and reopen the report again, those default parameter are back again.

    This is nasty because my function ParameterMap() already does the logic of setting the parameters. But this work gets overwritten with the automagically inserted default XPath parameters. :-(

     

    Is this behaviour of automagically adding then default parameters intended? Or is this a bug?

    Would it be possible to turn this behaviour off?

     

    Btw: For the parameters of a Subreport I did NOT observe this in JSS 6.2.1. Only Dataset stuff seems to be affected.

     

    Regards,

    Michael

     



    User Feedback

    Recommended Comments

    Changed Resolution from Open to Fixed

    Changed Status from New to Resolved

    Changed Assigned User from - to @chicuslavic


    if you have something in parametersMapExpression, we'll not produce this datasetParameters anymore
    Link to comment
    Share on other sites


×
×
  • Create New...