This discussion is archived
0 Replies Latest reply: Oct 29, 2012 9:42 PM by Sridhar 1245 RSS

How to Pass Multiple Parameters To ReportReuest Method in Oracle  BI 11g

Sridhar 1245 Newbie
Currently Being Moderated
Hi,

Am integrate Oracle BI Publisher 11g via Web Services in Oracle Forms,For that am developing code in PublicReportServiceClient Class. This worked properly with out passing parameter to the report. so how to pass parameters to the report . If Report is requried some Parameters to generate report.

If any one knows about How to Passing Multiple Parameters to ReportRequest Methos in Oracle 11g. Pls help me.


Am trying with the below code for PassParameters to ReportReuest Method in Oracle BI 11g. But by using this code am able to pass only one parameter to the Report, not for multiple Parameter Passing.

ArrayOfParamNameValue PnameValue=new ArrayOfParamNameValue();
ParamNameValue Namevalue=new ParamNameValue();
Namevalue.setName("P_SNO"):
ArrayOfString aos=new ArrayOfString();
aos.getItem().add("2");
Namevalue.setValues(aos);
PnameValue.getItem().add(Namevalue);
ReportRequest RepReq = new ReportRequest();
RepReq.setParmeterNameValues(PnameValue);

Following method  callRunReport() with an array of parameters used in Oracle Bi 10g,To pass multiple report parameters to ReportRequest method.

public void callRunReport (String reportPath, String[] paramName, String[] paramValue, Stringusername, String password, String format, String template, String outFile)
{
try {
bip_webservice.proxy.PublicReportServiceClient myPort =new bip_webservice.proxy.PublicReportServiceClient();
// Calling runReport
ReportRequest repRequest = new ReportRequest();
repRequest.setReportAbsolutePath(reportPath);
repRequest.setAttributeTemplate(template);
repRequest.setAttributeFormat(format);
repRequest.setAttributeLocale(“en-US”);
repRequest.setSizeOfDataChunkDownload(-1);
if (paramName != null)
{
ParamNameValue[] paramNameValue = new ParamNameValue[paramName.length];
String[] values = null;
for (int i=0; i<paramName.length; i++)
{
paramNameValue[i] = new ParamNameValue();
paramNameValue.setName(paramName[i]);
values = new String[1];
values[0] = paramValue[i];
paramNameValue[i].setValues(values);
}
repRequest.setParameterNameValues(paramNameValue);
}

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points