Export current view or drill down report

Post Author: Rainer
CA Forum: Exporting
My Enviroment: CR XI, Delphi,  ActiveXReportViewer Hello together,how can I export the current view or a drilled down report with the COM object.I didn't find a way to get the current view object (IReport) I think  there must be a solution, because the default export method can export the current view.Thanks Rainer 

Post Author: jarrodnewman
CA Forum: Exporting
My setup isn't exactly the same but this might help you:  I had this problem with Crystal.Net in Visual Studio 2005.  This link helped me resolve it.  http://diamond.businessobjects.com/node/1956
My export routine used to just export the ReportDocument object.  But this object does not contain any information on the currently displayed group level.  So when I built a report modeled very closely after the sample 'World Sales Report.rpt' my export routine would only export the main view even if I was drilled down into other group levels of the report.  I learned that the CrystalReportsViewer object is what contains the drill-down level in the ViewInfo.ViewContext object.  So the link above solved this for me. 
As a side note, I also had to manipulate suppressing and unsuppressing sections on export which can't be done via the CrystalReportsViewer object.  So I had to save a copy of the current ViewInfo object to local variable.  Then I modified the ReportDocument object to unsuppress and suppress certain sections.  Then I set this modified ReportDocument object as the RecordSource of the CrystalReportsViewer object and passed as parameters the new NonHTTPCachedReportSource object and the saved ViewInfo object to my new export routine.  This allowed me to preserve the drill-down view properties but apply it to a different ReportSource.  I can supply (c#) code if needed.  ( I don't usually show the ReportHeader or PageFooter sections in my online view of reports but I need to show them when I export a report)...
- Jarrod ([email protected])

