2 Replies Latest reply on Mar 27, 2009 6:31 AM by 691651

    BI Webservice : Unable to Pass Parameters to Report Using HtmlViewService

    618202
      Hello Everyone.

      I am working on calling BI reports from java application using BI webservice : HtmlViewService.

      I am able to call a report successfully without passing parametes.

      But when i am passing report parameters(filter prompt values), i am unable to see the output for those specific values, report is getting executed with default values.

      I am using below code to pass the report parameters:

      ReportParams reportParams=new ReportParams();
      String filterExp[]=new String[3];
      filterExp[0]=new String("Periods.Year=2000");////{"Periods.\"Year\"","2002"};
      filterExp[1]=new String("Markets.Region='EASTERN REGION'");
      filterExp[2]=new String("Markets.District='BOSTON DISTRICT'");
      filterExp[3]=new String("Products.Brand='Magicolor'");
      reportParams.setFilterExpressions(filterExp);
      repOption.setLinkMode(ReportHTMLLinksMode.InPlace.getValue());
      return con.getHtmlService().getHtmlForPageWithOneReport(strReportID,
      reportRef, null, reportParams, repOption, pageParams, con.getSessionID());


      In the above code is the format of filter expressions which i am passing is correct

      i have also tried by passing variables also using below code

      ReportParams reportParams=new ReportParams();
      Variable v=new Variable();
      v.setName("regionTemp");
      v.setValue(new String("CENTRAL REGION"));
      Variable[] variables={v};
      reportParams.setVariables(variables);
      repOption.setLinkMode(ReportHTMLLinksMode.InPlace.getValue());
      return con.getHtmlService().getHtmlForPageWithOneReport(strReportID,
      reportRef, null, reportParams, repOption, pageParams, con.getSessionID());

      but report output is displayed using default parameters.

      Any help is really appreciated.

      Thanks,
      Krithika