Retrieving Query Filter conditions for a WebI Report

I'm developing a Java program using the Business Objects SDK to gather all relevent data from a WebI report and export it to a XML document.  I'm having an issue retrieving the Filters correctly.
Right now I have a method that retrieves a query from a query container. Then I retrieve a condition container from the query.  After that I use a loop to get the filtercondition nodes in the conditioncontainer and I get their name and ID's.  My goal is to get all the information the object, the dimension, condition, and values seperatly instead of it all printing out together. For example my code prints out this as the filter name : "Period Of Time_Air Date Greater  Enter Start Date:" .  The name contains all the information from the filter but is there a way to get each peice of information for the filter seperately. 
I'd appreciate any help.
Edited by: ccmagrane on Feb 28, 2011 8:55 PM
Edited by: ccmagrane on Mar 3, 2011 2:42 PM

Please find below a snippet code that shows how to access those objects:
Query q=oDataProvider.getQuery();
            ConditionContainer condCont=q.getCondition();
            ConditionObject condObj=null;
            FilterConditionNode fcn = null;
            FilterCondition fc = null;
             FilterConditionValue fcv = null;
            FilterConditionContainer fcc=q.getCondition();
            if(fcc==null)
                    continue;
            int conditionCount=q.getCondition().getChildCount();
       for(int jj=0;jj<conditionCount;jj++)
              fcn=fcc.getFilterConditionNode(jj);
              System.out.println(getConditionLabel(fcn));
              if(fcn==null)
               continue;
            if(fcn instanceof AdvancedCondition)
                    AdvancedCondition ac=(AdvancedCondition)fcn ;
                    int nDim= ac.getResultObjectCount();
            else if(fcn instanceof ConditionObject)
               condObj = (ConditionObject) fcn;
                fc=(FilterCondition)(condObj).getOperand();
                  if(fc!=null)
                      System.out.println("==================================================");
                         System.out.println("Operand Count - " + fc.getOperandCount());
                         for (int k =0; k < fc.getOperandCount(); k ++)
                           fcv=fc.getOperand(k);
                               System.out.println("Operand Value - " + fcv);
                          System.out.println("==================================================");
                             System.out.println("==================================================");
                            System.out.println("Condition Name - " + fcn.getName());
                            System.out.println("Condition Data Source Object - " + condObj.getDataSourceObject().getName());
                            System.out.println("Condition Operand - " + condObj.getOperand().toString());
                            System.out.println("Condition Operator - " + fc.getOperator());
                            System.out.println("Condition Operand Count - " + fc.getOperandCount());
                             System.out.println("==================================================");

