Sql Report Perfomance

Hi Guy's
i have a table woth 10 cr's of data. there are several reports been pulled out of the table ussing SQL joins with other tables.
how can i make my report run faster .. wht are the step's do i need to do to tune my report ?
pls share your comments.
thanks ,
Raj.
Edited by: infant_raj on May 3, 2009 10:51 PM

wht are the step's do i need to do to tune my reportIn my opinion, SQL Tuning is not a 10 step process. And you cant generalize the tuning methodology. SQL Tuning has to be handled on a Case By Case Basis. Meaning you need to Address each of your report separately.
You need to evaluate each queries used by those reports separately and find out the performance bottle neck.
There are several tools provided by oracle to do this. The above link provided by satyaki gives you a glimpse of the tools available.
That could be a nice starting point for you Tuning activity.
Thanks,
Karthick.

Similar Messages

  • Pop up text on clicking link on a sql report

    Hi
    I'm using apex 3.2
    I've a sql report like below
    taskId(edit) Task_details Notes owner .....
    What I want to do is if I click on taskId which is edit link ,pop up text box should open where I can add notes to that row.
    How can I achive this?
    Thanks in advance

    Hi,
    Take a look at the following blog posts and see if they can help you get what you are looking for (there are sample applications in them showing the functionality):
    http://monkeyonoracle.blogspot.com/2010/07/modal-pop-up-with-dynamic-actions.html
    http://www.danielmcghan.us/2008/12/popup-in-report.html
    Hope that's useful for you.
    Regards,
    Sergio

  • Dublicate Value In HTML PL/SQL Report

    hi,
    i have to enter item name and item Price iinto transaction_details by using a form and labour Work, labour amount into LAB_WORK_DTL table using a form .
    Now Problem is when i fetch these value in to PL/SQL Report then it's shows me double value like My Total Amount is 100 Then It show Me 200 and if there is two Values eg A , B then in report it's shows me A ,B , A, B, these two Value Shows Me in four Rows .How can i remove Dublicate Values .Why it does show me that double value . My code is below
    How can i remove this problem .
    declare
    SA NUMBER;
    tot number;
    TH NUMBER;
    va number;
    am number;
    lst number;
    tst number;
    st NUMBER;
    cursor c2 is select
    T.VAT,
    SUM(T.AMOUNT) AMOUNT,
    SUM(T.VAT_AMOUNT) VAT_AMOUNT
    from transaction_details T FULL JOIN LAB_WORK_DTL L
    ON T.BILL_NO = L.BILL_NO
    WHERE T.BILL_NO = :P27_BILL_NO
    GROUP BY T.bill_no,t.vat, T.bill_date, T.vehicle_no, T.PARTY_NAME;
    BEGIN
    FOR x IN(SELECT t.item_name, t.qty,t.rate, t.bill_no
    FROM transaction_details t,LAB_WORK_DTL l where t.bill_no=l.bill_no(+) and t.bill_no=:p27_bill_no
    LOOP
    HTP.P('<tr>
    <td width="2%"> </td>
    <td width="55%" align="left"> '|| HTF.escape_sc (x.item_name)||'</td>
    <td width="15%" ALIGN="right">'|| HTF.escape_sc (x.qty)||'</td>
    <td width="15%" ALIGN="right">'|| HTF.escape_sc (x.rate)||'</td>
    <td width="25%" ALIGN="right">'|| HTF.escape_sc (x.qty)* HTF.escape_sc (x.rate)||'
    </td>
    </tr>');
    END LOOP;
    tot:=0;
    bc:=0;
    KA:=0;
    open c2;
    loop
    FETCH c2 INTO va,am,vat_am;
    exit when c2%notfound;
    tot:=nvl(tot+am,0);
    bc:=nvl(bc+vat_am,0);
    end loop;
    close c2;
    HTP.P('<tr>
    <td width="38">  </td>
    <td width="29"> </td>
    <td width="447"> </td>
    <td>  </td>
    <td width="173">
    <p align="Right">-------------------</td>
    </tr>
    <tr>
    <td width="38"> </td>
    <td width="447"> TOTAL</td>
    <td> </td>
    <td width="95"></td>
    <td width="172">
    <p align="right">'
    || nvl(HTF.escape_sc (tot),0)
    ||'</td>
    </tr>');
    </table></body>
    </html>');
    END;
    Thanks
    Manoj Kaushik
    Edited by: Manoj Kaushik on Apr 8, 2010 11:01 PM

    hi,
    this is my Complete Code But I facing Dublicate Value Error .
    In that Code In Total Amount Of All Item Price Show me Jus Double.
    How Can I remove it.
    declare
    a number;
    bd date;
    b varchar2(20);
    c varchar2(50);
    d varchar2(50);
    e varchar2(50);
    f varchar2(50);
    g varchar2(50);
    h varchar2(4000);
    la NUMBER;
    p NUMBER;
    SA NUMBER;
    K NUMBER;
    FA NUMBER;
    HA NUMBER;
    KA NUMBER;
    KH NUMBER;
    MA NUMBER;
    cnt NUMBER;
    tot number;
    l number;
    TH NUMBER;
    FS NUMBER;
    va number;
    am number;
    vat_am number;
    bc NUMBER;
    lst number;
    tst number;
    st NUMBER;
    c_tra number;
    c_lab number;
    cursor c1 is select T.bill_no,T.bill_date,T.vehicle_no,T.PARTY_NAME
           from  transaction_details T FULL JOIN LAB_WORK_DTL L
    ON    T.BILL_NO = L.BILL_NO
    WHERE T.BILL_NO = :P27_BILL_NO
    GROUP BY T.bill_no, T.bill_date, T.vehicle_no, T.PARTY_NAME;
    cursor c2 is select
           T.VAT,
           SUM(T.AMOUNT) AMOUNT,
           SUM(T.VAT_AMOUNT) VAT_AMOUNT
    from  transaction_details T FULL JOIN LAB_WORK_DTL L
    ON    T.BILL_NO = L.BILL_NO
    WHERE T.BILL_NO = :P27_BILL_NO
    GROUP BY T.bill_no,t.vat, T.bill_date, T.vehicle_no, T.PARTY_NAME;
    cursor c3 is select L.service_tax,SUM(L.LABOUR_AMT) LABOUR_AMT,
           SUM(L.SERVICE_TAX_AMT) SERVICE_TAX_AMT
    from  transaction_details T FULL JOIN LAB_WORK_DTL L
    ON    T.BILL_NO = L.BILL_NO
    WHERE T.BILL_NO = :P27_BILL_NO
    GROUP BY T.bill_no,L.service_tax, T.bill_date, T.vehicle_no, T.PARTY_NAME;
    cursor c4 is select
           T.VAT,
           SUM(T.AMOUNT) AMOUNT,
           SUM(T.VAT_AMOUNT) VAT_AMOUNT
    from  transaction_details T FULL JOIN LAB_WORK_DTL L
    ON    T.BILL_NO = L.BILL_NO
    WHERE T.BILL_NO = :P27_BILL_NO
    GROUP BY T.bill_no,t.vat, T.bill_date, T.vehicle_no, T.PARTY_NAME;
    cursor c5 is select L.service_tax,SUM(L.LABOUR_AMT) LABOUR_AMT,
           SUM(L.SERVICE_TAX_AMT) SERVICE_TAX_AMT
    from  transaction_details T FULL JOIN LAB_WORK_DTL L
    ON    T.BILL_NO = L.BILL_NO
    WHERE T.BILL_NO = :P27_BILL_NO
    GROUP BY T.bill_no,L.service_tax, T.bill_date, T.vehicle_no, T.PARTY_NAME;
    BEGIN
    select chasis_no,ENGINE_NO,MAKE,MILEAGE into c,d,e,f from VEHICLE_DETAILS where vehicle_no =:P27_VEHICLE_NO;
    select ADDRESS into h from PARTY_DETAILS where PARTY_NAME =:p27_PARTY_NAME;
    open c1;
    FETCH c1 INTO a,bd,b,g;
    htp.p('<html>
    <body leftmargin="0" rightmargin="0">
    <table border="1" width="100%" bordercolorlight="#003366" cellspacing="0" bordercolordark="#003366" id="table1">
         <tr>
              <td colspan="2">
              <table border="1" width="100%" cellspacing="0" cellpadding="0" id="table3">
                   <tr>
                        <td width="50"> </td>
                        <td width="21"> </td>
                        <td> </td>
                   </tr>
    <tr>
    <td width="50"><b>
    </b></td>
    <td width="21"><b></b></td>
    <td align ="left">
    <font size="4" face="Arial Black">'||HTF.escape_sc(g)||'</font></td>
                   </tr>
                   <tr>
                        <td width="50"> </td>
                        <td width="21"> </td>
                        <td> </td>
                   </tr>
                   <tr>
         <td width="50"><b>
         </b></td>
                   <td width="60"><b></b></td>
    <td rowspan="4">
    <font size="4" face="Arial Black">'||HTF.escape_sc(h)||'</font></td>
                   </tr>
                   <tr>
                        <td width="50"> </td>
                        <td width="21"> </td>
                   </tr>
                   <tr>
                        <td width="50"> </td>
                        <td width="21"> </td>
                   </tr>
                   <tr>
                        <td width="50"> </td>
                        <td width="21"> </td>
                   </tr>
              </table>
              </td>
              <td width="44%" colspan="3">
              <table border="1" width="100%" cellspacing="0" cellpadding="0" id="table4">
                   <tr>
                        <td width="53"> </td>
                        <td width="104"><b></b></td>
                        <td width="10"></td>
                        <td ><font size="5" face="Arial Black">     ' || HTF.escape_sc(a) ||'</font> </td>
                   </tr>
                   <tr>
                        <td width="53"> </td>
                        <td width="104"><b></b></td>
                        <td width="10"></td>
         <td ><font size="5" face="Arial Black">     ' || HTF.escape_sc(bd) ||'</font></td>
                   </tr>
                   <tr>
                        <td width="53"> </td>
                        <td width="104"><b>
                        </b></td>
                        <td width="10"></td>
              <td ><font size="5" face="Arial Black">     '|| HTF.escape_sc(b) ||'</font> </td>
                   </tr>');
    CLOSE c1;
                   htp.p('<tr>
                        <td width="53"> </td>
                        <td width="104"><b>
                        </b></td>
                        <td width="10"></td>
         <td ><font size="5" face="Arial Black">     ' || HTF.escape_sc (c) ||'</font></td>
                   </tr>
                   <tr>
                        <td width="53"> </td>
                        <td width="104"><b>
                        </b></td>
                        <td width="10"><b></b></td>
                        <td ><font size="5" face="Arial Black">     ' || HTF.escape_sc (d) ||'</font></td>
                   </tr>
                   <tr>
                        <td width="53"> </td>
                        <td width="104"><b>
                        </b></td>
                        <td width="10"><b></b></td>
                        <td ><font size="5" face="Arial Black">     ' || HTF.escape_sc (e) ||'</font></td>
                   </tr>
                   <tr>
                        <td width="53"> </td>
                        <td width="104"><b>
                        </b></td>
                        <td width="10"><b></b></td>
                        <td ><font size="5" face="Arial Black">     ' || HTF.escape_sc (f) ||'</font></td>
                   </tr>
              </TABLE>
              </td>
         </tr>
    <tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr>
    <tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr>
    <tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr>
    <tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr>
    select count(*) into c_tra from transaction_details  where bill_no=:p27_bill_no;
    select count(*) into c_lab from lab_work_dtl  where bill_no=:p27_bill_no;
    if c_tra>0 and c_lab=NULL then
    FOR x IN(SELECT distinct t.item_name, t.qty,t.rate, t.bill_no
    FROM transaction_details t,LAB_WORK_DTL l  where t.bill_no=l.bill_no(+) and t.bill_no=:p27_bill_no
    LOOP
         HTP.P('<tr>
              <td width="2%"> </td>
              <td width="55%"  align="left"> '|| HTF.escape_sc (x.item_name)||'</td>
              <td width="15%" ALIGN="right">'|| HTF.escape_sc (x.qty)||'</td>
              <td width="15%" ALIGN="right">'|| HTF.escape_sc (x.rate)||'</td>
              <td width="25%" ALIGN="right">'|| HTF.escape_sc (x.qty)* HTF.escape_sc (x.rate)||'
              </td>
         </tr>');
    END LOOP;
    tot:=0;
    bc:=0;
    KA:=0;
    open c2;
    loop
    FETCH c2 INTO va,am,vat_am;
    exit when c2%notfound;
    tot:=nvl(tot+am,0);
    bc:=nvl(bc+vat_am,0);
    end loop;
    close c2;
    KA :=nvl(tot+bc,0);
    HTP.P('<tr>
    <td width="38">  </td>
    <td width="29"> </td>
    <td width="447"> </td>
    <td>  </td>
    <td width="173">
    <p align="Right">-------------------</td>
    </tr>
    <tr>
    <td width="38"> </td>
    <td width="447"> TOTAL</td>
    <td> </td>
    <td width="95"></td>
    <td width="172">
    <p align="right">'
    || nvl(HTF.escape_sc (tot),0)
    ||'</td>
    </tr>');
    open c4;
    loop
    FETCH c4 INTO va,am,vat_am;
    exit when c4%notfound;
    HTP.P('<tr>
    <td width="38">  </td>
    <td width="446"> VAT  '||nvl(HTF.escape_sc (va),0)||'% OF Rs.'||nvl(HTF.escape_sc (am),0)||'</td>
    <td width="116"> </td>
    <td></td>
    <td width="172">
    <p align="right">'
    || nvl(HTF.escape_sc (vat_am),0)
    ||'</td>
    </tr>');
    end loop;
    CLOSE c4;
    HTP.P('<tr>
    <td>  </td>
    <td width="30">  </td>
    <td width="118">  </td>
    <td width="95"> </td>
    <td width="173">
    <p align="Right">------------------</td>
    </tr>
    <tr>
    <td>  </td>
    <td width="446" align="left"> TOTAL</td>
    <td width="118"> </td>
    <td width="95"></td>
    <td width="173">
    <p align="right">'
    || nvl(HTF.escape_sc (KA),0)
    ||'</td>
    </tr>
    <tr>
    <td>  </td>
    <td width="446" align="left"> LABOUR CHARGES :-</td>
    <td width="118"> </td>
    <td width="95"></td>
    <TD width="173"></td>
    </tr>');
    elsif c_lab>0 and c_tra=NULL THEN
    FOR Y IN(SELECT l.WORK_DETAIL,l.LABOUR_AMT
    FROM transaction_details t,LAB_WORK_DTL l WHERE t.bill_no(+) =l.bill_no and l.bill_no =:P27_BILL_NO
    LOOP
         HTP.P('<tr>
    <td>  </td>
    <td width="446" align="left"> '||nvl(HTF.escape_sc (Y.WORK_DETAIL),0)||'</td>
    <td width="118"> </td>
    <td width="95"></td>
    <td width="173">
    <p align="right">'|| nvl(HTF.escape_sc(Y.LABOUR_AMT),0)||'</td>
    </tr>');
    END LOOP;
    HTP.P('
    <TR>
    <td>  </td>
    <td width="30"> </td>
    <td width="118"> </td>
    <td width="95"></td>
    <td width="173">  </td>
    </tr>');
    HTP.p ( '<tr>
    <td width="36">  </td>
    <td width="445"> </td>
    <td>  </td>
    <td width="97"> </td>
    <td width="172">
    <p align="Right">------------------</td>
    </tr>');
    sa:=0;
    lst:=0;
    open c3;
    loop
    FETCH c3 INTO st,la,p;
    exit when c3%notfound;
    sa:=nvl(sa+la,0);
    lst:=nvl(lst+p,0);
    end loop;
    close c3;
    TH:=nvl(sa+lst,0);
    FS:=KA+TH;
         htp.p('<tr>
    <td width="36">  </td>
    <td width="445"> TOTAL</td>
    <td> </td>
    <td width="97"></td>
    <td width="172">
    <p align="right">'
    ||nvl(ROUND(HTF.escape_sc (sa),2),0)
    ||'</td>
    </tr>');
    open c5;
    loop
    FETCH c5 INTO st,la,p;
    exit when c5%notfound;
    htp.p('<tr>
    <td width="36">  </td>
    <td width="445"> SERVICE TAX '||nvl(HTF.escape_sc (st),0)||' OF Rs.'||nvl(ROUND(HTF.escape_sc (la),2),0)||'</td>
    <td> </td>
    <td width="97"></td>
    <td width="172">
    <p align="right">'
    || nvl(ROUND(HTF.escape_sc(p),2),0)
    ||'</td>
    </tr>');
    end loop;
    close c5;
    htp.p('<tr>
    <td width="36">  </td>
    <td width="445"> </td>
    <td>  </td>
    <td width="97"> </td>
    <td width="172">
    <p align="Right">------------------</td>
    </tr>');
    htp.p('<tr>
    <td width="36">  </td>
    <td width="445" align="left"> BILL AMOUNT</td>
    <td> </td>
    <td width="97"></td>
    <td width="172" align="right">
    <p >'||ROUND(HTF.escape_sc (FS),2)||'</td>
    </tr>
    <tr>
    <td width="36">  </td>
    <td width="445">
    <p align="left"> '|| f_words(HTF.escape_sc (FS))||'</td>
    <td>  </td>
    <td width="97"> </td>
    <td width="172">
    <p align="Right">------------------</td>
    </tr>');
    ELSE
    FOR x IN(SELECT t.item_name, t.qty,t.rate, t.bill_no
    FROM transaction_details t where t.bill_no=:p27_bill_no
    LOOP
         HTP.P('<tr>
              <td width="2%"> </td>
              <td width="55%"  align="left"> '|| HTF.escape_sc (x.item_name)||'</td>
              <td width="15%" ALIGN="right">'|| HTF.escape_sc (x.qty)||'</td>
              <td width="15%" ALIGN="right">'|| HTF.escape_sc (x.rate)||'</td>
              <td width="25%" ALIGN="right">'|| HTF.escape_sc (x.qty)* HTF.escape_sc (x.rate)||'
              </td>
         </tr>');
    END LOOP;
    tot:=0;
    bc:=0;
    KA:=0;
    open c2;
    loop
    FETCH c2 INTO va,am,vat_am;
    exit when c2%notfound;
    tot:=nvl(tot+am,0);
    bc:=nvl(bc+vat_am,0);
    end loop;
    close c2;
    KA :=nvl(tot+bc,0);
    HTP.P('<tr>
    <td width="38">  </td>
    <td width="29"> </td>
    <td width="447"> </td>
    <td>  </td>
    <td width="173">
    <p align="Right">-------------------</td>
    </tr>
    <tr>
    <td width="38"> </td>
    <td width="447"> TOTAL</td>
    <td> </td>
    <td width="95"></td>
    <td width="172">
    <p align="right">'
    || nvl(HTF.escape_sc (tot),0)
    ||'</td>
    </tr>');
    open c4;
    loop
    FETCH c4 INTO va,am,vat_am;
    exit when c4%notfound;
    HTP.P('<tr>
    <td width="38">  </td>
    <td width="446"> VAT  '||nvl(HTF.escape_sc (va),0)||'% OF Rs.'||nvl(HTF.escape_sc (am),0)||'</td>
    <td width="116"> </td>
    <td></td>
    <td width="172">
    <p align="right">'
    || nvl(HTF.escape_sc (vat_am),0)
    ||'</td>
    </tr>');
    end loop;
    CLOSE c4;
    HTP.P('<tr>
    <td>  </td>
    <td width="30">  </td>
    <td width="118">  </td>
    <td width="95"> </td>
    <td width="173">
    <p align="Right">------------------</td>
    </tr>
    <tr>
    <td>  </td>
    <td width="446" align="left"> TOTAL</td>
    <td width="118"> </td>
    <td width="95"></td>
    <td width="173">
    <p align="right">'
    || nvl(HTF.escape_sc (KA),0)
    ||'</td>
    </tr>
    <tr>
    <td>  </td>
    <td width="446" align="left"> LABOUR CHARGES :-</td>
    <td width="118"> </td>
    <td width="95"></td>
    <TD width="173"></td>
    </tr>');
    FOR Y IN(SELECT l.WORK_DETAIL,l.LABOUR_AMT
    FROM LAB_WORK_DTL l where l.bill_no =:P27_BILL_NO
    LOOP
         HTP.P('<tr>
    <td>  </td>
    <td width="446" align="left"> '||nvl(HTF.escape_sc (Y.WORK_DETAIL),0)||'</td>
    <td width="118"> </td>
    <td width="95"></td>
    <td width="173">
    <p align="right">'|| nvl(HTF.escape_sc(Y.LABOUR_AMT),0)||'</td>
    </tr>');
    END LOOP;
    HTP.P('
    <TR>
    <td>  </td>
    <td width="30"> </td>
    <td width="118"> </td>
    <td width="95"></td>
    <td width="173">  </td>
    </tr>');
    HTP.p ( '<tr>
    <td width="36">  </td>
    <td width="445"> </td>
    <td>  </td>
    <td width="97"> </td>
    <td width="172">
    <p align="Right">------------------</td>
    </tr>');
    sa:=0;
    lst:=0;
    open c3;
    loop
    FETCH c3 INTO st,la,p;
    exit when c3%notfound;
    sa:=nvl(sa+la,0);
    lst:=nvl(lst+p,0);
    end loop;
    close c3;
    TH:=nvl(sa+lst,0);
    FS:=KA+TH;
         htp.p('<tr>
    <td width="36">  </td>
    <td width="445"> TOTAL</td>
    <td> </td>
    <td width="97"></td>
    <td width="172">
    <p align="right">'
    ||nvl(ROUND(HTF.escape_sc (sa),2),0)
    ||'</td>
    </tr>');
    open c5;
    loop
    FETCH c5 INTO st,la,p;
    exit when c5%notfound;
    htp.p('<tr>
    <td width="36">  </td>
    <td width="445"> SERVICE TAX '||nvl(HTF.escape_sc (st),0)||' OF Rs.'||nvl(ROUND(HTF.escape_sc (la),2),0)||'</td>
    <td> </td>
    <td width="97"></td>
    <td width="172">
    <p align="right">'
    || nvl(ROUND(HTF.escape_sc(p),2),0)
    ||'</td>
    </tr>');
    end loop;
    close c5;
    htp.p('<tr>
    <td width="36">  </td>
    <td width="445"> </td>
    <td>  </td>
    <td width="97"> </td>
    <td width="172">
    <p align="Right">------------------</td>
    </tr>
    <tr>
    <td width="36">  </td>
    <td width="445" align="left"> BILL AMOUNT</td>
    <td> </td>
    <td width="97"></td>
    <td width="172" align="right">
    <p >'||ROUND(HTF.escape_sc (FS),2)||'</td>
    </tr>
    <tr>
    <td width="36">  </td>
    <td width="445">
    <p align="left"> '|| f_words(HTF.escape_sc (FS))||'</td>
    <td>  </td>
    <td width="97"> </td>
    <td width="172">
    <p align="Right">------------------</td>
    </tr>');
    END IF;
    HTP.P('</table>
    </body>
    </html>');
    END;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

  • 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

  • [Interface] - Passing variety parameters/input to PL/SQL report

    Hi,
    I've the PL/SQL report which can allow passing in the parameter, i use '&'.
    the report is given to the end user who do not have the IDE for PL/SQL. the machanism of the report is generated into the spool file and import into excel format.
    now i am wondering how to create a tool using SQL or PL/SQL to allow the end user to choose the parameter(s) dynamically and passing into the PL/SQL to generate the report based on the input selected.
    the parameters like below:
    package code :
    week no :
    year :
    department :
    all the above parameters, the data would be selected from the existing lookup table. the user is allow to select more than 1 input for specified parameter for instance i want to spool report for week 1 until week 5.
    pls advise any solution on this topic. thanks

    hi scoot,
    thank for reply.
    yep, i'm using sql*plus and also sql navigator 4.0 .
    the user don't have the software to interact. i'm thinking of build an simple interface using VB and passing in the parameter then initiate the sql*plus to run the program in background mode.
    but if you have any other solution which not need to use other software to wirte such program , pls let me know immediately. thank

  • SQL Report Region

    Hi,
    I am using apex 4.0.1 and I have a page with several SQL Report regions. The user can edit the data in the report regions by clicking a column that uses a href link to open a DML page in a modal window. The user can then amend some data in the modal window, press save which closes the modal window and uses the partial page refresh process to refresh the SQL report region. (Using apex.event.trigger('#SOME_REGION'),'apexrefresh')).
    If I navigate through the report to show rows 31-45 and then click on a href to edit a record. On pressing save, the report is refreshed but the rows displayed goes back to 1-15.
    How can I get the report to stay showing the rows 31-45?
    Cheers
    Paul.

    I believe this answers my question
    http://monkeyonoracle.blogspot.com/2010/11/refresh-report-region-and-pagination.html
    Edited by: pjturley on Jan 10, 2012 1:14 PM

  • How to Convert MM/DD/YYYY to YYYY/MM/DD in SQL Reporting Services

    i am having difficulty of converting a parameter field, called @startdate, on sql reporting services report to YYYY/MM/DD format.  the parameter @Startdate was set to Data/Time.  @Startdate is 6/1/2014 12:00:00 and I want to convert it
    to 2014/06/01.  I want to compare @Startdate with a column in database called Begindate which is in format of YYYY/MM/DD hh:mm:ss.  I tried the followings
    select * from Atable where cast(Atable.Begindate as date) >= cast(@Startdate as date)
    select * from Atable where cast(Atable.Begindate as date >= cast(convert(datetime, @Startdate) as date)
    SQL Reporting Services only gives me Text, Boolean, Date/Time, Integer and Float.
    Regards,

    Hi Elmucho,
    Sorry for the delay. I tested with the sample data you provided, however everything works well in-house. Could you please creste a new report and check the result. Here are the steps I performed:
    1.  Create a table and insert the following data:
    Name (varchar(50))    Begindate (datetime, not null)    
    Lastdate (datetime, not null)
    bob                          
    2008-01-01 08:08:08.000      2010-10-10  
    10:10:10.000
    alice                         
    2010-10-10 10:10:10.00       2011-11-11
      11:11:11.000
    smith                       
    2011-11-11 11:11:11.00       2012-12-12   
    12:12:12.000    
    2. Open SQL Server Data Tools, create the data source and add the dataset with the below query:
    SELECT     Name, Begindate, Lastdate
    FROM         [tablename ]
    WHERE     (CAST(Begindate AS date) >= CAST(@Startdate AS date)) AND (CAST(Lastdate AS date) <= CAST(@Enddate AS date))
    3. Then, click execute button, it prompts for inputting the parameter value.
    @Startdate        
    6/1/2008
    @Enddate          
    5/1/2014
    Enter the date and press OK.
    4. Here is the result in the query designer:
    Insert a table and fields. Save the report and preview:
    Thanks.
    Tracy Cai
    TechNet Community Support

  • 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

  • Upgrade 2010 to 2013 with SQL Reporting Services

    I'm getting ready to upgrade to 2013.
    When I run the Test-SPContentDatabase I get:
    Category : MissingWebPart
    Error : True
    UpgradeBlocking : False
    Message : WebPart class [ab6d9dad-e23c-ce4f-ff98-f6575a1ccf4c] (class [
    Microsoft.ReportingServices.SharePoint.UI.WebParts.ReportView
    erWebPart] from assembly
    [Microsoft.ReportingServices.SharePoint.UI.WebParts,
    Version=10.0.0.0, Culture=neutral,
    PublicKeyToken=89845dcd8080cc91]) is referenced [24] times
    in the database [is-sharepoint], but is not installed on the
    current farm. Please install any feature/solution which
    contains this web part.
    Remedy : One or more web parts are referenced in the database
    [is-sharepoint], but are not installed on the current farm.
    Please install any feature or solution which contains these
    web parts.
    Locations :
    Category : MissingAssembly
    Error : True
    UpgradeBlocking : False
    Message : Assembly
    [Microsoft.ReportingServices.SharePoint.UI.ServerPages,
    Version=10.50.0.0, Culture=neutral,
    PublicKeyToken=89845dcd8080cc91] is referenced in the
    database [is-sharepoint], but is not installed on the
    current farm. Please install any feature/solution which
    contains this assembly.
    Remedy : One or more assemblies are referenced in the database
    [is-sharepoint], but are not installed on the current farm.
    Please install any feature or solution which contains these
    assemblies.
    Locations :
    Category : Configuration
    Error : False
    UpgradeBlocking : False
    Message : The [is.photomask.com] web application is configured with
    claims authentication mode however the content database you
    are trying to attach is intended to be used against a
    windows classic authentication mode.
    Remedy : There is an inconsistency between the authentication mode of
    target web application and the source web application.
    Ensure that the authentication mode setting in upgraded web
    application is the same as what you had in previous
    SharePoint 2010 web application. Refer to the link
    "http://go.microsoft.com/fwlink/?LinkId=236865" for more
    information.
    Locations :
    The first two have to do with reporting services.  I'm trying to workout how to go about getting these errors to go away.  I don't want to remove SQL reporting or migrate a broken site and fix it later.  FYI it does migrate but reporting services
    is of course broken.
    So what I was wanting to do was to upgrade SQL Reporting Services for SharePoint 2010 from 2008 SQL to 2014 SQL first.  This would be in the hopes that it would make the migration to SharePoint 2013 work as the assemblies would change to the proper
    version.
    Can anyone elaborate on my upgrade path?
    I'm still looking up the "Claims Based" authentication thing.  I've found an article on how to migrate it so not a big deal.  I do wonder however if this is tied to the issue I saw with default.aspx and home.aspx being denied to all users
    after I did migrate a content db.
    David Jenkins

    Hi David,
    The following sections describe the basic steps needed to upgrade or migrate from 2008 versions of Reporting Services SharePoint mode to 2014 version.
    SQL Server 2008 R2 to SQL Server 2014
    Starting environment: SQL Server 2008 R2, SharePoint 2010.
    Ending environment: SQL Server 2014, SharePoint 2010.
    In-place upgrade is supported and there is no down time for your SharePoint environment.
    Install the SQL Server 2014 version of the Reporting Services add-in for SharePoint on each web front-end in the farm. You can install the add-in by using the SQL Server 2014 installation wizard or by downloading the add-in.
    Run SQL Server 2014 installation to upgrade SharePoint mode for each “report server”. The SQL Server installation wizard will install the Reporting Services Service and create a new Service application.
    If you also want the ending environment to run SharePoint 2013, you need to complete a database-attach upgrade of the SharePoint 2010 to SharePoint 2013.
    For more scenarios information, please refer to:
    http://msdn.microsoft.com/en-us/library/ms143747.aspx#bkmk_sharePoint_scenarios
    Per the supported combinations of SharePoint and Reported Services Components, I’d recommend you firstly upgrade Reporting Services to 2014, then upgrade SharePoint to 2013.
    For more information:
    http://msdn.microsoft.com/en-us/library/gg492257.aspx
    The link below is the reference for migrating a Reporting Services:
    http://msdn.microsoft.com/en-us/library/hh759331.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Workflows 2013 and SQL Report Services: Configure on Independent Servers or Existing App Servers?

    Currently, my SharePoint 2013 Farm has Workflows 2013 and SQL Report Services installed on app servers, along with other applications. Workflows 2013 isn't working correctly (installed prior to my coming on board with the organization), I'm assuming it
    is a configuration issue, but rather than re-configure, I've read that is recommended to be a standalone server. It was also recommended by a MSFT rep that our report services have its own independent server. Currently, Report Services is also installed on
    an app server that runs other applications on the farm.
    Has anyone had any experience with installing Workflows 2013 and/or SQL Report Services on independent vs. existing application servers?
    Additionally, my existing application servers have 24 GB of RAM (I believe the recommendation for SharePoint production environments is 12 GB), should I plan for the potentially new servers (Workflows and Report Services) to also have 24 GB of RAM? Not really
    sure if it will be needed if they have dedicated tasks.
    Thanks for any input you can provide!

    It entirely depends on load. WFM will work just fine installed on servers in the SharePoint farm. SSRS preferably should go on the end-user facing servers for better performance.
    The questions you're asking are all "it depends" :)
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to show the break totals and NOT the report totals in an SQL report

    APEX 4.0.1
    In an normal SQL report (Not interactive) with a break applied on the first column, how do you just show the break totals and NOT the extra full report totals?
    Next, Is it possible to display only some of the row totals and not for all columns that have the sum option checked against them?
    PaulP

    PaulP wrote:
    APEX 4.0.1
    In an normal SQL report (Not interactive) with a break applied on the first column, how do you just show the break totals and NOT the extra full report totals?Instead of using the APEX break feature, try doing all of this in the query using <tt>GROUPING SETS</tt> or <tt>ROLLUP</tt> to get the break rows, and <tt>GROUPING_ID</tt> in the <tt>HAVING</tt> clause to suppress the unwanted rows.
    Next, Is it possible to display only some of the row totals and not for all columns that have the sum option checked against them?Don't really understand what's meant here?

  • 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

  • Creating tabs for a single SQL report type region

    I would like to find a way to use tabs in a single SQL report type region. The problem I have is that there are too many columns to be displayed so the report looks very cluttered. I would like to find a way to assign say columns 1 - 5 to tab 1, 6-10 to tab 2 etc so the user can find the columns they need by simply clicking on the various tabs without having to execute the query again.
    I have looked at JQuery tabs but that seems to only be applicable to more or less unrelated regions. I tried to create different regions using the same query with different columns and that kind of works, but the regions don't stay in sync if say the user change the order for column 2 in tab 1, when they click on tab 2 everything displays in a different order.
    Another wrinkle is that this is an updatable report so some of the columns are updatable.
    I also looked at the hide / display column solution which is described in a few threads and that may also sort of work, but it is also not quite what I am looking for.
    Any help is greatly appreciated

    Does anybody know if this can be accomplished using APEX? What I am really looking for is very similar to an old fashioned client / server screen developed using say Oracle Forms. Consider an order line screen where say columns line number, SKU and SKU description is to the left of the tabs so these columns are visible no matter which tab is active. Then the first tab has say pricing information including UOM, quantity, list price, unit selling price, price list. The next tab has say customer information including customer number, name, bill to and ship to addresses. the next tab has say shipping information with say the warehouse, shipping instructions and shipping method.

Maybe you are looking for