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

  • eongaro

    When defining subreports that use a domain datasource within iReport, there are a few parameters that must be defined to pass the appropriate connection details to the subreport.

    Parameters to add to main report and subreport files

    In main report and every subreport JRXML file, declare the following parameters:

    [toc]
    <parameter class="com.jaspersoft.commons.semantic.Schema"
               isforprompting="false"
               name="slSchema" />
    <parameter class="com.jaspersoft.commons.semantic.datasource.SemanticLayerFactory"
               isforprompting="false"
               name="slFactory" />
    

    Declaring paramters to pass from between the main report and subreport

    In main report, declare the above parameters to pass to subreport (This is done within the tag):

    <subreportparameter name="slSchema">
        <subreportparameterexpression>
            <!--[CDATA[$P{slSchema}]]-->
        </subreportparameterexpression>
    </subreportparameter>
    <subreportparameter name="slFactory">
        <subreportparameterexpression>
            <!--[CDATA[$P{slFactory}]]-->
        </subreportparameterexpression>
    </subreportparameter>
    

    Note: Note that these parameters can be added through the iReport UI even though they are represented as the resulting xml.

    How To: Domain based Sub-Reports with JasperReports Server


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...