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

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

Similar Messages

  • Setting Multiple values in property set using java API

    Hello All,
    I want to set the properties of a profile in a property set using java API provided
    in package p13n. The property can have multiple values. When I try to add the
    property using ProfileManager.setProperty() method. But every time I do it this
    way, it replaces the earlier value of property and not added. This, I can achieve
    using portalTools but I want to use the API for user registration on the site.
    I hope the query is clear.
    Waiting for a response,
    Thanks in advance,
    Shrinivas

    You need to use java.util.ArrayList.
    First cast the existing value into ArrayList using getProperty method,
    change values in the ArrayList and then put them back with setProperty
    method.
    Regards,
    Michael Goldverg
    "Shrinivas Rao" <[email protected]> wrote in message
    news:3d64e7d9$[email protected]..
    >
    Hello All,
    I want to set the properties of a profile in a property set using java APIprovided
    in package p13n. The property can have multiple values. When I try to addthe
    property using ProfileManager.setProperty() method. But every time I do itthis
    way, it replaces the earlier value of property and not added. This, I canachieve
    using portalTools but I want to use the API for user registration on thesite.
    I hope the query is clear.
    Waiting for a response,
    Thanks in advance,
    Shrinivas

  • Set the values of metadata properties from java

    Hi everybody,
    I created a metadata property "Category" in System Admin - System Config - KM - Global Services - Property Metadata.
    My requirements:
    When a user creates a document (upload or new txt file, etc.) in folder X the value of this metadata propery should also automatically be set to value X. So that the user doesn't need to set this value himself.
    This way we can have more reliability on the accuracy of the metadata of this field.
    Can anybody help me on how to set this property automatically in the screen for the creation of upload of a new file?
    Thanks
    Kind regards
    Wouter

    Hi Robert,
    It's been a while but I'm back
    We finally decided which way to go for this development (as it was on hold untill now) and we decided to go with the KM Repository service.
    I already started implementing this service and So far it reacts on the creation of new documents (CREATE_CHILD event).
    public void received(IEvent event)
       try{
           if(event instanceof IResourceEvent)
              IResourceEvent resevent = (IResourceEvent)event;
              switch(resevent.getType())
                 case ResourceEvent.CREATE_CHILD:
                         IResource res = resevent.getResource();
                         break;
    The resource (res) I get from the resourceEvent (resevent) is the parrent resource of the newly created resource. What I need is the newly created resoruce itself.
    Do you happen to know if there is an interface or method somewhere through which I can get access to this new resource?
    Otherwise the only way to do this would be to loop over the children of the parent folder and get the newest one. But this would just kill the performance as the folders keep on growing...

  • How to set values to bpel variables from Java

    I have a java class to create files and populate some contents into it. On success it returnes "File Created"
    I used the following code to achieve it :-
    WriteFiles objWriteFiles=new WriteFiles();
    String para=((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable","payload","/client:FileTestProcessRequest/client:HO_ORG_ID")).getFirstChild().getNodeValue();
    String result=objWriteFiles.writeHeaderInfo(para);
    (writeHeaderInfo is a method in my java class)
    addAuditTrailEntry(result);
    I works fine..Now I want to assign this reult value to a bpel variable .. I tried doin it like below:-
    setVariableData("outputVariable","payload","/client:FileTestProcessResponse/client:result" , result)
    but its not working...I get a fault ...
    Can anyone help me out...
    Thanks,
    Githa.R.S

    In this example :
       <!-- Invoke the EmployeeStatus Java class instead of web service -->
       <bpelx:exec name="invokeJavaExec" language="java" version="1.4">
          <![CDATA[
             EmployeeStatus e = new EmployeeStatus();
                String firstName = ((Element)getVariableData(
                                 "EmployeeTravelStatusRequest", "employee",
                                 "/employee/FirstName")).getNodeValue();
                String lastName = ((Element)getVariableData(
                                   "EmployeeTravelStatusRequest", "employee",
                                   "/employee/LastName")).getNodeValue();
                String empStatus = e.getTravelStatus(firstName, lastName);
                addAuditTrailEntry("Employee status is: " + empStatus);
                setVariableData("EmployeeTravelStatusResponse", "travelClass",
                             "/travelClass", empStatus);
          ]]>
       </bpelx:exec>they dont use namespaces in the xpath-expression, can you try that ?

  • RETURN RESULT SET FROM JAVA STORED PROCEDURE

    I'm calling a Oracle 8.1.5 java stored proc from PL/SQL and I
    would like to send a Java result set to the calling function.
    I havent found anyway to do this currently. Anyone else doing
    anything like this and have a work around or know when/if it has
    been fixed?
    Mark
    [email protected]
    null

    This is not possible in Oracle 8i, will have to wait till Oracle 9i

  • Upgrade from Java 2 sdk 1.4.2_05 to Java sdk 6.0

    Hello. I am currently researching the effort involed in upgrading our servers from 1.4.2_05 to 6.0.
    Can I just install 6.0 on the servers and expect the apps compiled under 1.4 to run, or will I need to recompile all the apps under 6.0?
    Thanks in advance.

    Either result is possible. Either try it (with, or without recompiling) or research the changes between versions (documented in each version's release documentation.)
    If program code is no longer valid, it may need rewriting.

  • Webi document prompts order from Java SDK does not refresh correctly?

    Hi
    I'm developping a standalone command-line Java program which will schedule a report with custom prompt values.
    I am having a problem with Webi prompts ordering acquired from the SDK.
    We are running BO XI R2 SP4 under Windows on Tomcat servers.
    Here is the problem:
    I have a Webi report called "Articles Racines" in a "Tests SDK" directory.
    This report uses two prompts named "Type Article :" and "Code Marque :" (in this order).
    Java SDK (code below) returns the right prompts in the right order.
    Now, in Infoview, I modify the report in order to change the order of the prompts (in the "Properties" tab) making "Code Marque :" the first and "Type Article :" the second one and save the changes.
    When I run the report, prompt order has changed but the prompts retrieved from the Java SDK are still in the old order.
    I noticed that if I update the name of both prompts, the prompts retrieved from the SDK now are in the right order (with the updated names).
    Am I doing something wrong? Is it a known issue?
    Thanks in advance.
    Guillaume
    PS : I am aware that "select *" are very bad but I am still in research stage of developpment.
    TestsScheduler.java:
    import java.util.Iterator;
    import java.util.List;
    import java.util.StringTokenizer;
    import com.businessobjects.sdk.plugin.desktop.webi.IWebi;
    import com.businessobjects.sdk.plugin.desktop.webi.IWebiPrompt;
    import com.crystaldecisions.sdk.exception.SDKException;
    import com.crystaldecisions.sdk.framework.CrystalEnterprise;
    import com.crystaldecisions.sdk.framework.IEnterpriseSession;
    import com.crystaldecisions.sdk.framework.ISessionMgr;
    import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
    import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
    import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
    public class TestsScheduler {
         public static void main(String[] args) {
              String cms = "XXX";
              String username = "XXX";
              String password = "XXX";
              String authentification = "secEnterprise";
              String reportPath = "/Tests SDK/Liste des racines";
              try {
                   ISessionMgr sessionManager = CrystalEnterprise.getSessionMgr();
                   IInfoObjects objects;
                   // Connexion
                   System.out.println("Connexion à "+ username +"@"+ cms +" ("+ authentification +") en cours...");
                   IEnterpriseSession session = sessionManager.logon(username, password, cms, authentification);
                   System.out.println("Connecté à "+ session.getCMSName());
                   // Récupération de l'infoStore
                   IInfoStore infoStore = (IInfoStore) session.getService("InfoStore");
                   // Récupération des informations d'un report
                   StringTokenizer st = new StringTokenizer(reportPath, "/");
                   int reportID = 0; // Le dossier "Dossiers Publics" est la racine (/)
                   IInfoObjects infoObjects;
                   IInfoObject infoObject;
                   do {
                        String token = st.nextToken();
                        System.out.println("Recherche de l'objet '"+ token +"' en cours...");
                        infoObjects = infoStore.query("select * from CI_INFOOBJECTS where SI_NAME = '"+ token +"' and SI_PARENTID = '"+ reportID +"'");
                        if(infoObjects.size() != 1) {
                             throw new Error("Le dossier SI_ID='"+ reportID +"' possède "+ infoObjects.size() + " fils nommés '"+ token +"'.");
                        infoObject = (IInfoObject) infoObjects.get(0);
                        reportID = infoObject.getID();
                        System.out.println("Trouvé l'objet SI_ID='"+ reportID +"' nommé '"+ infoObject.getTitle() +"'.");
                   } while(st.hasMoreTokens());
                   if(infoObject instanceof IWebi) {
                        IWebi webi = (IWebi) infoObject;
                        List prompts = webi.getPrompts();
                        System.out.println("Le rapport Webi possède "+ prompts.size() +" invite(s).");
                        for(Iterator itPrompts = prompts.iterator(); itPrompts.hasNext();) {
                             IWebiPrompt prompt = (IWebiPrompt) itPrompts.next();
                             List values = prompt.getValues();
                             System.out.println("     L'invite '"+ prompt.getName() +"' possède "+ values.size() +"' valeur(s).");
                             for(Iterator itValues = values.iterator(); itValues.hasNext();) {
                                  Object value = itValues.next();
                                  System.out.println("          Valeur='"+ value +"'.");
                   // Déconnexion
                   System.out.println("Déconnexion en cours...");
                   session.logoff();
                   System.out.println("Déconnecté");
              } catch(SDKException e) {
                   throw new Error("Erreur lors de la connexion : "+ e.getMessage());
    Edited by: Guillaume L on Dec 10, 2008 3:22 PM

    Here's the reason why:
    Web Intelligence document prompting is handled properly if you open the doc using the ReportEngine Java (REBean) SDK.
    When you set prompts and schedule, you'd first open the doc using REBean, set the prompts, then copy over the prompt values you've set to the IWebi you're scheduling using the PromptsUtil.populateWebiPrompts(...,...) helper method.
    So the InfoObject IWebi doesn't know about the actual ordering of the prompts in the document itself - it's just receiving the prompts in order as it's fed from PromptsUtil.
    It's not recommended to assume that the IWebi.getPrompts() will return a non-empty collection.  The Web Intellligence document must be first opened in ReportEngine and the prompting values set using PromptsUtil to fill the collection.
    Sincerely,
    Ted Ueda

  • How to set iframe src from java dynammically

    Hi,
    Iam calling a servlet from jsp and servlet calls the databse query and returns the value,
    in my jsp i have ifrme, i want to change the source of iframe from java depends on the result from database , and the result must display on the iframe can any one tell me how to do this

    aurelian_cl wrote:
    I need to know how to set environment variables from java
    I want to set from java for example the environment variable "TestVar" with the value "TestValue"!1) That functionality does not belong in an application. You're trying to set environment variables, which are global across all applications, at either the user level as a whole, or across the entire machine (system level). Or, if you're only trying to set a variable active for the current process, you don't need to do that.
    2) Environment variables are not a platform-independent entity, and are thus against the nature of Java.
    My gut feel is that you are designing something in a backwards way, so my point is mainly to point that out, not to try to help you solve that particular problem.

  • Send Datetime2 value to a SQL Procedure from Java using Hibernate

    Hi All,
    I Have a Procedure which takes a parameter of type datetime2.
    The procedure is called from Java Hibernate.
    How can I Pass datetime2 value to SQL procedure from Java?
    Thanks in advance,
    Shraddha Gore

    You may define a global empty array in some package. Then you can do:
    SQL> CREATE OR REPLACE PACKAGE pkg
    AS
       g_empty   DBMS_SQL.varchar2_table;
    END pkg;
    Package created.
    SQL> CREATE OR REPLACE PROCEDURE p (
       p_tuids   IN   DBMS_SQL.varchar2_table "DEFAULT pkg.g_empty"
    AS
    BEGIN
       NULL;
    END p;
    Procedure created.
    SQL> BEGIN
       p ();
    END;
    PL/SQL procedure successfully completed.

  • How to pass dashboard prompt value to requests in folder

    Hi,
    I want to have a dashboard page that contains dashboard prompt for period and list with requests (for this I add Folder and select "Expand folder").
    If I use dashboard prompt to set presentation variables, the chosen value is not passed to requests in folder list and as I understand this is the way presentation variables work. Therefore I tried to use Request variable, but get the same result - value that is chosen in dashboard prompt, influences request only if it is shown in dashboard not if I open it from folder list.
    Steps I did:
    (1) Created session variable "Period", that users can alter. Initialization block is simple dummy select - Select ’2008.08’ from dual;
    (2) Created dashboard prompt that sets Request variable Periods;
    (3) Created report with session variable value in it:
    SELECT Time."Period code" saw_0, VALUEOF(NQ_SESSION.Period) saw_1 FROM "TEST" WHERE Time."Period code" = VALUEOF(NQ_SESSION."Period") ORDER BY saw_0, saw_1
    If I include this report directly in dashboard, it shows the session value that is set from dashboard prompt, however when I open it from folder list, it shows the default value 2008.08 although I have stayed in the same session.

    Iza, you are correct in your assumption regarding passing Presentation Variables to reports that are in the Folders object. If you have a dashboard prompt on the same page as the Folders object, then even if you select a value in the prompt, it will not pass when you click on the report name in you Folders object.
    Here is something you might want to consider to achieve what I think you are trying to do. Instead of having the Dashboard prompt on the first page, create a "table of contents" home dashboard page. What I mean is:
    1) First, create a Dashboard page with the prompts you wish to filter a report with and set the default values. Save this as the template dashboard page. Now, with a second copy of this template, drag one of your reports to this page. Save it. Using your dashboard template page, create another copy and drag the second report to this page. Save. Do this for each report you wish to display. Note that you can drag more than one report to a dashboard page.
    When you are done, you will have several dashboard pages, each with one or more reports and the dashboard prompts on the top of the page.
    2) Now on your "home page," drag the Link or Image to a section. Link this object to the first dashboard page you created in step one. Name the link the title of your report. If there are more than one report on this page, title the link appropriately. Click the "open in new window" checkbox. Drag a Link or Image object for each dashboard page you created in step one.
    When you are done, this home page will look similar to your Folders object, with links to each of your dashboard pages that contain the reports. When the user clicks on the link, the appropriate dashboard page will appear with the dashboard prompts and the report will be filtered on the default values. Now the user can change the values of the prompts as desired. When the user is done, he/she can close the window and he/she will be taken back to the home page to select another report.

  • Replacing null values in optional prompts and passing to stored proc

    Hi,
    I want to create a stored procedure with OPTIONAL prompts. When user does not pass a value for that parameter, I want to set the value for that parameter by selecting from a column in table then I WANT to use that paramvalue in sql within cursor of stored proc. How do I do that?
    In short, I want to do the following Here is the psuedocode:
    Create or replace procedure test (param IN varchar2 DEFAULT NULL)
    As
    var_param varchar(20);
    select param into var_param from dual;
    If param is null then select custid from table1 else var_param
    OPen ref_cursor for
    Select xyz from table2
    where fyy = var_para
    Can someone let me know the syntax on how to do this in stored proc?
    Regards,
    hena
    Edited by: 904385 on Dec 25, 2011 7:04 AM

    Hi,
    Merry Christmas, and welcome to the forum!
    Here's one way to do what you requested:
    CREATE OR REPLACE PROCEDURE     test
    (    param     IN     VARCHAR2     DEFAULT     NULL
    AS
        ref_cursor     SYS_REFCURSOR;
        var_param     VARCHAR2 (20)     := param;
    BEGIN
        IF  var_param  IS NULL
        THEN
         SELECT     custid
         INTO     var_param
         FROM     table1
    --     WHERE     ...     -- Unless table1 has only 1 row
        END IF;
        OPEN  ref_cursor
        FOR   SELECT  xyz
           FROM       table2
           WHERE       fyy     = var_param;
    END     test;Whatever you're trying to do, this is probably niot the simplest or most efficient way to do it.

  • Setting a Prompt value for KeyDate in WebI on SAP OLAP universe

    I have a webi report which has as its dataprovider a query against an SAP olap universe against a BEx query which has the KeyDate parameter exposed.
    Iu2019d like to get at this prompt from the SDK.
    In infoview if I run the report it pulls up the keydate prompt (a special dialogue which seems to be implemented as part of the connection definition) - this prior to pulling up the full prompts dialogue and showing all universe based @prompt filters.  In WebI I can see the prompt value entered using =UserResponse("dp.kd.value") .   So it does seem to see the keydate as a prompt of some sorts.
    I've got a little jsp that allows me to set prompts very nicely (and packeaged as a jar in the CMC that schedules ok as well) but when I put it against a report with a key date u201Cpromptu201D it just wonu2019t see it.  When I call a getCount() as below it returns 0.
    oDocumentInstance.getDataProviders().generateQueries();     
    Prompts oPrompts = oDocumentInstance.getPrompts();
    out.print(oPrompts.getCount());
    This is all in an attempt to get around the scheduler limitations of key date which would give me two queries, two universes and two reportsu2026 one report for scheduling (using a customer exit to set key date) and a second for user refresh  (with a prompted key date)  which would all be rather messey to say the least!
    So any cunning ideas on how I can get hold of this key date thingymebob in the SDK?
    (ps. "Fixed in V4" would be nice to hear as an aside to thisu2026 In playing with the ramp up Iu2019ve got the same issues however so Iu2019m not to hopefull )
    Thanks!
    Jeremy.

    Hi,
    First I think you have to create a support ticket because normally the object in the universe must be generated with data data type nad it is not the case.
    We are awere of some limitations with data types.
    Secondly, if you want to have users entering date you have to specify date in the prompt data type like this:
    <OPTIONAL><FILTER KEY="[PERIOD SD].[DB Full Date].[DB Full Date]"><CONDITION OPERATORCONDITION="Equal"><CONSTANT CAPTION="@Prompt('Enter Date ','D',,mono,free)"></CONSTANT></CONDITION></FILTER></OPTIONAL>
    Regards
    Didier

  • Forcing "No Values" for "Optional Prompt" parameter

    Hello,
    I develop the .NET web application with Crystal Reports 2008.
    I have the Crystal Report with one parameter.
    This parameter is "Optional Prompt" (ParameterFieldDefinition.IsOptionalPrompt = true).
    At first the webpage (with CrystalReportViewer control) shows the prompt field to enter parameter values, and "OK" button.
    If user doesn't enter any values and clicks button, data for default value appears.
    So the question: How can I force a showing the data for default parameter value, without prompt field appearance?
    In this case: user opens the webpage, and data for default value appears.

    Hi Ludek.
    1. Is SP3 required to get the answer?
    If so, I'll install it.
    2. The default value is the empty value.
    let me describe problem in details:
    The Crystal Report shows Customers data from MS SQL database.
    This Crystal Report has 1 parameter: CustomerID (string).
    If user enters value for this parameter, the report shows data only for Customer with entered CustomerID.
    But if user doesn't enter any value, all the data appears (for all Customers).
    So, the page with prompt field appears when user opens the web page with this report.
    If user enters some CustomerID and clicks "OK" button, the web page reloads and data for this Customer appears.
    If user doesn't enter any value and clicks "OK" button, the web page reloads and shows data for all Customers.
    This is the CORRECT behavior!
    But in some cases I need to omit the page with prompt field.
    I need to see data for all customers immediately.
    Is it possible?
    I tried to set "" (empty string) value for this parameter, but prompt field still appears.
    3. .NET version is 4.0
    4. Both - it happens on my development machine, and on other machine after deploy.

  • Setting windows environment variables from Java program

    Is there any way to set environment variables from Java program in Windows? Any help is appreciated.
    Here is my situation:
    I need to decrypt an encrypted Oracle user password in a batch file which will be used while running a sql script with sqlplus. I was planning to have bat file which will call a Java program decrypt the password and set it as an env variable in windows which will be available while calling sqlplus.
    thanks

    Runtime.exec has a lot of overloadings. Two of them
    allows you to specify the environment variables.
    exec
    public Process exec(String[] cmdarray,
    String[] envp,
    File dir)
    throws IOExceptionExecutes the specified command and
    arguments in a separate process with the specified
    environment and working directory.
    cmdarray - array containing the command to call and
    its arguments.
    envp - array of strings, each element of which has
    environment variable settings in format name=value.
    dir - the working directory of the subprocess, or null
    if the subprocess should inherit the working directory
    of the current process.
    I had this sample program:
    public class SetVarExample {
    public static void main (String[] args) throws Exception {
         String[] cmd_env= new String[] {"password="+"ABCD","Path=C:\\Sun\\AppServer\\jdk\\bin"};
         String cmd = "cmd /c SET ";
         Runtime.getRuntime().exec(cmd,cmd_env);
    System.out.println( "Finish ...." );
    I tried it in a command prompt. But looks like when the program exits, it's a whole new process and so it does not retain the env variables set in the java program.
    Any suggestions? Am I doing it worng?
    thanks

  • Pass value from Java to Perl

    Anyone knows how to pass value from Java to Perl program?

    Did you write the perl program? Can you change it? Or are you trying to interface to something that already exists? This will limit your options, of course.
    Anyway the first option is simple. The java program does this:
    System.out.println("This is a line of input.");The perl program does this:
    while(<>)and in that block, $_ is assigned to each line of input.
    Then you can invoke both like this:
    $ java MyJavaProgram | perl MyPerlProgram.pl

Maybe you are looking for

  • Environment variables (user) created at OS level dont show up in BIDS 2008

    Environment variables (user) created at OS level don't show up in BIDS 2008. I had a variable ConfigLocation created and it is not showing up when I am trying to configure it in BIDS Is this a known issue or a bug? Now in BIDS it doesnt show up Mudas

  • Windows 7 install on late 2011 MacBook Pro without bootcamp (performance issues)

    Hey guys I'm hoping I can get this issue resolved. I have purchased a late 2011 MacBook Pro (radeon 6750m 1gig). I installed a fresh copy of windows 7 without bootcamp. Having real issues with game performance like world of Warcraft. I have done this

  • Can,t open iphoto ???c ....

    I hope this is going to be basic ???? running iphoto 08 ............ uploaded some pictures to i web and then closed iphoto .... now when i go to open iphoto it bounces in the dock and the MAC seems to be wanting to do something but the application w

  • Statistical condition in Pricing Procedure

    Hello Can you let me know about statistical condition GRWR? Whats the use of this condition ? Regards

  • PS + Bridge mehrfach im Speicher

    Ich arbeite unter Windows XP Professional. Wenn ich PS + Bridge schließe, befinden sie sich weithin im Speicher. Öffne und schließe ich die Programme öfter, befinden sie sich mehrfach im Speicher und alles wird folgerichtig sehr langsam. Aus dem Spei