SQL Report - IF/CASE

Hi guys,
This is mainly a SQL question related to SCCM 2012. I've got the below query which works fine with x86 VM's:
SELECT distinct SYS.Netbios_Name0, Gvm.PhysicalHostName0, SYS.User_Name0,
SYS.Resource_Domain_OR_Workgr0,OPSYS.Caption0 as C054, OPSYS.Version0, ENCL.Manufacturer0,
CSYS.Model0, Processor.MaxClockSpeed0, MEM.TotalPhysicalMemory0, WSTATUS.LastHWScan
FROM v_R_System SYS
LEFT JOIN v_GS_VIRTUAL_MACHINE gvm ON SYS.ResourceID=gvm.ResourceID
LEFT JOIN v_RA_System_IPAddresses IPAddr on SYS.ResourceID = IPAddr.ResourceID
LEFT JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceID
LEFT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceID
LEFT JOIN v_GS_PROCESSOR Processor on Processor.ResourceID = SYS.ResourceID
LEFT JOIN v_GS_OPERATING_SYSTEM OPSYS on SYS.ResourceID=OPSYS.ResourceID
LEFT JOIN v_GS_PC_BIOS BIOS on SYS.ResourceID=BIOS.ResourceID
LEFT JOIN v_GS_SYSTEM_ENCLOSURE ENCL on SYS.ResourceID=ENCL.ResourceID
LEFT JOIN v_GS_WORKSTATION_STATUS wSTATUS on SYS.ResourceID=WSTATUS.ResourceID
LEFT JOIN v_R_User USERS on SYS.User_Name0 = USERS.User_Name0
WHERE OPSYS.Caption0 is not null and CSYS.Model0 = 'Virtual Machine'
ORDER BY SYS.Netbios_Name0, SYS.Resource_Domain_OR_Workgr0
If I replace v_GS_VIRTUAL_MACHINE with v_GS_VIRTUAL_MACHINE_64, it'll show x64 VM's and their host but leave the x86 hosts empty as they're not in v_GS_VIRTUAL_MACHINE_64.PhysicalHostName0.
How can I combine the two queries and check whether v_GS_VIRTUAL_MACHINE_64.PhysicalHostName0 is NULL or not and in case it is, use v_GS_VIRTUAL_MACHINE_.PhysicalHostName0 value?
That will require, I believe, also another condition in the LEFT JOIN part?
Thanks

Simone,
This query maybe help you, I don't specific what version or do you really know version different between x86 ad x64?
Select SMS_R_System.Name, SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain,
SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.NetbiosName from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_COMPUTER_SYSTEM.Manufacturer in ("VMware, Inc.","Microsoft Corporation")
Thanks.

