Skip to Content
author's profile photo Former Member
Former Member

optional prompt value to be set from java bo sdk

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 09, 2010 at 10:18 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.