cancel
Showing results for 
Search instead for 
Did you mean: 

Setting prompt value for a shared prompt - Webi scheduling

Former Member
0 Kudos

I have a Webi report which has multiple queries. These queries share a prompt. While scheduling when we retrieve the prompts using getPrompts() method of DocumentInstance it returns only the unique prompts (the shared prompt does not add up to the total prompt count). As a result the report scheduling fails.

How can I get "all" the prompts even if they are duplicate and set their value?

We are on BO XI R3 and I'm using Enterprise SDK to schedule the webi report.

Thanks

Manas

Edited by: Manas Mandlekar on Oct 7, 2010 4:09 PM

Accepted Solutions (1)

Accepted Solutions (1)

ted_ueda
Employee
Employee
0 Kudos

Are you using PromptsUtil to copy the prompt values over from ReportEngine to the Webi InfoObject?

Does scheduling work in InfoView?

I ask because both should be using PromptsUtil to fill the prompt values for the scheduling info.

Sincerely,

Ted Ueda

Former Member
0 Kudos

Thats correct. I'm using PromptsUtil to copy the prompts.

The scheduling works via InfoView.

Thanks

Manas

ted_ueda
Employee
Employee
0 Kudos

There was an issue with PromptsUtil not handling prompt indexing correctly, fixed in SP2 - which SP are you on?

Sincerely,

Ted Ueda

Former Member
0 Kudos

Ted,

Sorry for my late reply, the issue got sidelined due to other priorities.

We are on BOXI 3 SP1.

Is there a document/knowledge article or support case reference pertaining to this issue so that I can recommend moving to BOXI R3 SP2 based on that?

Thanks

Manas

ted_ueda
Employee
Employee
0 Kudos

There doesn't appear to be a KBase on it, but the internal tracking number is ADAPT01201901.

It's listed in the Fixed Issues document for XI 3.1 Service Pack 2.

Sincerely,

Ted Ueda

Former Member
0 Kudos

Dear All,

please ignore my below message.

The root cause was a permission problem.

The user that executed the code had not yet been given the rights for the universe.

Best,

Regards

Hello,

I have a problem which I think is related as it uses PromptsUtil.

(Currently working with BO XI 3.1 SP3)

Situation:

- Universe on which the Deski report is built has a prompt

- Deski report with 4 prompts of which 1 has the same name as the universe prompt

My java code requests all prompts from the deski report and then sets values to it through an iPrompts object.

This is then handed to PromptsUtil.populateFullClientPrompts.

There is no error so I assume prompts are set.

However when the report is now scheduled and the status of the schedule is requested this returns a FAILED.

The error message given is: "SetPrompts failed".

I assume that the schedule could not set the prompt that originated from the Universe?

Am I correct in my assumption and is there a solution to this?

Remark: this code is being used for other reports that are built on universes that do not have prompts.

There the code works without problems.

Best regards,

Ruben

Code for setting prompts:


           int numberOfPrompts= iPrompts.getCount();
           System.out.println("aantal prompts = " + numberOfPrompts);
           // vul prompts in 
           String [] iPromptValue;
           int hulp = 0;
           for (int i=0; i<numberOfPrompts; i++)  // loop over alle parameters
        	 {
        		Prompt iPrompt = iPrompts.getItem(i);
        		hulp = v_prompts_aantal_waardes<i> ;
           	  	iPromptValue = new String[hulp];
           	  	System.out.print("Prompt gezocht:"+ iPrompt.getName());
           	  	for (int j=0; j<v_prompts_names.length; j++) // loop over alle waardes van paramater i
           	  	{
           	  		if ((iPrompt.getName()).compareTo(v_prompts_names[j]) == 0)
           	  		{
           	  			System.out.print(" - Prompt gevonden:"+v_prompts_names[j]);
           	  			for (int k=0;k < hulp;k++)
           	  			{
           	  				iPromptValue[k]= v_prompts_values[j][k];
           	  				System.out.println("   waarde ingevuld:"+v_prompts_values[j][k]);
           	  			}
                               
           	  			iPrompt.enterValues(iPromptValue);
           	  			j = v_prompts_names.length;
           	  		}
           	  	}
        	 }
    
           String strEntry =   docinst.getStorageToken();
           docinst.save();
           deskiDoc =null;
           deskiDoc = (IFullClient)iDocObject;
           PromptsUtil.populateFullClientPrompts(iPrompts, deskiDoc) ;

Code for scheduling:


 for (Iterator<Integer> it3 = iSchedulingInfo.getDependencies().iterator(); it3.hasNext(); ) 
             { 
               System.out.println("   Dependency:  it3"); 
      	       iSchedulingInfo.getDependencies().remove(it3.next()); 
             }
             iSchedulingInfo.setRightNow(true);
             iSchedulingInfo.setType(CeScheduleType.ONCE);
        	 fullClientFormatOptions.setFormat(IFullClientFormatOptions.CeFullClientFormat.PDF);
        	 SetDestinationToUnmanagedDisk(iStore , iSchedulingInfo,   v_pdf_path,iTitle);
        	 iStore.schedule(iDocObjects);
      	     InstanceRef = iDocObject.properties().getProperty("SI_NEW_JOB_ID").getValue().toString(); 
      	     docinst.closeDocument();
        	 BepaalScheduleStatus(iStore, InstanceRef,"filepath");
        	 v_flag_FileLoc = false;

Edited by: Ruben Samaey on Mar 2, 2012 1:50 PM

Answers (0)