Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: How to get the default parameter value when using with beanShell?

  1. #1
    Join Date
    Jul 2012
    Posts
    10

    Default How to get the default parameter value when using with beanShell?

    How to get the default parameter value when using with beanShell? (subreport)
    I am using the version 3.8

    1.I have create Parameter 'SortOrder' with Default Value=asc in parent report.
    2.Create Scriptable - beanshell in subreport
    .........
    .........
    String strSorting = null;
    try{
    strSorting = (String)dataRow.get("SortOrder");
    }catch(Exception e){

    }
    .........
    .........
    It return null value (suppose it return default value asc).
    Last edited by bliss; 07-22-2012 at 01:46 PM.

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Did you pass the parameter to the subreport? Subreports are isolated from the master report and unless you explicitly pass values from the master- into the sub-report, the subreport will not see anything that happend in the outside world.

    In your subreport, use the data-tab to find the import parameter settings.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.