Skip to Content
0
Former Member
Jun 03, 2009 at 05:19 PM

Issue retrieving Webi Prompt values through ReportEngine, IProcessingInfo

56 Views

Hello,

I've run into a bit of a hitch exposing the WebI prompt values through Java ReportEngine, wondering if I might be missing something obvious...

With the following, I am able to access a given WebI prompt and retrieve the name fine, but I am not able to access the value(s):

ReportEngines repEngines = (ReportEngines)es.getService("ReportEngine");
ReportEngine wiRepEngine = repEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
DocumentInstance doc = null;
int reportIDNum = report.getID();
doc = wiReportEngine.openDocument(reportIDNum);  //open webi report

Prompts docPrompts = doc.getPrompts();   //works fine
int numPrompts = docPrompts.getCount();  //works fine

if (numPrompts > 0)
{
  for (int x=0; x<numPrompts; x++)
  { 
    Prompt docPrompt = docPrompts.getItem(p);
    String promptName = docPrompt.getName();  //works fine
    String[] promptValues = docPrompt.getCurrentValues();  //BROKEN - always null result, even for prompt with default value
    System.out.println(promptValues.length); //BROKEN - always 0 length, even for prompt with value
  ...
  ..
  .

I have also tried exposing the prompt values through the IProcessingInfo properties of the report. I can see the SI_WEBI_PROMPTS property, but can't quite get at the nested components within it:

IProcessingInfo reportProcInfo = report.getProcessingInfo();
System.out.println(reportProcInfo.properties().getProperty("SI_WEBI_PROMPTS"));

Am I missing something here? How can I expose the values?

Any help appreciated.

Thanks