cancel
Showing results for 
Search instead for 
Did you mean: 

optional prompt value to be set from java bo sdk

Former Member
0 Kudos

hi

i am trying to refresh a report which has 4 prompts

2 of them are mandatory and 2 of them are optional.

Please find the code below

Prompts prompts = di.getPrompts();

if(prompts != null){

promptCount = prompts.getCount();

for(itemCount = 0; itemCount < 4; itemCount++) {

prompt = prompts.getItem(itemCount);

String paramValue = null;

if(promptName != null) {

if("Billing Period Prompt".equalsIgnoreCase(promptName)){

paramValue = billingPeriod;

}else if("Fleet Number Prompt".equalsIgnoreCase(promptName)){

paramValue = fleetNo;

}

if(paramValue != null){

String paramValArr[] = {paramValue};

System.out.println("paramValue "+paramValue);

prompt.enterValues(paramValArr);

}else{

paramValue = "null";

String paramValArr[] = {paramValue};

prompt.enterValues(paramValArr);

}

}

di.setPrompts();

di.refresh();

initially, am trying to get all prompts and setting up values for the mandata prompts only. but i did not get any report

then i tried to give some default value to optional parameters also by giving "ALL", "all","*", "null

,"NULL","*"

stil it is not working

please tell me what should i

Accepted Solutions (0)

Answers (1)

Answers (1)

ted_ueda
Employee
Employee
0 Kudos

First I'd read the ReportEngine SDK Developer Guide.

Then I'd try calling refresh() first, then setting prompts after that.

The refresh method you can interpret as 'reset the document state such that new prompt values may be applied'.

Sincerely,

Ted Ueda