Similar Messages

  • Drill Down Report issues in VS 2010, CR viewer 12

    We are using VS 2010, Crystal Reports 12 with Crystal Viewer 12 control called from a C# programmed page frame.  Several Drill Down reports are developed with CR 12 service pack 1 and then deployed onto the server. 
    These Drill Down reports work great within the viewer.  But Two critical issues have been discovered,
    1.     With the drop down report, the next /last page buttons work on the main page, but it doesnu2019t work on any of the drill drop sections.
    2.     The print / export functions work on the main page.  Using the print / export functions from the Drilled down pages reverts back to the main page, not the drill down page that is being viewed.
    Has anyone else seen these issues and know of a fix.  Wondering if it might be something in the viewer settings within the .net or the version of viewer ?
    I have viewed the CR .Net API Reference but probably due to lack of .net knowledge, seems overwhelming  to me.
    Thanks

    Hello,
    Hope you can use this code to export report in pdf with the drill down options/nodes.
    CrystalDecisions.CrystalReports.Engine.ReportDocument rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
       /// Calling a sample report named Employee Sales.rpt with parameter
       rd.Load(Application.StartupPath + \\..\\..\\Employee Sales.rpt);
       rd.SetParameterValue("Login Name","Robert King");
       ISCDReportClientDocument rcd = rd.ReportClientDocument;
       ISCRPDFExportFormatOptions exportFormat = new PDFExportFormatOptionsClass();
       exportFormat.CreateBookmarksFromGroupTree = true;
       //Create an array of bytes of the report.
       PrintOutputController rasPrintOutputController;
       rasPrintOutputController = rcd.PrintOutputController;
       // Define the export format as PDF, and apply the PDF export options
       CrystalDecisions.ReportAppServer.ReportDefModel.ExportOptions expOpts = new CrystalDecisions.ReportAppServer.ReportDefModel.ExportOptionsClass();
       expOpts.ExportFormatType = CrReportExportFormatEnum.crReportExportFormatPDF;
       expOpts.FormatOptions = exportFormat;
       // Use the PrintOutputController class to export the report based on the defined export options.
       ByteArray tempByteArray = rcd.PrintOutputController.ExportEx(expOpts);
       Byte[] byteStreamOutput = tempByteArray.ByteArray;
       // Create a new file(MyExportedReport) with the specified path, name, and file extension.
       FileStream fs = new FileStream("C:\\Windows\\Temp\\MyExportedReport.pdf", FileMode.Create, FileAccess.ReadWrite);
       // Stream the bytes from the exported report to the newly created file and close the file stream.
       int maxSize = byteStreamOutput.Length;
       fs.Write(byteStreamOutput, 0, maxSize);
       fs.Close();
       MessageBox.Show("Export is done in C:\\Windows\\Temp location");
    Thanks.

  • Drill down report export to pdf

    Hi,
    I have a drill down report that i need to export to pdf.to get the drill down facility, I used 'HIDE' option for the groups.
    The drill down works in crystal.But when I export the crystal report to PDF, I could not see the hidden groups/Tabs, and my drill down doesn;t work.Please suggest me what to do while exporting a drill down report to PDF. Is it possible to export a drill down report to Excel?Can someone suggest the precaustions to be taken while exporting to different formats??
    Thank you,
    Tatyana.

    Drill-Down behavior in Crystal doesn't carry over to pdf exports.
    Using one of the 3rd-party Crystal Reports schedulers listed at http://www.kenhamady.com/bookmarks.html you can achieve similar behavior in pdf exports by automating the process of:
    1. exporting the main report to main pdf.
    2. Bursting a detailed report to individual pdf files
    3. using Crystal formulas embedded in the main report to generate live links from the exported main pdf to the individual detail pdf files.

  • Copy/export a drill down report created by CXR0 in PRD

    Hi Gurus,
    I am trying to copy/export a drill down report created by CXR0 in PRD ( can not move transport from PRD to QAC, transport doesnot allow ) to QAC and DEV,  is there any other way to export / import , download /upload option to transfer report or form from the drill down report.
    Please help

    Hi Amit,
    I think you are right, I got same type of information from other basis source that drill down report cannot be exported or imported, only way to move by transport.
    Still I wait for your confirmation,
    Al Mamun

  • Problem with Drill down reports demo

    Hi,
    Did somebody successfully installed the
    drill down demo. I am not able to get the results here getting some javascript error
    "object expected".
    I have created a schema,
    also the cgicmd.dat report variables
    attahced the rep_util file.
    I could see the invoices report and the product link displays
    javascript:opendetailwin('http:/myserver/dev60cgi/rwcgi60.exe?item+101863')
    when i clik on the above link i get object expected error.
    The Javascript on view source page looks like this
    <script language="JavaScript">
    <!--
    var detailwin = null;
    function opendetailwin(urltopen)
    detailwin = window.open(urltopen,"ItemDetails",
    "width=650,height=535,resizable=yes,status=no,menubar=no,scrollbars=yes,toolbar=no")
    detailwin.location.href=urltopen;
    // -->
    </SCRIPT>
    any help will be higly appreciated. Also is there any other way of implementing drill down reports on web.
    Thanks in advance,
    Shailesh

    Hello,
    Try making your hyperlink in the master report look like this:
    http://webserver/dev60cgi/rwcgi60.exe?detail+p_contactid=&<contact_id1>
    The &<column_name> reference in a hyperlink will tell Reports to substitute the current value of that column in the resultant string.
    Regards,
    The Oracle Reports Team --skw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ALV interactive drill down report

    Hi,
    I have a requirement to display the header details on an ALV report
    date -- level1level2level3...level4
    Here level1,2,3,4 contains the counts of item details based on level
    Now i need to display second drill down report, when user clicks on specific cell for levels.
    e.g.,
    when user clicks on count for level2, i need to show drill down report for level2 items for that date.
    Can any one give me some ideas for this ALV report...
    THanks in advance.
    points will be awarded immediately

    If you need to know how to do drill down, here is an example program.
    report zrich_0001.
    * Global ALV Data Declarations
    type-pools: slis.
    * Internal Tables
    data: begin of itab occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of itab.
    start-of-selection.
      perform get_data.
      perform call_alv.
    *      Form  GET_DATA
    form get_data.
      select mara~matnr makt~maktx
              into corresponding fields of table itab
                   from mara
                     inner join makt
                      on mara~matnr = makt~matnr
                                 up to 20 rows.
    endform.
    *  CALL_ALV
    form call_alv.
      data: ifc type slis_t_fieldcat_alv.
      data: xfc type slis_fieldcat_alv.
      data: repid type sy-repid.
      repid = sy-repid.
      clear xfc. refresh ifc.
      clear xfc.
      xfc-reptext_ddic = 'Material Number'.
      xfc-fieldname    = 'MATNR'.
      xfc-tabname      = 'ITAB'.
      xfc-outputlen    = '18'.
      append xfc to ifc.
      clear xfc.
      xfc-reptext_ddic = 'Material Description'.
      xfc-fieldname    = 'MAKTX'.
      xfc-tabname      = 'ITAB'.
      xfc-outputlen    = '40'.
      append xfc to ifc.
    * Call ABAP List Viewer (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = repid
                i_callback_user_command = 'HANDLE_USER_COMMAND'
                it_fieldcat             = ifc
           tables
                t_outtab                = itab.
    endform.
    *       FORM handle_User_Command                                      *
    form handle_user_command using r_ucomm     like sy-ucomm
                                   rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
        case rs_selfield-FIELDNAME.
          when 'MATNR'.
             set parameter id 'MAT' field rs_selfield-value.
             call transaction 'MD04' and skip first screen.
          endcase.
      endcase.
    endform.
    Regards,
    Rich Heilman

  • Drill down report...

    HI abapers,
    How to create drill down report in alv.
    When i double click the particular field, another report has to pop up and display the details of that particular field.
    for eg,
    When double click the amount spent field other report has to say, For which material the amonut has spend.
    Thanking You
    arvind

    hi arv,
    for me your scenario is not clear..
    you want to drill down the alv .. and show the report in the same program or you want to call another program when u try to hit the alv report..
    well for drilling down the same program.. you can use the following method
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                 =  GV_REPID
        I_CALLBACK_PF_STATUS_SET          = ' '
         I_CALLBACK_USER_COMMAND            = 'TOP1'     " drill down
         I_CALLBACK_TOP_OF_PAGE             = 'TOP2'
        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    FORM TOP1 USING UCOMM TYPE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
    READ TABLE GT_FINAL_TOTAL INTO GS_FINAL INDEX SELFIELD-TABINDEX.
    CASE SELFIELD-TABINDEX.
    WHEN SELFIELD-TABINDEX.
    perfrom itab2_operation. " in this form you will write the code to get the data for drill dispplay
    now defing fieldcatalog again : example :
        GS_FCAT-COL_POS = 1.
        GS_FCAT-FIELDNAME = 'EBELN'.
        GS_FCAT-SELTEXT_L =  TEXT-001.
        GS_FCAT-FIX_COLUMN = 'X'.
        GS_FCAT-OUTPUTLEN = 13.
        APPEND GS_FCAT TO GT_FCA
    and  call alv display again :
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
        I_CALLBACK_PROGRAM                =  GV_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_TOP_OF_PAGE            = 'TOP2'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      = ''
      I_GRID_SETTINGS                   =
        IS_LAYOUT                         = GS_LAYOUT
          IT_FIELDCAT                     = GT_FCAT
    and if you want to call another progam when u hit..u have to use..submit key work
    like  SUBMIT  ZAFI013R VIA SELECTION-SCREEN AND RETURN.

  • Drill Down Report in screen painter

    Hi Experts,
    I have a requirement in dialog programming/screen painter to create a 2 level drill down report. for eac page of the report, it should only contain 10 entries then to view the other entries (11 and up), the button for next page should be click (there is also back button).
    First question is how will I have the drill down report (alv list type?) in screen painter?
    Second question is how should I process the logic mentioned above (next and back) in screen painter/dialog programming?
    Thanks in advance for all teh support. Points will be rewarded.
    Cheers,
    Kurtt

    Hai,
    Go thru this Threads u ll get an idea,
    Drill down report help
    Re: regarding Drill Down Reporting
    drill down capabilities for an alv grid display field using oops concept
    Regards,
    Padmam.

  • Parameter Problem with Drill down reports

    Hi,
    I have created a drill down report.
    I have a master report which list all the employee names and a detail report which list the contact details for each employee selected.
    The URL looks like this http://webser/dev60cgi/rwcgi60.exe?detail&p_empid = 1200
    detail is a kepmapping entry in cgicmd
    this does not work and the detail report does not get the p_empid value.
    Now if i enter the compelete url like http://webser/dev60cgi/rwcgi60.exe?server=rep_ss&report=det.rdf......
    it works.
    Any suggestions !
    Thanks,
    Shailesh
    null

    Hi,
    I got this resolved by using javascript and doing explicit form submit. As our information is highly secured we don't want the users to see any of the URL links from href, browser or from view source.
    I got the first two resolved but when i do a view source i could se in header sections of html view souce the follwing code
    <head>
    < base href="http://webser.../522222.htm>
    </head>
    is there any way using reports i can hide this.
    Any help, suggestions or reference will be highly apprecaited.
    Thanks,
    Shailesh
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by the oracle reports team:
    hello,
    did you specify the token %* in the CGICMD.DAT file so additional parameters are picked up from the URL ?
    regards,
    the oracle reports team<HR></BLOCKQUOTE>
    null

  • How to get the back button if we to go the 2nd drill down report??

    Hi,
    I have a drill down report for the main report. And have detailed drill down as in 1st report>2nd report>3rd report.
    But once i goto drill down, the return button is there which directs to main report i.e. 2>1,
    But once i goto 3rd, i do not get the back button so that i can access reports in 3>2>1, instead its going directly to 1st from 3rd.
    hope i have made the point clear.
    Someone suggest me how do i get the back button??
    Thanks!!

    use the below code in Narrative view
    <script&gt;
    function goBack()
    window.history.back()
    </script&gt;
    <input type="button" value="Back" onclick="goBack()"&gt;
    If helps mark
    Edited by: Srini VEERAVALLI on Feb 13, 2013 12:08 AM

  • Drill Down Report using Crystal reports in eclipse and jspviewer

    Hi
    I want to understand how to write a drill down report since I have a requirement for my project, so I tried to run the sample drill down.rpt that is available with Crystal Reports 2008 Complete Reference book by George Peck.
    I can see the results correctly( i.e. can drill down) in the preview tab . Since I am working inside the eclipse, the way I run the reports is first  "Create report viewer JSP" by right clicking the report and have a url mapping to this jsp. I am running the reports from a hyperlink that maps to the url which will launch the jsp.
    the jsp is:-
    <%@ page contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1" %><%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %><crviewer:viewer reportSourceType="reportingComponent" viewerName="Drill Down-viewer" reportSourceVar="Drill Down" isOwnPage="true" allowDrillDown="true">
         <crviewer:report reportName="reports/Drill Down.rpt" />
    </crviewer:viewer>
    The one that was created by  "Create report viewer JSP" did not had "allowDrillDown" attribute at all .But I added it since it isnt working.
    So when I launch my web app and click on the link to run the report, I get the report results but only to the summary level. When I double click the summary level I get a 404 error page.
    Can please anyone suggest what is going on.
    Thanks
    poonam

    Ok. So, you added the report to the project. Now we have to add the CR assemblies to the project, add the viewer (if need be) and fire it off. Simplest code would be:
    Public Sub New()
            ' This call is required by the designer.
            InitializeComponent()
            ' Add any initialization after the InitializeComponent() call.
            CrystalReportViewer1.ReportSource = ("path to report")
        End Sub
    In this case you are using the viewer SDK to runt he report. The report will prompt for any logon parameters - but you can code these also. You can load the report via the engine as bellow. Again, the report will prompt. I prefer to use the engine as it is way more "extensible"...
    Public Sub New()
            ' This call is required by the designer.
            InitializeComponent()
            ' Add any initialization after the InitializeComponent() call.
            Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
            crReportDocument.Load("path to report")
            'Bind the report to the viewer
            CrystalReportViewer1.ReportSource = crReportDocument
        End Sub
    If you have a report added to the project (strongly typed) the code would be:
    CrystalReportViewer1.ReportSource = New myReport()
    For more details, I'd recommend looking at the sample app vbnet_win_simplepreviewreport.zip available from the following location:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    The developer help files are here:
    [SAP Crystal Reports .NET SDK Developer Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip]
    [SAP Crystal Reports .NET API Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip]
    - Ludek

  • Image map & Drill Down Reports in Apex

    Hi,
    I am looking to create a Image map with drill down reports. I don't know Java but know PL/SQL functions/procedures very well. I would appreciate if someone help me with this.
    I am looking following functionality:
    1. Upload an image in Apex
    2. Create click-able areas in it.
    3. User click on these hyperlinks and move to next page with drill down report as per the vaiable in hyperlinks
    Wajid

    Try viewing this blog entry to see how to do image maps in APEX..
    http://www.danielmcghan.us/2009/05/html-image-maps-old-trick-with-new.html
    Thank you,
    Tony Miller
    Webster, TX

  • NEED DRILL DOWN REPORTS IN APPS

    Hi
    I need to generate drill down reports in oracle apps.
    Is drill down reports work in Apps?
    If it is possible please reply me, please send any document reference on drill down reports
    Thanks & Regards
    Adina

    Hi,
    What do you mean by drill down reports in Oracle Apps. Do you mean using Reports Developer. It cant be done, that is why the need of Discoverer reports. Discoverer reports can be run ( viewer ) from applications but generally associated with a separate responsibility. You can drill down from there..

  • Drill Down Reports and Drag & Drop capability Tool for Developer2000

    I am currently doing my development in Developer2000 rel. 2.0.
    I have seen many tools for VB which provide the facility for Drill Down reporting and drag & drop option in reporting, but unable to find any tool for developer2000. I wonder if anyone can guide me about any tool for developer2000 which can provide these facilities in reporting and forms.......
    Qamar Bilal

    you can use the mouse triggers to do drag and drop.
    you have mouse-move and mouse-enter etc...
    what do you mean by drill down?
    you can do drill down reporting in reports by using srw.run_report built in and you can also use oracle discoverer.

  • Drill-down reports Discoverer-style

    Hi,
    I'm looking for a way to implement drill-down reports in HTMLDB. All the references I found are showing details in a 2nd page for a certain row in the 1st page (e.g. ordered items for an order ID).
    I'm not looking for this, but for drill-down "a la Discoverer", such as this example
    http://www.oracle.com/technology/obe/obe_bi/discoverer/discoverer_1012/viewer/lesson1.htm#t7
    One can select there multiple criterias for drill down.
    Perhaps the solution would be a combination of tree reports with standard reports
    http://www.oracle.com/technology/products/database/htmldb/howtos/howto_tree.html
    but I don't see clearly how to do it, especially with a lot of drill-down options.
    Do you have any suggestions?
    Many thanks,
    Marius

    I think there are two differen approaches:
    - using the HTML report and doing some "dynamic" SQL at the block level
    (That means you have to write the drill down - this is the logic that
    is done by the tree - by yourself)
    If you ever have done the work to do this in combination with a HTML DB report,
    please post it here.
    - using the a Tree Page with a special layout and view
    Which one to use depends on how often you have to use this.
    You can see an example under:
    http://htmldb.oracle.com/pls/otn/f?p=41053:30
    Here is a quick hack for the Tree Page variant, that may help you.
    Using a Tree page uning a view and changing the tree template gives you some of
    this functionality. If you have to do more of this kind use a stylesheet (.css) to
    controll the layout.
    1. Create a View that represents your Hierarchy (Structure)
    For every level create a UNION secion.
    Using UNION you can get the records from different sources also.
    2. Create a Page with a Tree, SQL Query Based.
    Use the View that you created before.
    NAME .. are the levels of your dimensions
    A1, A2 .. are your measures of your fact
    ID, PID .. the hierarchy (structure) information
    * Step 1 - creating a view:
    create or replace view tree as
    select id, pid, name, link, a1, a2
    from (
    -- Level 1 (Root Level)
    select
    to_char(ORDER_TIMESTAMP,'YYYY') id, null pid,
    to_char(ORDER_TIMESTAMP,'YYYY') name, null link,
    to_char(sum(ORDER_TOTAL),'999G9990D99') a1, to_char(count(*),'999G9990D99') a2
    from DEMO_ORDERS
    group by
    to_char(ORDER_TIMESTAMP,'YYYY'),
    to_char(ORDER_TIMESTAMP,'YYYY')
    UNION
    -- Level 2
    select
    to_char(ORDER_TIMESTAMP,'YYYYMM'), to_char(ORDER_TIMESTAMP,'YYYY'),
    to_char(ORDER_TIMESTAMP,'Month'), null,
    to_char(sum(ORDER_TOTAL),'999G9990D99'), to_char(count(*),'999G9990D99')
    from DEMO_ORDERS
    group by
    to_char(ORDER_TIMESTAMP,'YYYYMM'), to_char(ORDER_TIMESTAMP,'YYYY'),
    to_char(ORDER_TIMESTAMP,'Month')
    UNION
    -- Level 3 (Leaf Level)
    select
    to_char(ORDER_TIMESTAMP,'YYYYMMDD'), to_char(ORDER_TIMESTAMP,'YYYYMM'),
    to_char(ORDER_TIMESTAMP,'DD. Day'), null,
    to_char(sum(ORDER_TOTAL),'999G9990D99'), to_char(count(*),'999G9990D99')
    from DEMO_ORDERS
    group by
    to_char(ORDER_TIMESTAMP,'YYYYMMDD'), to_char(ORDER_TIMESTAMP,'YYYYMM'),
    to_char(ORDER_TIMESTAMP,'DD. Day')
    )If you have a lot of this kind of reports you realy should think to
    use discoverer. It does a lot of sql behind the szenes and also in the
    presentation logic - this is what you have to do here by hand.
    If you have more than two measures (A1,A2) you can do the
    formatting in your view (realy ugly, but it is a workaround).
    * Step 2: Create the tree page
    Tree Query:
    select
    "ID" id, "PID" pid, "NAME" name,
    null link, a1 a1, a2 a2
    from TREEBefore Tree:
    <table border="0" cellspacing="0" cellpadding="0">After Tree:
    </table>Leaf Node:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" align="left">
    </td>Leaf Node Last:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" align="left">
    </td>Drill Up:
    (up)Indent Vertical Line:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" > </td>Indent Vertical Line Last:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" > </td>Unexpanded Parent:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" >
    < a href="#DRILL_DOWN#">
    < img src="#IMAGE_PREFIX#rollup_plus_dgray.gif" width="16" height="22" border="0">
    < /a>
    </td>Unexpanded Parent Last:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" >
    < a href="#DRILL_DOWN#">
    < img src="#IMAGE_PREFIX#rollup_plus_dgray.gif" width="16" height="22" border="0">
    < /a>
    </td>Expanded Parent:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" >
    < a href="#DRILL_DOWN#">
    < img src="#IMAGE_PREFIX#rollup_minus_dgray.gif" width="16" height="22" border="0">
    < /a>
    </td>Expanded Parent Last:
    <td style="background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #cece9c #9c9b64 #cece9c;
    border-width:1px 0px 1px 0px;" >
    < a href="#DRILL_DOWN#">
    < img src="#IMAGE_PREFIX#rollup_minus_dgray.gif" width="16" height="22" border="0">
    < /a>
    </td>Parent Node Template:
    <tr>#INDENT#
    <td style="color:#00319c; background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #9c9b64 #9c9b64 #cece9c;
    border-width:1px 1px 1px 0px;" colspan="#COLSPAN#"
      valign="CENTER" class="tiny">#NAME#</td>
    <td align="right" style="background:#f7f7e7;">#A1#</td>
    <td align="right" style="background:#f7f7e7;">#A2#</td>
    #DRILL_UP#
    </tr>Node Text Template:
    <tr>#INDENT#
    <td style="color:#00319c; background:#cece9c;
    border-style:solid;
    border-color:#f7f7e7 #9c9b64 #9c9b64 #cece9c;
    border-width:1px 1px 1px 0px;" colspan="#COLSPAN#"
      valign="CENTER" class="tiny">#NAME#</td>
    <td align="right" style="background:#f7f7e7;">#A1#</td>
    <td align="right" style="background:#f7f7e7;">#A2#</td>
    </tr>Name Link Anchor Tag:
    < a href="#LINK#">#NAME#</a>Name Link Not Anchor Tag:
    #NAME#* Extended Version of the View. Use this style of query if you have more than two measures:
    create or replace view tree as
    select id, pid, name, link,
    '<table border="0" cellspacing="0" cellpadding="0" style="background:#f7f7e7;">'||
    case when rownum = 1
    then '<tr style="background:#cece9c;">'||
    '<th style="border-style:solid; border-color:#cece9c #9c9b64 #9c9b64 #f7f7e7; border-width:0px 1px 1px 1px;">Amount</th>'||
      '<th style="border-style:solid; border-color:#cece9c #9c9b64 #9c9b64 #f7f7e7; border-width:0px 1px 1px 1px;">Orders</th>'||
      '<th style="border-style:solid; border-color:#cece9c #9c9b64 #9c9b64 #f7f7e7; border-width:0px 1px 1px 1px;">Measure</th>'||
      '<th style="border-style:solid; border-color:#cece9c #9c9b64 #9c9b64 #f7f7e7; border-width:0px 1px 1px 1px;">Measure</th>'||
    '</tr>'
    end||
    case
    when lvl = 2 then '<tr style="color:#000088;">'
    when lvl = 3 then '<tr style="color:#888888;">'
    else '<tr>'
    end ||
    '<td align="right" width="80px" height="24px" style="background:#f7f7e7; border-style:solid; border-color:#9c9b64 #9c9b64 #f7f7e7 #f7f7e7; border-width:1px 1px 0px 0px;">'||
    to_char(a1,'999G9990D99')||'</td>'||
    '<td align="right" width="80px" height="24px" style="background:#f7f7e7; border-style:solid; border-color:#9c9b64 #9c9b64 #f7f7e7 #f7f7e7; border-width:1px 1px 0px 0px;">'||
    to_char(a2,'999G9990D99')||'</td>'||
    '<td align="right" width="80px" height="24px" style="background:#f7f7e7; border-style:solid; border-color:#9c9b64 #9c9b64 #f7f7e7 #f7f7e7; border-width:1px 1px 0px 0px;">'||
    to_char(a3,'999G9990D99')||'</td>'||
    '<td align="right" width="80px" height="24px" style="background:#f7f7e7; border-style:solid; border-color:#9c9b64 #9c9b64 #f7f7e7 #f7f7e7; border-width:1px 1px 0px 0px;">'||
    to_char(a4,'999G9990D99')||'</td>'||
    '</tr>'||
    '</table>' a1, null a2
    from (
    -- Level 1 (Root Level)
    select
    1 lvl, to_char(ORDER_TIMESTAMP,'YYYY') id, null pid,
    to_char(ORDER_TIMESTAMP,'YYYY') name, null link,
    sum(ORDER_TOTAL) a1, count(*) a2,
    count(*)*10 a3, count(*)*100 a4
    from DEMO_ORDERS
    group by
    to_char(ORDER_TIMESTAMP,'YYYY'),
    to_char(ORDER_TIMESTAMP,'YYYY')
    UNION
    -- Level 2
    select
    2, to_char(ORDER_TIMESTAMP,'YYYYMM'), to_char(ORDER_TIMESTAMP,'YYYY'),
    to_char(ORDER_TIMESTAMP,'Month'), null,
    sum(ORDER_TOTAL), count(*),
    count(*)*10, count(*)*100
    from DEMO_ORDERS
    group by
    to_char(ORDER_TIMESTAMP,'YYYYMM'), to_char(ORDER_TIMESTAMP,'YYYY'),
    to_char(ORDER_TIMESTAMP,'Month')
    UNION
    -- Level 3 (Leaf Level)
    select
    3, to_char(ORDER_TIMESTAMP,'YYYYMMDD'), to_char(ORDER_TIMESTAMP,'YYYYMM'),
    to_char(ORDER_TIMESTAMP,'DD. Day'), null,
    sum(ORDER_TOTAL), count(*),
    count(*)*10, count(*)*100
    from DEMO_ORDERS
    group by
    to_char(ORDER_TIMESTAMP,'YYYYMMDD'), to_char(ORDER_TIMESTAMP,'YYYYMM'),
    to_char(ORDER_TIMESTAMP,'DD. Day')
    )If you use stylesheets the above query will be more suitable.
    See also:
    Expand/Collpase Lists
    Hope that helps, Willi

Maybe you are looking for

  • Error in saving Web Templates

    I am currently seeing a problem in creating new Web Templates in Web Application Designer in SMD. The error occurs when a Web Template is newly created or when an existing Template is modified but clicking the OK button in the error dialog screen all

  • XSLTC not working in -server mode of JVM

    I am translating one of my request xml to response xml using SinglePropertyAvailabilityRQ.xsl. I am using XSLTC technique of transformation. This works perfectly when I am running it normal JVM mode. But when I run this in �-server� mode of JVM it gi

  • Photoshop CS6 No lens profiles (lens correction filter) for Canon 6D raw files

    LightRoom and Camera Raw have profiles for Lens Correction and all the current available lens are  in the list for the Canon 6D raw files. BUT the Filter/Lens Correction when in Photoshop CS6 only have 2 Tamron lens listed. Odd that there are lens pr

  • Infopackage Language Selection

    Hello We have a number of infoobjects that have the langauge field in the datasource with selection ticked on. Example: 0PROFIT_CTR_TEXT However in our infopackage the language characteristic is not available as a selection. Regards M Could someone p

  • CCM /MDM

    Associates , Can some one send me CCM and MDM catelog management cookbook/material ? Also please do send me some work flow scenarios material if some one has any.. Thanks in advance kunal