Using BOUSER or CurrentUser() in Report Query Filter

Post Author: Sandiegouser
CA Forum: WebIntelligence Reporting
We are using LDAP for Authentication.
I was to be able to use the LDAP user id to filter what the user sees in a report..using either @variable('BOUSER') or CurrentUser()
Thank you

It's more that there is no disadvantage in your case. The usual objection to CGI (and indeed one reason why we have servlet containers at all) is that you have to start a new process per request, but you have that problem anyway because of your hundreds of C programs.

Similar Messages

  • Using a function in a report query

    Why can't I call a function (basically a query) in a report query like I can from from SQL?
    Consider the following:
    Select MyFunctionName(arg) from dual;
    From SQL, it works great! No problem:
    In a report query, [Application/Shared Components/Report Queries] It doesn't work. I get an XML error:
    XML Parsing Error: not well formed
    <MyFunctionName('arg')>&lt;?xml version="1.0"?&gt;
    ----------------------^
    Why?
    Looks like APEX is not even executing the function...
    See I have a table with a CLOB field that contains properly formatted HTML. I cannot simply query for that content, since Oracle escapes the tags in the conversion to XML. I have to (somehow) tell Oracle to keep it's grubby mitts off my CLOB content. As far as I can tell, using DBMS_XMLGEN.setConvertSpecialChars is the only way to keep Oracle from escaping the html stored in the table--in fact, the DBMS_XMLGEN documentation states that it why this functionality exists in the first place!
    This is why I am trying to use a function. Simply queries don't work. The function I wrote works beautifully in SQL, but not in a report query...
    Edited by: Vorlon on Aug 5, 2010 1:20 PM

    Note from the first post:
    "In a report query, [Application/Shared Components/Report Queries]" Let me clarify: This report query is used in a BI Publisher report. Getting the information to the screen isn't the problem. I have that working. :-) It's just when I try to get the report to print that I see APEX has escaped the output before reaching BI Publisher--so BI Publisher is not the issue. I have a xsl template that will process the embedded HTML, but APEX is escaping my data before I can act on it. In other words:
    It seems Apex is not creating the XML properly, since it escapes everything. Even when the function passes back data correctly.
    Has anyone else seen this? Ideas for a workaround?
    Thanks!

  • Use of writeChanges() / conformResultsInUnitOfWork in report query

    I have a usecase where i am saving data in different tables in same transaction
    I want to use ReportQuery so as to use functions likeaddAverage.
    ReportQuery query = new ReportQuery(res);
    query.setReferenceClass(Subject.class);
    query.addAverage("average-score", res.get("score"));
    But since data is still not commited, I wanted to use conformResultsInUnitOfWork.
    1.But I assume conformResultsInUnitOfWork can't be used with ReportQuery.
    Am I correct?
    2. According to toplink docs, we can use writeChanges() method on uow.
    But after you call the unit of work writeChanges method , we can'r egister objects or execute object-level queries.
    But after executing report query, I need to register obj /read objects to perform other use case operation.
    So how can we use Report query to perform query on uncommited changes & still be able to other UOW operations or read object queries
    Thanks for your help.

    Hi Jayesh,
    Please have a look at the below attachment.
    [http://help.sap.com/saphelp_470/helpdata/en/5b/d22e3843c611d182b30000e829fbfe/content.htm]
    Warm regards,
    Murukan Arunachalam

  • ORA-03113 when using connect by in a report query ?

    Hi,
    Oracle 10g r2, ApEx 4.0.2.
    I have a classic report on page zero, I need the following query to display my data :
    select
         distinct '<input class="radio_report_search_photos" name="radio_selected_photo" type="radio" />' as "Sel",
         phot_id,
         phot_description,
         '<img alt="" id="thumb_'||phot_id||'" class="clickable_thumb" src="#OWNER#.show_photo?v_id_photo='||phot_id||'" />' as "Thumb",
         substr(SYS_CONNECT_BY_PATH(kw_text, ', '),3) keyword_list
    from
         select
              phot_id,
              phot_description,
              kw_id,
              kw_text,
              pkw_kw_id,
              pkw_phot_id,
              count(*) OVER(partition by phot_id ) cnt,
              ROW_NUMBER() OVER(partition by phot_id order by kw_text) seq
         from
              photos,
              photos_keywords,
              keywords
         where
              phot_id = pkw_phot_id
              and pkw_kw_id = kw_id
              and contains(kw_text,nvl(:P0_SEARCH_PHOTO_KW,'%')) > 0
    where
         seq = cnt
    start with
         seq = 1
    connect by prior
         seq+1 = seq
    and prior
         phot_id = phot_idIt works great when executing from any software. I get the expected results.
    But yhen I try to put it in the report region source, I get an ORA-03113 when I apply changes...
    It works if I remove CONNECT BY PRIOR and SYS_CONNECT_BY_PATH from the query.
    Why ?
    Thanks.
    Details :
    url : https://my_host.ch/pls/htmldb_dev/wwv_flow.accept
    Error :
    Fri, 22 Jul 2011 09:25:38 GMT
    ORA-03113: end-of-file on communication channel

    OK I now use xmlagg & xmlelement instead of connect by.
    Sorry for not providing any solution.
    Yann.

  • Bind Variables and Shared Component Report Query

    I have a query in a region report which I have replicated to a shared component report query.
    Both queries reference page items as bind variables in the where clause.
    The report region on screen shows the correct results but the report query shows "no data". This is the case when running "Test Query" and "Download XML data" from the shared component report query definition. If I hardcode the variable names I get rows returned, If I use bind variables - and specify the values for these variables I get no data. THe XML file contains the tags for each bind variable I have specified but has no data between the tags. I have Ticked the box to include application and session state but it appears that the bind variables are not being used.
    When I use my report query in the application (URL tied to a button) I get the same problem, the binds are not being passed to the report query.
    Can someone please clarify if this is a bug or not? And if not, how can I get it to work.
    I am using Apex 4.0.2
    Thanks
    Kathryn

    Hi
    To confirm, yes I selected the bind variables. I used these in the report layout, but the xml file has them as empty i.e.
    <P0_START_DATE><P0_START_DATE/> with nothing in between.
    IN the Test Query section, if I put real values in the boxes for the bind variables, I get no data found. If I hardcode the values into the query, I get the data.
    I've repeated the create report query many times and have created a report layout in RTF. I can use the layout with my region - in the print attributes and the layout works with the query but I need to create a PDF using 2 queries - ROWSET1 and ROWSET2. I can generate the XML but the values in the rows are all empty. When I use the layout with a report query instead of the region, I get no data even though I have used the same sql and have selected the bind variables. I was using variables from page items on page zero but have also tried using page items on the current page, the result is the same.
    I need to use a report query and a report layout as I need data from 2 queries in the PDF.
    I looked at your demo - what happens if you add a second sql query to the report query - is there any chance I can look at the back end (developer access?)
    Thanks for your input
    Kathryn

  • How can I use a variable in webi query filter

    I created a webi report using the fiscal year/month(period) field as a filter to show a window of 18 periods.  The report works just as requested using a between filter on fiscal period with prompts for both the start and ending periods.  Now I'd like to calculate the start period based on what was entered in the prompt for the ending period (e.g. enter 201106 for the TO prompt on the between statement and have the FROM statement filled in as 201001.)  I can create variables in the report to display both the user response to the ending period prompt and the calculated starting period, but I cannot figure out how to incorporate that calculated starting date into the FROM side of the between query filter.
    Any suggestions? 
    Thanks,
    Doug
    Sorry I got my froms and to's mixed up in the first draft. Edited by: Doug Roswold on Mar 4, 2011 6:27 PM

    Let me understand what you want to do.  You don't want to use two prompts, just one, insn't it?
    I mean, instead of:
    Filter area:
    Date between "From prompt" to "To Prompt"
    You want something like:.
    Filter area:
    Date between Variable  to "To Prompt"
    if I'm not wrong that's not possible to achieve in Webi Query  Panel.
    Can you modify your universe? The only way to achieve it is modifying your universe, creating your formula in the universe and assigning it to an object, so you can use this new object in your filter area like this:
    Date between MyUniverseObject  to "To Prompt"
    Edited by: PadawanGirl on Mar 4, 2011 8:15 PM

  • Use Yesterday as variable for Query Filter

    Post Author: rrburton
    CA Forum: WebIntelligence Reporting
    I want to have a query filter that refers to the previous day.  In regular SQL I would use something like "= trunc(sysdate)-1".  I don't see any option for doing it this way in web intelligence, the closest it comes is selecting object and then assigning the Beginning of Last Week item from the System Date table.  What am I missing?

    Post Author: rrburton
    CA Forum: WebIntelligence Reporting
    Nevermind - I figured it out just now.  It isn't very intuitive.  In the Objects and Variables dialog in the SystemDate table there are a bunch of items like 1 day, 2 days, etc. and you select one of those and then in the code it looks like:
    WHERE   PKG_NTD_CONV.TO_ORCL_DATE(TROUBLE_TICKET_ARCHIVE.CREATE_DATE)  =  ( sysdate )-1
    It should say something like 1 day ago, 2 days ago, etc.

  • Query filter vs report filter

    Hi,
    when running queries in webi, on a universe that is based on a BW BEx query, we often see a problem when trying to at dimensions in to the query filter pane. This often lead to columns switching place and/or report just showing the technical ID, not text. If we do the same filtering in the report filter pane after the query has run, there is no issue.
    When running a query on a universe based on a BEx query, my understanding is that a filter on a dimension (blue object), will be applied after the BEx query has delivered it's result to BO, and then BO/Webi should only keep the records fitting the filter. Why would this obscure the report result? Anybody else had issues with this?
    The users are used to adding filters to the query, and not adding filters in the report afterwards, and they are expecting this to work...
    Regards,
    Øystein

    Hi,
    To apply filters at two levels:
    The query definition u2013 this is the data defined on the Query tab, retrieved from the data source, and returned to the  report.
    The data displayed in the report u2013 this is a subset of the query definition data that you want to display in a specific version of the report
    Filters you apply to the query definition are called query filters. You use query filters to reduce the amount of data retrieved from the data source. Query filters decrease the time it takes to run the report and ensure that only the data relevant to the report users is saved.
    Filters you apply to the data displayed in the report are called report filters. Once the report is generated, you or other users can apply report filters to restrict the values displayed in the report table or chart. The values hidden by the report filters are still saved with in  the microcube. You can modify the report filters to display different values in the report or remove the report filters to display all the values retrieved from the data source.
    Tip
    Filtering the query minimizes the size of reports, reduces the time it takes to refresh report data, and ensures that the data the documents contain is relevant to users consulting the reports. Individual users can then filter the displayed report values by applying the report filters relevant to their specific business focus.
    All the Best,
    Madhu...

  • Error when using "inlist operator" in the query filter of Webi 3.1

    Hi,
    We are currently in the process of migrating Deski to webi (BOXI 3.1).
    The problem is, Deski is using the "inlist" operator which is working fine but after migrating to webi the inlist operator in the query filter is throwing the below error,
    *Error Message :*
    A database error occured. The database error text is: ORA-00907: missing right parenthesis. (WIS 10901)
    Appreciate your assistance on this.
    Thanks !
    Regards,
    Perialt

    Karthik ,
    Yes I am seeing an additional paranthesis in Webi SQL query.
    For example plz consider the product table below,
    SELECT
    Product.ID,
    Product.Name
    FROM Product
    WHERE
    Product.Name IN ( @Prompt('4) Name:','C','Product\Name-M',multi,free)  )
    As a work around in Custom SQL, If I remove the paranthesis the below query is running fine in webi
    SELECT
    Product.ID,
    Product.Name
    FROM Product
    WHERE
      Product.Name IN  @Prompt('4) Name:','C','Product\Name-M',multi,free) 
    But I want a permanent solution.

  • Master Detail Report using Report Query

    I am using APEX Report Query component to try and create a mater/detail report with BI plug-in. The Report Queries doesn't give you mush flexibility as each query is independent of the other. I'm trying to see if I need to create 2 queries or 1 AND what option would let me create a master detail report like so in BI Desktop:
    Employee: Bob ID:100 Dept: HR
    Jobs
    Job 1
    Job 2
    Job 3
    Employee: Tom ID:200 Dept: ACCt
    Jobs
    Job 1
    Job 2
    Job 3
    Option1.
    I could combine the Employee Job info with the Employee info, but that would report the Employee info for every Employee Job. I didn't think that was good.
    <Rowset1_Row>
    <EMPID>
    <NAME>
    <DEPT>
    <JOB>
    </Rowset1_Row>
    Option 2.
    I could create 2 queries. The 1st getting all of the Empoyee info. The 2nd getting all of the Employee jobs.
    <Rowset1_Row>
    <EMPID>
    <NAME>
    <DEPT>
    <JOB>
    </Rowset1_Row>
    <Rowset2_Row>
    <EMPID>
    <JOB>
    </Rowset2_Row>
    <Rowset2_Row>
    <EMPID>
    <JOB>
    </Rowset2_Row>
    Any advice?
    Edited by: bobmagan on Jun 1, 2009 5:29 AM

    Can you check for the settings please.
    Thanks and Regards
    Riyas

  • Sub query filter may not reference current Report

    Hi,
    I've 2 reports, i'm calling one from the another report by navigate methode(Column Propertives--> Value-->Navigate). 2nd report is having narrative veiw in title of the report .
    Getting Error:
    Sub query filter may not reference current Report

    hi,
    have u seen this ?
    http://siebel.ittoolbox.com/groups/technical-functional/siebel-analytics-l/issue-with-drill-down-1710714
    thanks,
    Saichand.v

  • Content query webpart use a part of the URL as filter

    Hey,
    I have on root site in the site collection a list. Now I like to build up a site template (from which the user can create sub sites form the root site in the site collection.
    In this site template I like to bring on the homepage a content query webpart. The content query webpart has to show one item from the list on the start site.
    How can I configure that the content query webpart use a part of the URL as filter?
    Url is like:
    http://Server/SiteCollection/ID/home.aspx
    The ID must be the filter criterion in the content query webpart. How can I do this?
    Thanks for your help
    Stefan
    Viele Grüße Stefan
    Kontakt unter [email protected]

    Hi Stefan,
    You can create your own CQWP by subclassing the default one.
    Then you can override the CAML query to add criteria found in the URL.
    Here is more information and sample:
    http://www.andrewconnell.com/blog/archive/2008/02/18/Subclassing-the-Content-Query-Web-Part-Adding-Dynamic-Filtering.aspx
    http://msmvps.com/blogs/laflour/archive/2008/05/29/subclassing-content-query-web-part-to-override-caml-query.aspx
    Regards,
    Ludovic Caffin

  • Using crystal reports query (.qry) as datasource in crystal 9

    I have a problem using crystal reports query as a datasource in crystal reports 9. When Im using a report withing application i cannot change database or server property of the query.
    For example - during report design im using one odbc for query but I want to change it during runtime.
    Changing any options beside username or password results in external exception. Im using Builder XE as application environment.
    I tried switching to SQL commands which works but i lose all the fields on report when changing from query to report.
    Is there a way to make query work or to change query to sql command without losing all the fields (and putting them back on the report manually)?

    Hello,
    Unfortunately .QRY files are no longer supported as of CR 9. We replaced it with the Command Object where it basically did the same thing only you had to write the query yourself.
    The problem is because the Command Object can be anything CR has no way of mapping a query to the database field within the report so it auto deletes all of the fields.
    The only way is to create new reports, you can open the original report in one window and then create your new report, copy the SQL into the Command windows and then copy and paste the report objects from the window with the old report into the new report window.
    There is no migration wizard to do this. I have heard of others who used the RAS server or RDC to get the objects from one report and .add them to the new report. Depending on the number of reports you have depends on if it is worth the time writing that app or just rebuild all of your reports.
    Thank you
    Don

  • Where and how do I get the SQL Query used by the Microsoft Generic Report Library - Alerts?

    Background:
    I'm tasked with the following: I need to create a new Report and the SQL
    The two canned reports that I can pattern after are: Microsoft Generic Report Library
    - Alerts (there is also an alert detail report that can be chosen within the alert report that we may want to use instead)
    - Most Common Alerts
    I'm trying to do this:
    Add another parameter to search on customfield3.
    It should be able to report on all alerts that were assigned to the specific team for the time period along with the top 10 (most common alerts) assigned to the team for the time period.
    Choose as the objects (group) all servers, but Imay need to adjust the report to just look at all alerts without having to provide objects or a group
    The struggle I'm having is: I know SQL. I know how to create an RDL file.
    But Where are the RDL files for the canned reports so I can modify the canned RDL and modify its SQL and forms?
    What is the SQL/ where can I find the SQL used for the Generic Report Library -> Alerts

    Easy but you need to extract it from Microsoft Generic Report Pack. 
    So.. the procedure is as follows:
    1) You export and unseal Management Pack from your SCOM using
    Boris's OpsgMgr tools (MPViewer
    2.3.3)
    2) Ok you've got unsealed xml, now the tricky part, use
    MpElementsExtract tool, example of usage:
    MPElementsExtract.exe <MP.xml> /ex /destination:<destination>
    That you way you get several folders out of mp:
    DWScripts, DWSubScripts, LinkedReports, ReportResources, Reports
    Take a look into content of first 2, there will be pure sql scripts, and rdl's are in Reports folder :)
    Other way is to just use SQL profiler and catch SQL query while generating report. 
    --- Jeff (Netwrix)

  • Can use instanceof in query filter?

    Hi all,
    I would like to ask is operator instanceof allowed in query filter?
    Thank you very much

    I would like to ask is operator instanceof allowed in query filter?
    Thank you very muchNo, but you can cast. If the cast in the filter fails, all that happens
    is that subexpression evaluates to false.