Similar Messages

  • Layout in sql report gets disturbed in case of blank columns

    Hi All,
    I have an SQL report which runs from a concurrent program.
    Problem is, if there are blank columns in the report then the data shifts to the left.
    As shown in the below table, if column Attribute 4 is null then the data for Error column has shifted to the left. The words Incorrect Data should come under heading Error whereas it comes under Attribute4.
    ASSET_NUMBER_REC ATTRIBUTE_CATEGORY_CODE ATTRIBUTE4 ERROR
    316604 ABCD Incorrect Data
    Can someone help me in correcting the report layout.
    Regards,
    Shruti

    ASSET_NUMBER_REC ATTRIBUTE_CATEGORY_CODE ATTRIBUTE4 ERROR
    316604 ABCD Incorrect Data
    Can someone help me in correcting the report layout.
    Hi
    SQL Report --- Do you mean SQL Query in such case,
    Please use NVL function on all column, which will give you proper place result.

  • Difference of sql query in SQL Workshop and SQL Report (case when sum(...

    Hi ,
    I need some help, pls.
    The follwg report runs in SQL Workshop - but gives errors in the sql-query report in HTMLDB:
    SQL-Workshop:
    select
    case
    when SUM(S.POTENTIAL_GROWTH)> 1 and SUM(S.POTENTIAL_GROWTH) < 4 then 'Ok'
    when SUM(S.POTENTIAL_GROWTH)> 4 and SUM(S.POTENTIAL_GROWTH) < 8 then 'SoSo'
    when SUM(S.POTENTIAL_GROWTH)> 8 and SUM(S.POTENTIAL_GROWTH) < 12 then 'Very Good'
    else 'too much'
    end
    from "SEGMENTATION" S
    In an HTMLDB SQL-Query Report I added Aliases (as requested for HTML) but still gives the error:
    <<Query cannot be parsed, please check the syntax of your query. (ORA-00920: invalid relational operator) >>
    the code:
    select
    case
    when SUM(S.POTENTIAL_GROWTH) pot_growth > 1 and SUM(S.POTENTIAL_GROWTH)pot_growth < 4 then 'Ok'
    when SUM(S.POTENTIAL_GROWTH)pot_growth > 4 and SUM(S.POTENTIAL_GROWTH)pot_growth < 8 then 'SoSo'
    when SUM(S.POTENTIAL_GROWTH)pot_growth > 8 and SUM(S.POTENTIAL_GROWTH)pot_growth < 12 then 'Very Good'
    else 'too much'
    end
    from "SEGMENTATION" S
    any halp from the gurus wud be very much appreciated.
    TIA
    Bernhard

    Still you did not give the alias for the case when column. For that only you should give the alias
    select
    case
    when SUM(S.POTENTIAL_GROWTH) pot_growth &gt; 1 and SUM(S.POTENTIAL_GROWTH)pot_growth &lt; 4 then 'Ok'
    when SUM(S.POTENTIAL_GROWTH)pot_growth &gt; 4 and SUM(S.POTENTIAL_GROWTH)pot_growth &lt; 8 then 'SoSo'
    when SUM(S.POTENTIAL_GROWTH)pot_growth &gt; 8 and SUM(S.POTENTIAL_GROWTH)pot_growth &lt; 12 then 'Very Good'
    else 'too much'
    end "GROWTH"
    from "SEGMENTATION" S

  • Add Image column in classic sql report to open a pop page

    I have sql report I want to add a new column which will have image to click, Once user clicks the image a popup page should open.

    Hi Vikram,
    Sorry to bother you, I am very new to apex. Here is my sql query for sql report. Can you please help me.
    <xmp>select
    case
    when ISUPPORT_NUMBER is null or ISUPPORT_NUMBER = 'N/A' then '<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Enter SR Number</p></a>'
    else '<span style="background-color:red;font-weight:bold">'
    || ISUPPORT_NUMBER
    || '</span>'
    end ISUPPORT_NUMBER,
    case
    when ISUPPORT_NUMBER is not null and ISUPPORT_NUMBER != 'N/A' then '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#FF0000;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
    else '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
    end MACHINE_NAME,
    FUNCTION,
    VERSION,
    VENDOR_CLUSTER,
    case when used_by is null then '<a href="javascript:myFunc2(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
    when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc5(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || used_by || '</p></a>'
    else used_by
    end used_by,
    case
    when loaned_to is null and ( upper(used_by)=v('APP_USER') or used_by is null) then '<a href="javascript:myFunc(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
    when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc6(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || loaned_to || '</p></a>'
    else loaned_to
    end loaned_to,
    LOANED_TO_EXPIRY_DATE,
    LOAN_INFO,
    decode(SCAN_NAME,null,'<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>','<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>') SCAN_NAME,
    USERNAME,
    VNC_PASSWORD,
    LAST_UPDATED_BY , </xmp>
    <b>Here I want to add a image column where I can give a link like above to open popup </b>
    from install_dbqa_machines
    Edited by: Sivaramaraju on Jun 19, 2012 9:06 AM
    Edited by: Sivaramaraju on Jun 19, 2012 9:07 AM
    Edited by: Sivaramaraju on Jun 19, 2012 9:08 AM

  • Date syntax for MySql query in SQL Reporting Services

    I am currently trying to link a mysql Stored Procedure to a Microsoft SQL Reporting Server. It is coming up with a Syntax error. I believe this is down to the
    Date_from and Date_to Parameters. The query is below any help would be appreciated 
    DELIMITER $$ 
    USE `mydb`$$ 
    DROP PROCEDURE IF EXISTS `DTI`$$ 
    CREATE DEFINER=`linkeduser`@`%` PROCEDURE `DTI`(IN date_from DATETIME, 
    IN date_to DATETIME) 
    BEGIN 
    SELECT title,gender,firstname,lastname,address1,town,postcode,dob,IF(co.start_date = '00-00-0000', '', CAST(DATE(co.start_date) AS DATE)) AS 'StartDate' 
    FROM cf_user AS us 
    JOIN ca_compliance AS co ON co.user_id = us.user_id 
    WHERE co.start_date BETWEEN date_from AND date_to; 
    END$$ 
    DELIMITER ;

    Hello,
    The dataset query runs on the external data source.
     In your case, you create a report by retrieve data from MySQL database with a stored procedure. The stored procedure will run on MySQL Server and return the result in the Report designer or Report Builder. To solved this issue, please execute the stored
    procedure on the MySQL database and check the syntax error.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • SQL report  in 9.2.1 is very slow compared to 7.3

    Hi,
    I have an sql report which takes only 5 minutes (oracle version 7.3) is taking almost double the time(one or two user accessing the system) with oracle version 9.2.1.
    This report sums the total amount grouped by date field using two tables. Data is exported from 7.3 and imported to 9.2. Indexes are same and the explain plan gives the same resultand runs on unix tru64. Other PL sql and proc programs performance is good compared to version 7.3
    Any idea why the statement is slow.
    Thanks
    sreekumar

    It seems using F9 is the same as Ctrl+Enter, it just repeats the execution. I tried running "select count(*) from <table>" using a basic connection against a remote 11.2 DB, where the <table> had anywhere from 20K to 60K rows, on both 2.1.0.63 and 3.0.02.31. Regardless of the version, or table size, or repeated execution, all executions ran from 0.062 to 1.4 seconds. Sometimes successive executions run faster, sometimes not. Depends on what the database server and the network are doing.
    The <table> cases all happened to have indexes, so Autotrace showed the DB doing an index fast full scan. Even with dropping the index on the 60K table and forcing a table full access, the count(*) came back in under 0.25 sec, so the table needs to be bigger for lack of index to make a difference.
    Possibly the database version could be a factor, I haven't tested on 9i or 10g, but then that wouldn't really make much sense for simple counting. You are no doubt aware of the impact that file system or DB buffer caching could have on this type of test. Here is a post from Ask Tom on the same:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:311990400346061304

  • SQL report link to another report

    Hello,
    I am using Apex 4 and trying to link an sql report with another report. If I were able to use an interactive report I could easily link that to another page, but that would require me to have a primary key. The problem is that I need to link a few tables. So two questions:
    1.) Can I link these via an HTML link to my other page? I would have a HTML link in my report that would link via URL parameter passing. So can I use HTML in a report?
    2.) What is the syntax for a parameter passing via URL? Here is my link that would be:
    a href= f?p=107:40:&APP_SESSION::::P40_NAME:MARK: Are there any other ways to accomplish this?
    Thanks,
    Mark
    Edited by: LondonMark on 23-May-2011 04:18
    Edited by: LondonMark on 23-May-2011 04:20

    I am using Apex 4 and trying to link an sql report with another report. If I were able to use an interactive report I could easily link that to another page
    It's easy in standard reports< /a>. (Ignore the "Interactive Report" typo in step 1.)
    1.) Can I link these via an HTML link to my other page? I would have a HTML link in my report that would link via URL parameter passing. So can I use HTML in a report?You can, but it's better practice to keep data retrieval and HTML structure separate when possible&mdash;in this case by using declarative Column Links.
    2.) What is the syntax for a parameter passing via URL?This is also covered in the documentation.
    Here is my link that would be: a href= f?p=107:40:&APP_SESSION::::P40_NAME:MARK:
    {quote}
    That looks to have the order of the parameters correct, but it's missing some syntax:<a href="f?p=107:40:&APP_SESSION.::::P40_NAME:MARK">...</a>
    The static text exact substitution method of referencing the value of an APEX item requires a terminating dot ("."): <tt>&APP_SESSION.</tt>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • SQL Report not showing data - available in SQL Workshop and SQL Developer

    I am having an issue with developing a SQL Report in APEX 3.2.1. I run the code in both SQL developer and SQL Workshop and I get data pulled back (both against my development environment). When I run the same code in a SQL Report region, it returns no data available. Does anyone have any idea what would be causing this? Other regions on the page accessing different tables in the same schema return data without issue. Any help would be appreciated.
    Thanks
    Freddie

    Could you explain the last comment a bit more. Here is a bit more info just in case I touch on the info with it. The db schema is BPAMGR, the Workspace is BPAMGR. We use the same schema for all of our reporting. All of our tables are in the same schema. We don't use any tables outside of this schema. Our APEX workspace has been associated to only this schema. The tables are able to be queried by SQL Workshop in the same APEX instance that the report application is under.
    Freddie

  • Conditional display in a SQL-Report/Report Region

    Hi,
    here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
    First you have to put the following javascript code in the Page HTML-Header:
    <script type="text/javascript">
    <!--
    // SOURCE
    // W:\oracle\PRJ DWLS\javascript.07.js
    // Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
    // Help (Substitution Strings):
    // http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
    // HTML Expression:
    // <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
    function ex_conditional_td
    ( p_id
    , p_rownum
    , p_cellnum
      var l_td;
      l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
      // hier die Bedingung definieren
      if (true) {
        l_td.style.color = '#808080';
    }  // -- eof ex_conditional_td -- //
    // Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
    // HTML Expression:
    // <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
    function ex_conditional_tr
    ( p_id
    , p_rownum
      var l_tr;    // TABLE.TR
      var l_td;    // TABLE.TR.TD
      if (true) {
        l_tr = vd_getRow(p_id, p_rownum);
        l_tr.onmouseover = null;
        l_tr.onmouseout  = null;
        for (var i=0; i<l_tr.cells.length; i++) {
          l_td = l_tr.cells;
    l_td.style.backgroundColor = '#DDDDDD';
    } // -- eof ex_conditional_tr() -- //
    var g_DEBUG = false;
    var g_TBODY = null;
    // Liefert das Body-Element der Tabelle mit der ID <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // Return
    // das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getBody
    ( p_id
    if (g_TBODY == null) {
    var l_table = null;
    l_table = document.getElementById( p_id );
    if (l_table == null) {
    l_table = document.getElementByName( p_id );
    if (l_table != null) {
    if (vd_debug()) {
    alert("Tabelle gefunden, " + l_table.nodeName);
    g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
    return g_TBODY;
    } // -- eof vd_getBody() -- //
    // Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // Return
    // die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getRow
    ( p_id
    , p_rownum
    var l_body = vd_getBody(p_id);
    if ( l_body != null
    && l_body.nodeName == 'TBODY'
    && l_body.children[p_rownum].nodeName == 'TR') {
    return l_body.children[p_rownum];
    else {
    return null;
    } // -- eof vd_getRow() -- //
    // Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
    // Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // p_column - der Index der Spalte / Zelle
    // Return
    // die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
    function vd_getColumn
    ( p_id
    , p_rownum
    , p_column
    var l_tr = vd_getRow(p_id, p_rownum);
    if ( l_tr != null
    && l_tr.nodeName == 'TR'
    && l_tr.children.length >= p_column
    && l_tr.children[p_column].nodeName == 'TD') {
    return l_tr.children[p_column];
    else {
    return null;
    } // -- eof vd_getColumn() -- //
    // Rekursives Suchen nach einem Node.
    // Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
    // SQL-Report.
    // Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
    // darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
    // Klasse <p_class> befindet.
    // Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
    // "t10data" formatiert.
    // Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
    // Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
    // selbst ermittelt werden.
    // Der Beispielaufruf:
    // var l_body;
    // var l_node = document.getElementById( 'R112233' );
    // l_body = search( l_node, 'TD', 't10data', 'TBODY');
    // durchsucht also das mit der Id "R112233" versehene Element [der Report, für
    // den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
    // die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
    // definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
    // Parameter
    // p_node - das Ausgangselement
    // p_searchIn - der Knotenname, der durchsucht werden soll
    // [node.nodeName == p_searchIn]
    // p_class - der Name der CSS Klasse
    // [node.classList[<index>] == p_class
    // p_parentName - der Name [node.parentNode.nodeName == p_parentName]
    // des Elements, das zurückgeliefert werden soll. Wird als
    // p_parentName der Suchname p_searchIn angegeben, wird
    // das Element selbst zurückgegeben.
    // Return
    // das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
    function vd_search
    ( p_node
    , p_searchIn
    , p_class
    , p_parentName
    var LN = "vd_search";
    var l_element = null;
    // DEBUG
    if (vd_debug()) {
    alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
    // 1) der aktuelle Knoten ist der, der durchsucht werden soll
    if (p_node.nodeName == p_searchIn) {
    if (p_node.classList.length > 0) {
    for(var c=0; c<p_node.classList.length; c++) {
    if (p_node.classList[c] == p_class) {
    // Parent Node dynmisch suchen
    l_node = p_node;
    if (l_node.nodeName == p_parentName) {
    return l_node;
    while(l_node != null && l_node.parentNode != null) {
    if (l_node.parentNode.nodeName == p_parentName) {
    return l_node.parentNode;
    else {
    l_node = l_node.parentNode;
    // 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
    // weitersuchen
    if (p_node.children.length > 0) {
    var i = 0;
    while (i<p_node.children.length && l_element==null) {
    l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
    i++;
    return l_element;
    } // -- eof vd_search() -- //
    // Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
    // Return
    // true - debug ist eingeschaltet
    // false - debug ist ausgeschaltet
    function vd_debug()
    return g_DEBUG;
    -->
    </script>
    Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
    Second is, that you set an static id for your report region. I prefer this structure:
    R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
    First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
    <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
    Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
    <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum
    c) the cellnum (here we have to subtract 1 to get the "real" cell index)
    The "ex_conditional" functions are just a representation of how to get the row or cell node.
    Hope this help a bit.
    Tom

    I would use a CASE statement in the select....
    each CASE would be an img src tag for a different button if the button is an image.
    does that make sense? I can include an example if you would like...

  • Refreshing sql report region based on values from another region - 4.0

    Greetings All,
    I have a page with two regions, say region 1 and region 2. I have a before header process that fetches values from db based on criteria entered from another page. Region 2 is a sql report region with bind variables from region 1. When this page is rendered region 1 renders properly however sql report region always returns no records. What am i missing here?
    I would like to have the region 2 render a report based on the values from region 1. Region 2 has a sql query that looks something like
    select
    colum 1,
    column 2,
    column 3
    from table t1
    where t1.c1 = :p10_item1
    and t1.c2 = :p10_item2Using apex 4.0
    thanks
    Seetharaman

    If these items hidden, try making them display only .
    Also what happens when you move the items from region 1 to region 2.
    From my experience items do not have much of a dependency on the region they are attached to other than cases when the region is not rendered(when its condition fails) and then the item values become null(bcoz they themselves are not rendered).

  • Pl-sql report with parameter

    Hi
    I have created report with region source as pl-sql. In pl-sql block, calling package where i am passing query. In query's where clause i want to pass paramter value which user had selected.
    There are two regions on page. On upper part, there is select list, on lower part there is report with pl-sql region but value of select list is not found in query. I am trying to access with bind variable, select list of item :SL_TEXT. But it is not showing any value in it.
    How to use select list value in query of report? Or let me know how to use parameter in pl-sql report which is selected in other region?
    Thanks in advance

    I am attempting to define the variable as a date variable through Oracle BI and yes it does use a colon to signal variable substitution.
    So thank you the first way you stated should work.
    The only problem I'm running into now I believe steems from the date format that column that I am trying to filter on. It is in what appears to be the worst format possible.
    Is it common for dates to be stored in a DD-MON-YY format? (e.g. 01-JAN-08) I thought we as a community had moved past that post Y2K scare. lol.
    When I set up the bind variable in BI it allows me to define the date format, much similar to the TO_DATE function but then it says (must be java date format). So I'm thinking that maybe DD-MON-YY is not a java date format.
    In that case is there a way to cast or convert my date format in the sql so that it is a supported java date format?
    Or should I just give up and pass it as a varchar2?

  • PLSQL processing of a dynamic sql report

    Hi there,
    I have a problem processing a dynamic sql report, specifically in referencing the PL/SQL column headings I have.
    Basically I have a report that generates one row for each project a person belongs to, and then using htmldb_item.text creates one field for each day of the week (sysdate - sysdate+6) so that people can enter their hours worked. The idea is they then press a submit button and the hours are entered into a project table something like (date_worked, project_id, hours_worked), one row for each entry.
    So I have:
    for i in 1..HTMLDB_APPLICATION.G_F01.count
    loop
    ... err... here I want to insert into the table the values(column_header, project_id, HTMLDB_APPLICATION.G_F01(i)).. but I don't know how to access that column_header value.
    Is this possible and if so, how?
    Many thanks,
    Tosh.

    that gives me the values of the text fields, but what
    I'd like to insert is the value of the column
    header... so for example:Yes, I understood what you meant. I did have a differect project_id for each INSERT in my SQL above. I guess that should have been day_id
    Since you are generating the tabular form SQL manually, you know which htmldb_item.text index corresponds to which column (which represents day_id in your case). So, use this to write 6 INSERT statements, one for each day. day_id would be a number going from 0 thru 6 where 0 represents Sunday and 6 represents Saturday.
    Bottom line: This is like generating/updating a calendar, your column headings are always fixed (Sun thru Saturday), just the date they represent would change.

  • When i open my SQL reporting URL it says this page cannot be displayed

    Hi All,
    I am using SQL Server 2008 with SP3. When i open my open my reporting manager URL. i get the error as "This page cannot be displayed" HTTP Error 500 internal server error. I read few blogs posted below. Tried both but could not help me out
    http://social.technet.microsoft.com/Forums/en-US/1a03196f-f8ee-4a66-b08b-b2e02447a25e/can-not-open-page-for-report-manager-url-httplocalhost8080reports-for-sql-server-2008?forum=sqlreportingservices
    and 
    http://ashwaniashwin.wordpress.com/2014/02/28/the-url-has-already-been-reserved-error-while-configuring-the-report-server-url-in-reporting-services-configuration-manager/
    But none of them helped.
    I tried deleting the reserved URL and re reserved but still did not help.
    Tried changing the port number but still no luck.
    I analysed the sql reporting error log and found the below.
    ===============================================
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: Unable to validate data.
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: HTTP status code --> 500
    ===============================================
       at ReportingServicesHttpRuntime.BaseWorkerRequest.FilterAndThrowException(Exception e, String message)
       at ReportingServicesHttpRuntime.RsWorkerRequest.GetUserToken()
       at System.Web.HttpContext.get_ImpersonationToken()
       at System.Web.ClientImpersonationContext.Start(HttpContext context, Boolean throwOnError)
       at System.Web.HttpApplication.ThreadContext.SetImpersonationContext()
       at System.Web.HttpApplication.ThreadContext.Enter(Boolean setImpersonationContext)
       at System.Web.HttpApplication.OnThreadEnterPrivate(Boolean setImpersonationContext)
       at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
    library!ReportServer_0-1!e0c!06/07/2014-03:30:49:: Call to GetItemTypeAction(/).
    library!ReportServer_0-1!f10!06/07/2014-03:30:49:: i INFO: Catalog SQL Server Edition = Enterprise
    library!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Catalog SQL Server Edition = Enterprise
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Initializing crypto as user: E2K\Lg161489
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Exporting public key
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Performing sku validation
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:50:: i INFO: Importing existing encryption key
    library!ReportServer_0-1!e0c!06/07/2014-03:30:50:: Call to ListParentsAction(/).
    library!ReportServer_0-1!e0c!06/07/2014-03:30:50:: Call to ListChildrenAction(/, False).
    webserver!ReportServer_0-1!e0c!06/07/2014-03:30:50:: i INFO: Processed folder '/'
    library!ReportServer_0-1!ad4!06/07/2014-03:30:51:: Call to GetPermissionsAction(/).
    library!ReportServer_0-1!f10!06/07/2014-03:30:51:: Call to GetPropertiesAction(/, PathBased).
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPermissionsAction().
    library!ReportServer_0-1!f10!06/07/2014-03:30:52:: Call to ListChildrenAction(/, False).
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    library!ReportServer_0-1!f10!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: Unable to validate data.
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: HTTP status code --> 500
    I have also attached all the logs in a FTP for further analysis. Please download it from the below link.
    https://depositfiles.com/files/cfe6af33b
    Can any one please help me. Seems to be a never ending issue to me.

    Take a look on link
    http://pcsupport.about.com/od/findbyerrormessage/a/500servererror.htm
    In case If you rebuilt the server then then linking will break , go in encryption keys option if only delete button is enabled, and backup button is disabled the delete the keys .close the report configuration manager and reopen the manager .Now try
    to open report manager url. 
    Please click "Propose
    As Answer" if a post solves your problem, or "Vote
    As Helpful" if a post has been useful to you

  • Passing multiple values to another page via a sql report

    Having trouble passing multiple values to another page via a popup SQL report
    I have two fields one called "descr" and another called "Met"
    when I use the code below all works fine and the value of "descr" is passed
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE:'
    || descr
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
    can someone look at my code below and see what may be wrong
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    || descr, Met
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    I appeciate your help looking into this
    FYI (Here is the entire SQL for reference)
    With t
    as
    (SELECT
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_CPT &gt; :P940_METRIC_1_WCS_CPT1 then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' end "WCSCPT",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_TOI_PER_FTE &lt; :P940_METRIC_2_WCS_TOI_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSTOIPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_SIO_PER_FTE &lt; :P940_METRIC_3_WCS_SIO_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSSIOPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_TC_PER_FTE &lt; :P940_METRIC_4_WCS_TC_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSTCPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_ADSL_PER_FTE &lt; :P940_METRIC_5_WCS_DSL_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSADSLPERFTE",
    CASE WHEN KEY = 2 THEN
    TO_CHAR(MONTH,'MON-YY')
    else
    'METRICS'
    end "MONTH"
    FROM (
    SELECT DISTINCT
    ROW_NUMBER() OVER (ORDER BY KEY DESC) AS ROW_NUM, KEY, WCS_CPT, WCS_TOI_PER_FTE, WCS_SIO_PER_FTE, WCS_TC_PER_FTE, WCS_ADSL_PER_FTE, MONTH
    from TW_M_KEYMETRICS
    WHERE TO_DATE(UPPER(MONTH),'DD/MON/YY') &gt;= TO_DATE(UPPER(:P940_START_OF_THIS_FIN_YEAR),'DD/MON/YY')
    ORDER BY KEY ASC, ROW_NUM, MONTH)
    WHERE ROW_NUM &lt;= :P940_MONTHS_SINCE_FIN_START)
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_METRIC_TYPE,P950_METRIC_VALUE:descr,MET'
    || ''
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    , max(Met) METRICS, max(Jul) Jul08, max(Aug) Aug08, max(Sep) Sep08, max(Oct) Oct08, max(Nov) Nov08, max(Dec)Dec08, max(Jan) Jan08, max(Feb) Feb08, max(Mar) Mar08, max(Apr) Apr08, max(May) May08, max(Jun) Jun08
    from (
    Select 'Cost Per Transaction' descr,
    decode (MONTH, 'METRICS', WCSCPT) MET,
    decode (MONTH, 'JUL-08', WCSCPT) Jul,
    decode (MONTH, 'AUG-08', WCSCPT) Aug,
    decode (MONTH, 'SEP-08', WCSCPT) Sep,
    decode (MONTH, 'OCT-08', WCSCPT) Oct,
    decode (MONTH, 'NOV-08', WCSCPT) Nov,
    decode (MONTH, 'DEC-08', WCSCPT) Dec,
    decode (MONTH, 'JAN-08', WCSCPT) Jan,
    decode (MONTH, 'FEB-08', WCSCPT) Feb,
    decode (MONTH, 'MAR-08', WCSCPT) Mar,
    decode (MONTH, 'APR-08', WCSCPT) Apr,
    decode (MONTH, 'MAY-08', WCSCPT) May,
    decode (MONTH, 'JUN-08', WCSCPT) Jun
    from t
    union all
    Select 'Total Orders Issued Per FTE' descr,
    decode (MONTH, 'METRICS', WCSTOIPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSTOIPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSTOIPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSTOIPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSTOIPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSTOIPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSTOIPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSTOIPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSTOIPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSTOIPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSTOIPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSTOIPERFTE) May,
    decode (MONTH, 'JUN-08', WCSTOIPERFTE) Jun
    from t
    union all
    Select 'SIOs Per Billing FTE' descr,
    decode (MONTH, 'METRICS', WCSSIOPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSSIOPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSSIOPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSSIOPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSSIOPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSSIOPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSSIOPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSSIOPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSSIOPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSSIOPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSSIOPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSSIOPERFTE) May,
    decode (MONTH, 'JUN-08', WCSSIOPERFTE) Jun
    from t
    union all
    Select 'Total Calls Answered per FTE' descr,
    decode (MONTH, 'METRICS', WCSTCPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSTCPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSTCPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSTCPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSTCPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSTCPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSTCPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSTCPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSTCPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSTCPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSTCPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSTCPERFTE) May,
    decode (MONTH, 'JUN-08', WCSTCPERFTE) Jun
    from t
    union all
    Select 'ADSL Orders per FTE' descr,
    decode (MONTH, 'METRICS', WCSADSLPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSADSLPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSADSLPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSADSLPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSADSLPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSADSLPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSADSLPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSADSLPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSADSLPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSADSLPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSADSLPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSADSLPERFTE) May,
    decode (MONTH, 'JUN-08', WCSADSLPERFTE) Jun
    from t
    GROUP by descr
    Frank

    Borg Species 5618 wrote:
    Having trouble passing multiple values to another page via a popup SQL report
    But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
    can someone look at my code below and see what may be wrong
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    || descr, Met
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    Hi Frank,
    You should close this parameters with single quotation. Try this -
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    *|| 'descr, Met'*
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    Hope this helps.
    Regards,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • BPC security can be used in SQL Reporting Services?

    Hello,
    We are trying to implement SQL Reporting Services(RS) as web reports of BPC.
    Is it possible to use BPC security user access control in SQL RS?
    We know that SQL RS user access can be managed by windows domain, but we like to use BPC security as SQL RS user control.
    Thank you in advance.
    Sam

    Hello,
    We are trying to implement SQL Reporting Services(RS) as web reports of BPC.
    Is it possible to use BPC security user access control in SQL RS?
    We know that SQL RS user access can be managed by windows domain, but we like to use BPC security as SQL RS user control.
    Thank you in advance.
    Sam
    ==================================================================
    Hi Sam,
    Could you be more specific on what you are going to do with RS?
    BPC, as you know, uses Windows AD. If you intend to use RS in BPC, you have already introduced Windows AD and BPC access security for RS.  But only given RS report is eligible in this case.
    If you want to make a report that refers to business data of BPC, and need to pass argument as query parameter such as what category, what entity, not possible actaully, no way to make it happen with standard feature of BPC. But you can think of possibility of customizing and need to find out how to pass the argument for a user(read ACS table containing security info).
    Reg. the reporting tool, if you are using 7.5, BO products is aligned well. Xcelsius and Voyager will be a tool for your requirement.
    Regards,
    YH Seo

Maybe you are looking for

  • PL/SQL stored procedure and passing queries

    Hi all. This is a really "newbie"-type question....sorry ! I have written a PL/SQL procedure which takes a query (as varchar2) as an argument and returns the result in xml as a clob. ie: SELECT returnXML('SELECT * FROM test_table') FROM DUAL; This wo

  • Mulitple errors in a record, how to find?

    Hello BW Experts, Scenario: I have a record with char zcustnum and amount zbal infobjects. Amount error reported: if i have error both in zcustnum and zbal. it is only reporting error in zbal in the log if i correct the error in the zbal. It is then

  • Where to find bi11.1.1.5

    Hello, I just want to know only one thing by any chance is it possbile to download obiee 11.1.1.5 version for linux machine -64 bit? In the oracle.com its not available its avialble for HP machine. In the edelivary also i tried but somehow not able t

  • How to make a part of image have transitions on hover

    hey i wanna know how to make a part of a image have transitions when we hover on it like on my website :-perfectionunleashed.in i got this template from internet when i hover on second box "mission" comes with ease-in-out effect i cant get anything i

  • How do I re-download CS5 to my new computer?

    I have the serial numbers of my CS5 package from my old computer, but I have a new computer now and need to download it again. I know you can have 2 downloads, so this would be my 2nd one. I just can't find the place to re-download the product. Can a