Similar Messages

  • How to create @prompt filter at universe level for my Webi reports

    Dear all,
    I am using BO XI 3.1 SP3 with SAP BW 7.0.
    I have created an open[big] query based on a multiprovider for my OLAP universe.
    OBJECTIVE: to create LOV prompts for Calender year, for my webi reports, which takes 2010 as input then offsets the input year and then shows Gross sales for the prompt year [2010], 2009 & 2008.
    ISSUE: if 2010 is selected in webi prompt filter, then it doesn't display any data for any other year, lets say gross sales for 2009.
    ALTERNATIVE: i tried to create a prompt filter in the universe with this syntax,
    <FILTER KEY="@Select(Calendar year\Calendar year).[TECH_NAME]"><CONDITION OPERATORCONDITION="InList"><CONSTANT TECH_NAME="@Prompt('Enter year','N',,Mono,Free,Not_Persistent)"/></CONDITION></FILTER>
    it worked fine. but i also want to create a measure or dimension which subtracts 1 from the above filter and return a result with a previous year.
    e.g
    PROMPT: 2010
    PROMPT-1: 2009
    Universe structure
    [TIME]                         class
      [Calender year]        class
         [Calender year]     dimension  ( type:string)
    Please guide me with correct procedure and syntax.

    masood44 ,
    I think you should just prompt for year and capture and use the selection at the webi report  level.
    say you have calendar year(convert it into numeric) prompt at webi level. say user selects 2010 capture it in a variable var1:userresponse('enter year'). then create a variABLE (var2)  with formula :
    if(isPromptAnswered('enter year')='yes';([year] where year inlist(var1;var1-1;var1-2);null)
    build your report with var2 and gross income
    Thanks,
    Karthik
    Edited by: kbharadwaj79 on Jun 2, 2011 5:34 PM

  • Combining 2 BEx queries into 1 for 2 WebI reports for different 0CALYEAR

    Hi all,
    I have the following requirement in BEx Query designer:
    I have two queries with 0CALYEAR infoobject in each.
    One query shows me the data of last 5 years and the other does not have any such condition, it shows me full data.
    I need to build a combined query based on these 2 queries.
    This combined query shall be used for 2 WebI reports:
    -     1 report showing the user, data for last 5 years
    -     2nd report showing full data
    Is it possible to handle this, without giving any date selection prompt for the user on the WebI report.
    If so, please let me know how.
    Thanks and Regards,
    Srilakshmi

    You have many options available. You can use structures and/or cells in  your single query to present one set of data for "5 years" and one set of data for "Forever". You can simply create the query using selection columns to limit one column to 5 years and one data to 'full data'.
    However... I always strongly advise my users to never, ever, ever create a query for 'everything'. You have no idea what the future will hold in terms of data volume. Creating an unlimited query will only produce performance issues and sadness. Users NEVER actually need 'all the data'. They just think they do. It's part of your job to keep them from creating requirements that they will regret later on.

  • Can't find FILTER CONDITION for filters or Function_Name for Functions

    In the Data Warehouse 11gr1 views all_iv_xform...
    I can't seem to find the Filter Conditions for filters and function name for functions that are called.
    I have looked at the other views in the documentation for the API's but can't seem to find this information.
    Any body have any ideas where this information is?
    thanks
    greG

    select map_component_id, position, source_parameter_name
    from ALL_IV_XFORM_MAP_PARAMETERS
    where map_component_id in (
    SELECT map_component_id
    FROM ALL_IV_XFORM_MAP_COMPONENTS
    WHERE MAP_ID IN (
    select MAP_ID
    from ALL_IV_XFORM_MAPS
    where MAP_NAME = :p_map_name
    AND OPERATOR_TYPE = 'Filter'
    Using map_component_id and position from above query you can see your filter condition defined in property_value:
    select map_component_name, property_name, property_value
    from ALL_IV_XFORM_MAP_PROPERTIES
    where map_component_id = :p_comp_id;

  • Variant for a Web Report

    Hi Guys,
    I was wondering if there was a way of creating a variant for a web report, the way we can create one for a BEx report. I would like to be able to store the variable values in a variant and then select one of the avaialable ones.
    Thanks,
    Doniv

    The save as view functionality does exist in BW 3.x.  The only difference is that it is not available as a web item.  There is a template named 0publishing_template.  This has the save view option available.  The other way is directly from the Web Application Designer.  Go to Tools --> View Definition --> Select either based on a query or based on another query view.  Once this is done you can either create another web template with the view as your dataprovider or you can create a hyperlink in the role menu and use a URL like this:
    http://servername/sap/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&TEMPLATE_ID=0query_template&data_provider_id=technical name view. 
    One thing to note is that views will save the variable entries.  You can add VARIABLE_SCREEN="X" to force the display of the variable screen.  To change the values in the variable screen add VARIABLES_CLEAR="X". 
    Hope this helps. 
    Jeff

  • Restful sample with Java for getting WebI report info in 4.1

    Hi All
    Can anyone give me a sample code in JAVA for getting WebI  report information using Restful services in 4.1 SP1 Version
    Thanks In Advance

    Hi All
    Im unable to execute the below URLs and getting error
    /documents/{documentId}/reports/{reportId}/elements/{elementId}/properties
    /documents/{documentId}/reports/{reportId}/elements/{elementId}/datapaths
    /documents/{documentId}/reports/{reportId}/elements/{elementId}/dataset
    /documents/{documentId}/reports/{reportId}/elements/{elementId}/axes/
    /documents/{documentId}/reports/{reportId}/pages
    /documents/{documentId}/reports/{reportId}/inputcontrols
    /documents/{documentId}/reports/{reportId}/
    Errors:
    Not found. (RWS 00056)
    Not acceptable, (RWS 00058)
    Any Suggestion Please.

  • Retries for a Webi Report

    Hello,
    last week we discovered the possibility to set an automatically retry for our Webi Reports in the CMC.
    Today we discovered a malfunction.
    The first run of the Webi Report failed but the second one succeeded.
    The Excel Export is wrong. It looks like, that BO is using an old layout to create the Excel Export.
    We will just have this problem, if the first run fail.
    Does anybody know how to fix this?
    Thank you for your help!
    Best
    Jan

    Hi Sathish,
    thank you for the quick answer.
    New Style:
    You can see the beginning of the first sheet and the names of the other sheets.
    We use this format nowadays.
    Old Style:
    Here you can see same things. The beginning of the first sheet and the names of all sheets.
    Everytime the first run failed we get an export in the old format.

  • "Block EDIT option*" for all WEBI Reports with Administrator Account

    Hi,
    I had opening CMC with Administrator Account.Due to some reasons i want to "Block EDIT option" for all WEBI Reports.Just Viewing is sufficient.In the same way for Universe"Blocking EDIT object option".Instead of Administrator guide reference (chap no 18 &19)option.Could you help in steps resolving issue.Thanks in advance.
    Regards,
    Swapna.

    Hi Swapna,
    You could perform the following steps:
    1. Login to CMC.
    2. Go to Folders >> Manage >> Top Level Security
    3. Click on Add Principal and add the user or group for which you have to set the security.
    4. Click on assign Security >> Advanced tab >> Add/Remove Rights.
    5. Select Content >> Web Intelligence Report
    6. assignt "Edit Object" right as denied and click on apply ok.
    This would help you to block edit option for only webi reports and all the webi reports in your environment.
    Regards,
    Nakul

  • Launch HTML Editor for creating webi reports - Java sdk

    Is there a way to launch HTML editor directly for creating webi reports..I know we can set the preference for HTML report panel in infoview...but thats not the requirement. I have to launch the HTML or Java report panel editor according to the User selection on the fly....its a customized java code for webi reports.
    Any help on this is appreciated!
    Thanks
    Chenthil

    Guys will this link work to launch the HTML editor....
    desktoplaunch/querywizard/jsp/entry.jsp?skin=skin_standard&docname=&docid=&isNew=true&isModified=&doctoken=we00010000b5d263b7d0a6&repotype=&unvname=&unvid=UnivCUID%3DAZu2kpoiudVOk35pUtr6.qQ%3BUnivName%3DKalvin&unvrepoid=&mode=C&decsep=.&unit=in&lang=en&doctype=wid&viewType=H&isModify=yes

  • Query-filter-options for everything.me Mozilla edition

    Where can I get the query-filter-options for everything.me Mozilla edition?

    Hi flegno,
    Depending on which version that Firefox is on, currently in the Simulator is looks like there is only a way to pin the apps that result in a searched category. Searching for people in contacts who have a particular app installed does not seem to be an option? However I cannot know for sure.
    Can you give another example on what you are looking for everything.me to do?

  • What tool do we use for BW web report ?

    Hi all:
        What tool do we use for BW web report ? Could you please give some development steps
    for an example ?
    Thank you very much!!

    Hi,
    You can use the Report Designer for creating reports and displaying them on the web.
    You can refer to the below links for more information -
    http://help.sap.com/saphelp_nw70/helpdata/EN/c8/2d1442505d5033e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/43/8a95791b1f22a8e10000000a1553f6/frameset.htm
    Hope this helps!
    Regards,
    Saurabh

  • Common Global Prompt on DashBoard for all WebI Reports

    Common Global Prompt on DashBoard for all WebI Reports
    Is it possible to have a common prompt on the Dashboard. Which passes these variables/prompts to other WEBI reports show on the dashboard
    Most of the financial WEBI reports have common prompt (year and period)
    If I select or enter two common prompt can this be passed to all the webi reports shown on that DashBoard.
    Thanks & Regards
    Ishaq

    Hi,
       You cannot achieve this using WEBI alone. You will have to use Xcelsius with WEBI to achieve this. In XI R3.1 you can use the content linking feature on the dashboard to link a Xcelsius Analytic with multiple WEBi reports. You just need to pass prompts to the Xcelsius Analytic and all the corresonding reports will recieve that value. There are several possibilities with this and i have just stated one. Hope that helps.
    Regards,
    Edited by: Abdul Mughni on May 30, 2010 7:24 PM

  • Filter condition for Webi report scheduling

    Hello,
    I have a Webi report with a query that has one filter (it states the starting and ending date of data to be displayed in the report). This report has to be scheduled but it has to contain different filter values each time the report is run.
    I'd like to know if there is a way to schedule this report taking into account that each iteration of the scheduling process has to use different values for the filter.
    On the same way, the Webi report has a XY diagram with a text title made up of a fixed literal label. Is there any way to inject the text title from the scheduling process (in order to avoid editing the report before each scheduling iteration occurs)?
    Thanks a lot!

    Victor,
    one filter (it states the starting and ending date of data to be displayed in the report). This report has to be scheduled but it has to contain different filter values each time
    There are a couple of ways to handle this requirement, depending upon other environmental factors.  Here is one method, but it requires the ability to update/change data at the database using an external tool (anything that permits processing transactional information).
    You can set up an additional table with two columns:  starting_date and ending_date
    Someone updates the additional table as appropriate before the next run will kick off in the schedule.
    The tricky part is in getting your current report to incorporate the other table, and for this you may need to either create a view in your database or a derived table in your universe.  Here is the rudimentary SQL structure that might work for you:
    create table start_end_dates (beginning_date datetime,end_date datetime)
    go
    insert into start_end_dates values ('9/1/2009','9/30/2009')
    go
    create table my_data (col_a char(1),month_id datetime)
    go
    insert into my_data values ('a','9/1/2009')
    insert into my_data values ('a','10/1/2009')
    go
    select *
    from my_data
    where month_id >= (select beginning_date from start_end_dates) and
          month_id <= (select end_date from start_end_dates)
    The start_end_dates table is the one that receives a single input, populated with the starting and ending date of data.  The "my_data" table is an example of how the source table can call in the "parameters" of the "start_end_dates" table to fulfill its quest for filtering (additional filtering on other things within your scenario can also be applied).
    Once you can get the mechanics of the SQL to work for you (either in the universe or a view), then you can set the report up to work hand-in-glove with the above structure.  In the report, you can either have a second data provider that selects on the "start_end_dates" table, storing that data in the report and displaying it somewhere, or you could use the min(month_id) and max(month_id) concepts and display that somewhere too.
    Thanks,
    John

  • Filter not working for a Webi report

    Hi There,
    We have a BOBJ Webi report having variable selection screen when I run the report with default fiscal year Ex.2012 it's working fine. Then by click on refresh button and trying to change selection value to Ex. 2013 and I'm unable to see any values even though it has values for 2013.
    When I click on the filter bar then the values are appearing. Could anyone please let me know what could be the reason for this issue and how can we avoid this.
    We are in BOBJ 4.0 SP6.
    Thank you,
    Regards,
    Shiva

    Hi Jakub,
    Thanks for the reply, Please find the screen shots below
    1. Report initial screen running with the default prod year for 2012 and it's working.
    2. Then I click on refresh and run for another prod year it's not displaying values even though it has values for that prod year.
    3. When I click on filter bar then the values are appearing. Not sure why it's behaving like this?
    Also note that there is no filter, under query filters. Please give me any idea about this issue.
    Regards,
    Shiva

  • Query level filter not working in Webi report

    Hi All,
    I am using BOXI R3.1 (SP3), m facing one problem when refreshing Webi report on daily basis. I am using three query level filter as a prompt, but i checked one filter is not working then i need to reapply this filter and rest 2 filter is working fine.
    Can anyone suggest me why problem is coming?
    Regards,

    Hi,
    Prompts are interactive, and come from the query panel. Filters are not interactive, and are set on the report or block. There are also input controls, which are interactive filters
    1. Select the universe in the list of universes to open the Query Panel.
    2. Drag the Year object to the Result Objects pane.
    3. Drag the Number of Guests object to the Query Filters pane and create a report filter that restricts Number of Guests to greater than n.
    4. Click Combined Query.
    The Combined Query pane appears in the bottom left of the Query panel with the two queries joined by UNION.
    5. Click on the second query and remove the Year and Number of Guests objects.
    6. Drag the Reservation Year object to the Result Objects pane.
    7. Drag the Future Guests object to the Query Filters pane and create a report filter that restricts the future guests to greater than n.
    8. Click Run Query.
    Best Regards
    Naveen

Maybe you are looking for