Maybe you are looking for

  • Sync info and shutdown info needed, thanks

    Hello, I just purchased my first ipod touch & I love it, except for 2 problems: (1) Every time I sync it with itunes, the clock and the date always get reset/changed. When I go into settings to change it back it reads Chicago for the time zone and Se

  • Acrobat X Unable to Uninstall

    I have been having an entirely consistent issue with Adobe Acrobat X. Every time it opens, not only can I not quit the application, but I also can't close any windows that are open in the application, nor can I force quit. Last night it opened up a f

  • CPU usage by Essbase Server

    Hello Experts, I have a query regarding the CPU usage by Essbase Server ? Can it be limited to certain % of the whole server by a setting ? Thanks in advance. Regards, Sudhir

  • How to refer to a dtd in different dir

    I have a simple question. my xml file wants to point to a dtd which reside in different directory. so, what should i do in the !DOCTYPE line? if it is in the same dir, I can do the following: <!DOCTYPE rootElement SYSTEM "rootElement.dtd" > now, how

  • How to import PST file into Entourage 2004 ?

    Hello all, I wonder if somebody can help. I just recently threw my Windows PC out and replaced it by an iMac - I just love it ! One thing still challenges me though. I got all the old contacts and emails in a PST file format, Outlook 2003. Can anybod