Causing a Report page to be opened in Excel or MS Word

Hello Every body
I want to redirect an HTMLDB Report page to an excel spread sheet or MS Word
in read only mode and with an order to directly send content to printer.
Can any body tell me how to procede ?
thanks in advance
sidaty

I'm not sure if something like this might help...
Using SQL/XML you can build a view that is compliant with the Excel 2K3 Spreadsheet ML XML Schema. You can then folder the rows in the view as documents in the XML DB repository. When you open one of these documents in Excel Excel will treat it as worksheet.
The missing piece here would be can you embed an macro in excel that will force the document to print when it's opened...
set define off
set echo on
create or replace view DEPARTMENT_WORKBOOK_XML of xmltype
with object id
   substr
     extractValue
       object_value,
       '/Workbook/Worksheet/Table/Row[@ss:Index="2"]/Cell[@ss:Index="8"]/Data/text()',
       'xmlns="urn:schemas-microsoft-com:office:spreadsheet"
        xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"'
     1,32
as
select xmlroot
         xmlconcat
           xmlPI(NAME "mso-application",'progid="Excel.Sheet"'),
           xmlElement
             "Workbook",
             xmlAttributes
                'urn:schemas-microsoft-com:office:spreadsheet' as "xmlns",
                'urn:schemas-microsoft-com:office:office' as "xmlns:o",
                'urn:schemas-microsoft-com:office:excel' as "xmlns:x",
                'urn:schemas-microsoft-com:office:spreadsheet' as "xmlns:ss",
                'http://www.w3.org/TR/REC-html40' as "xmlns:html"
             xmlElement
               "DocumentProperties",
               xmlAttributes('urn:schemas-microsoft-com:office:office' as "xmlns"),
               xmlForest
                 USER as "Author",
                 USER as "LastAuthor",
                 '2002-10-11T15:47:35Z' as "Created",
                 'Oracle Corporation' as "Company",
                 '11.5703' as "Version"
             xmlElement
               "OfficeDocumentSettings",
               xmlAttributes('urn:schemas-microsoft-com:office:office' as "xmlns"),
               xmlElement("DownloadComponents"),
               xmlElement
                 "LocationOfComponents",
                 xmlAttributes('file://' as "HRef")
             xmlElement
               "ExcelWorkbook",
               xmlAttributes('urn:schemas-microsoft-com:office:excel' as "xmlns"),
               xmlForest
                 '8835' as "WindowHeight",
                 '14220' as "WindowWidth",
                 '480' as "WindowTopX",
                 '60' as "WindowTopY",
                 'False' as "ProtectStructure",
                 'False' as "ProtectWindows"
               xmlElement("HideHorizontalScrollBar")
             xdburiType('/home/SCOTT/Workbooks/Styles.xml').getXML(),
             xmlElement
               "Worksheet",
               xmlAttributes(d.DEPARTMENT_NAME as "ss:Name"),
               xmlElement
                 "Table",
                 xmlAttributes
                   '11' as "ss:ExpandedColumnCount",
                   ( select '' || 14 + count(*) || '' from HR.EMPLOYEES e where e.DEPARTMENT_ID = d.DEPARTMENT_ID) as "ss:ExpandedRowCount",
                   '1' as "x:FullColumns",
                   '1' as "x:FullRows"
                 xmlElement("Column",xmlAttributes('25' as "ss:Width")),
                 xmlElement("Column",xmlAttributes('75' as "ss:Width")),
                 xmlElement("Column",xmlAttributes('60' as "ss:Width", '1' as "ss:Span")),
                 xmlElement("Column",xmlAttributes('5' as "ss:Index", '75' as "ss:Width")),
                 xmlElement("Column",xmlAttributes('100' as "ss:Width", '1' as "ss:Span")),
                 xmlElement("Column",xmlAttributes('8' as "ss:Index", '100' as "ss:Width")),
                 xmlElement("Column",xmlAttributes('60' as "ss:Width")),
                 xmlElement("Column",xmlAttributes('60' as "ss:Width")),
                 xmlElement("Column",xmlAttributes('75' as "ss:Width")),
                 xmlElement
                   "Row",
                   xmlAttributes('2' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('2' as "ss:Index", '3' as "ss:MergeAcross", '2' as "ss:MergeDown",'DepartmentName' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Department : ' || DEPARTMENT_NAME )
                   xmlElement
                     "Cell",
                     xmlAttributes('7' as "ss:Index", 'Caption' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'ID :' )
                   xmlElement
                     "Cell",
                     xmlAttributes('8' as "ss:Index", 'Bold' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), d.DEPARTMENT_ID )
                 xmlElement
                   "Row",
                   xmlAttributes('4' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('7' as "ss:Index", 'Caption' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Location :' )
                   xmlElement
                     "Cell",
                     xmlAttributes('8' as "ss:Index", 'Bold' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), STREET_ADDRESS )
                 xmlElement
                   "Row",
                   xmlAttributes('5' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('8' as "ss:Index", 'Bold' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), CITY )
                 xmlElement
                   "Row",
                   xmlAttributes('6' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('8' as "ss:Index", 'Bold' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), STATE_PROVINCE )
                 xmlElement
                   "Row",
                   xmlAttributes('7' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('8' as "ss:Index", 'Bold' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), POSTAL_CODE )
                 xmlElement
                   "Row",
                   xmlAttributes('8' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('8' as "ss:Index", 'Bold' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), COUNTRY_NAME )
                 xmlElement
                   "Row",
                   xmlAttributes('10' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('7' as "ss:Index", 'Caption' as "ss:StyleID"),
                  xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Manager :' )
                   xmlElement
                     "Cell",
                     xmlAttributes('8' as "ss:Index", 'Bold' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), m.FIRST_NAME || ' ' || m.LAST_NAME )
                 xmlElement
                   "Row",
                   xmlAttributes('12' as "ss:Index"),                
                   xmlElement
                     "Cell",
                     xmlAttributes('2' as "ss:Index", 'BoldRight' as "ss:StyleID"),
                     xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Employee ID')
                   xmlElement("Cell", xmlAttributes('BoldLeft' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'First Name')),
                   xmlElement("Cell", xmlAttributes('BoldLeft' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Last Name')),
                   xmlElement("Cell", xmlAttributes('BoldLeft' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Email Address' )),
                   xmlElement("Cell", xmlAttributes('BoldCentered' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Phone Number' )),
                   xmlElement("Cell", xmlAttributes('BoldRight' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Hire Date')),
                   xmlElement("Cell", xmlAttributes('BoldRight' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Job Title')),
                   xmlElement("Cell", xmlAttributes('BoldRight' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Salary')),
                   xmlElement("Cell", xmlAttributes('BoldRight' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Commission'))
                 xmlElement
                   "Row",
                   xmlElement("Cell",xmlAttributes('2' as "ss:Index", 'BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID"))
                 ( select xmlAgg
                            xmlElement
                              "Row",
                              xmlElement
                                "Cell",
                                xmlAttributes('2' as "ss:Index", 'BodyDefault' as "ss:StyleID"),
                                xmlElement("Data", xmlAttributes('Number' as "ss:Type"),  e.EMPLOYEE_ID)
                              xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"),  e.FIRST_NAME)),
                              xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"),  e.LAST_NAME)),
                              xmlElement("Cell", xmlAttributes('BodyDefault' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"),  e.EMAIL )),
                              xmlElement("Cell", xmlAttributes('BodyRight' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"),  e.PHONE_NUMBER )),
                              xmlElement("Cell", xmlAttributes('HireDate' as "ss:StyleID"), xmlElement("Data", xmlAttributes('DateTime' as "ss:Type"),  to_char(to_char(e.HIRE_DATE,'YYYY-MM-DD"T00:00:00.000"')))),
                              xmlElement("Cell", xmlAttributes('BodyRight' as "ss:StyleID"), xmlElement("Data", xmlAttributes('String' as "ss:Type"),  j.JOB_TITLE)),
                              xmlElement("Cell", xmlAttributes('Currency' as "ss:StyleID"), xmlElement("Data", xmlAttributes('Number' as "ss:Type"),  e.SALARY)),
                              xmlElement("Cell", xmlAttributes('Percent' as "ss:StyleID"), xmlElement("Data", xmlAttributes('Number' as "ss:Type"),  e.COMMISSION_PCT))
                     from HR.EMPLOYEES e, HR.JOBS j  
                    where e.DEPARTMENT_ID = d.DEPARTMENT_ID
                      and e.JOB_ID = j.JOB_ID
                 xmlElement
                   "Row",
                   xmlElement("Cell", xmlAttributes('2' as "ss:Index", 'TableBottom' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('TableBottom' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('TableBottom' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('TableBottom' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('TableBottom' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('TableBottom' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes('TableBottom' as "ss:StyleID")),
                   xmlElement("Cell", xmlAttributes
                                        'SalaryTotal' as "ss:StyleID",
                                        'SUM(R[-' || ( select '' || count(*) || '' from HR.EMPLOYEES e where e.DEPARTMENT_ID = d.DEPARTMENT_ID) || ']C:R[-1]C)' as "ss:Formula")
                   xmlElement("Cell", xmlAttributes('TableBottom' as "ss:StyleID"))
               xmlElement
                 "WorksheetOptions",
                 xmlAttributes('urn:schemas-microsoft-com:office:excel' as "xmlns"),
                 xmlElement
                   "Print",
                   xmlElement("ValidPrintInfo"),
                   xmlElement("HorizontalResolution",96),
                   xmlElement("VerticalResolution",96),
                   xmlElement("NumberOfCopies",0)
              xmlElement("DoNotDisplayGridlines"),
                 xmlElement("Selected"),
                 xmlElement
                   "Panes",
                   xmlElement
                     "Pane",
                     xmlElement("Number",1),
                     xmlElement("ActiveRow",1),
                     xmlElement("ActiveCol",1)
                 xmlElement("ProectedObjects",'False'),
                 xmlElement("ProectedSecenarios",'False')
         ),VERSION '1.0'
  from HR.DEPARTMENTS d, HR.LOCATIONS l, HR.COUNTRIES c, HR.EMPLOYEES m
where d.LOCATION_ID = l.LOCATION_ID
   and l.COUNTRY_ID = c.COUNTRY_ID
   and d.MANAGER_ID = m.EMPLOYEE_ID
show errors
create or replace trigger DEPARTMENT_WORKBOOK_DML
instead of INSERT or UPDATE or DELETE on DEPARTMENT_WORKBOOK_XML
begin
null;
end;
show errors
pause
declare
  targetPath varchar2(1024) := '/home/SCOTT/Workbooks';
  xmlText CLOB :=
'<Styles xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel">
          <Style ss:ID="Default" ss:Name="Normal">
               <Alignment ss:Vertical="Bottom" ss:Horizantal="Left"/>
               <Borders/>
               <Font/>
               <Interior ss:Color="#FFFFFF" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="Caption">
               <Font x:Family="Swiss" ss:Bold="1" ss:Italic="1"/>
          </Style>
          <Style ss:ID="Bold">
               <Font x:Family="Swiss" ss:Bold="1"/>
          </Style>
          <Style ss:ID="BodyDefault">
               <Alignment ss:Vertical="Bottom" ss:Horizantal="Left"/>
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font/>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="TableBottom">
               <Alignment ss:Vertical="Bottom" ss:Horizantal="Left"/>
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Bottom" ss:LineStyle="Double" ss:Weight="3"/>
               </Borders>
               <Font/>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="SalaryTotal">
               <Alignment ss:Vertical="Bottom" ss:Horizantal="Left"/>
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Bottom" ss:LineStyle="Double" ss:Weight="3"/>
               </Borders>
               <Font/>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat ss:Format="_(&quot;$&quot;* #,##0.00_);_(&quot;$&quot;* \(#,##0.00\);_(&quot;$&quot;* &quot;-&quot;??_);_(@_)"/>
               <Protection/>
          </Style>
          <Style ss:ID="HeadDefault">
               <Alignment ss:Vertical="Bottom" ss:Horizantal="Left"/>
               <Borders/>
               <Font/>
               <Interior ss:Color="#00CCFF" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="HireDate">
               <Alignment ss:Vertical="Bottom" ss:Horizontal="Right"/>
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font/>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat ss:Format="[ENG][$-409]mmmm\ d\,\ yyyy;@"/>
               <Protection/>
          </Style>
          <Style ss:ID="DepartmentName">
               <Alignment ss:Vertical="Center" ss:Horizontal="Left"/>
               <Borders>
                    <Border ss:Position="Bottom" ss:LineStyle="Double" ss:Weight="3"/>
                    <Border ss:Position="Left" ss:LineStyle="Double" ss:Weight="3"/>
                    <Border ss:Position="Right" ss:LineStyle="Double" ss:Weight="3"/>
                    <Border ss:Position="Top" ss:LineStyle="Double" ss:Weight="3"/>
               </Borders>
               <Font x:Family="Swiss" ss:Bold="1" ss:Size="18"/>
               <Interior ss:Color="#FFCC00" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="BoldCentered">
               <Alignment ss:Vertical="Bottom" ss:Horizontal="Center"/>
               <Borders>
                    <Border ss:Position="Top" ss:LineStyle="Double" ss:Weight="3"/>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font ss:Color="#FFFFFF" x:Family="Swiss" ss:Bold="1"/>
               <Interior ss:Color="#0000FF" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="BoldLeft">
               <Alignment ss:Vertical="Bottom" ss:Horizontal="Left"/>
               <Borders>
                    <Border ss:Position="Top" ss:LineStyle="Double" ss:Weight="3"/>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font ss:Color="#FFFFFF" x:Family="Swiss" ss:Bold="1"/>
               <Interior ss:Color="#0000FF" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="BoldRight">
               <Alignment ss:Vertical="Bottom" ss:Horizontal="Right"/>
               <Borders>
                    <Border ss:Position="Top" ss:LineStyle="Double" ss:Weight="3"/>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font ss:Color="#FFFFFF" x:Family="Swiss" ss:Bold="1"/>
               <Interior ss:Color="#0000FF" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="BodyCentered">
               <Alignment ss:Vertical="Bottom" ss:Horizontal="Center"/>
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font x:Family="Swiss"/>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="BodyLeft">
               <Alignment ss:Vertical="Bottom" ss:Horizontal="Left"/>
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font x:Family="Swiss"/>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="BodyRight">
               <Alignment ss:Vertical="Bottom" ss:Horizontal="Right"/>
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Font x:Family="Swiss"/>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat/>
               <Protection/>
          </Style>
          <Style ss:ID="Currency" ss:Name="Currency">
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat ss:Format="_(&quot;$&quot;* #,##0.00_);_(&quot;$&quot;* \(#,##0.00\);_(&quot;$&quot;* &quot;-&quot;??_);_(@_)"/>
          </Style>
          <Style ss:ID="Percent" ss:Name="Percent">
               <Borders>
                    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
                    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
               </Borders>
               <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
               <NumberFormat ss:Format="0%"/>
          </Style>
     </Styles>';
  res boolean;
begin
  if (not dbms_xdb.existsResource(targetPath)) then
    res := dbms_xdb.createFolder(targetPath);
  end if;
  targetPath := targetPath || '/' || 'Styles.xml';
  if dbms_xdb.existsResource(targetPath) then
    dbms_xdb.deleteResource(targetPath);
  end if;
  res := dbms_xdb.createResource(targetPath,xmlText);
end;
commit
pause
declare
  cursor getDepartments is
    select ref(d) XMLREF,
           substr
             extractValue
               object_value,
               '/Workbook/Worksheet[1]/@ss:Name',
               'xmlns="urn:schemas-microsoft-com:office:spreadsheet"
               xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"'
             1,32
           ) NAME
      from DEPARTMENT_WORKBOOK_XML d;
  res boolean;
  targetFolder varchar2(1024) :=  '/home/SCOTT/Workbooks/Departments';
begin
  if dbms_xdb.existsResource(targetFolder) then
     dbms_xdb.deleteResource(targetFolder,dbms_xdb.DELETE_RECURSIVE);
  end if;
  res := dbms_xdb.createFolder(targetFolder);
  for dept in getDepartments loop
    res := DBMS_XDB.createResource(targetFolder || '/' || dept.NAME || '.xml', dept.XMLREF);
  end loop;
end;
commit
pause
quitThe above example assumes user SCOTT (yeah I know !), and that user SCOTT has access to the HR schema and write access to an xdb repository folder called /home/SCOTT. It will create a document for each DEPARTMENT containing the employees for that department.

Similar Messages

  • Crystal reports xi release 2 open file excel protect with password

    I am trying to open a file excel 2003 of which I know the password with crystal reports xi but when I select ACCESS / EXCEL DAO
    NAME DB PIPPO.XLS
    TYPE OF DATABASE EXCEL 8
    PROTECTED ACCESS
    PASSWORD DATABASE FOR EXAMPLE PIPPO
    AND THEN OK
    I RECEIVE AN ERROR MESSAGE
    DESPITE THE PASSWORD IS CORRECT
    THE MESSAGE IS THE FOLLOWING
    access not succeeded
    you detail dao error tails 0xc59
    source dao.workspace
    impossible description to decipher the file
    someone can help me
    this both with windows it approves business
    what with windows xp
    it programs office installed 2007 files excel saved in compatible formality 97/2003
    I thank in advance for the help

    Possibly Not supported in the version of CR you are using.

  • Opening EXCEL and MS WORD doc requires login to WAS

    Hi all, just have a question on when I open an EXCEL or MS Word document in a new window via below html statement, a logon on screen pops up and asking me to logon to the SAP Web Application Server, however, when I cancel, it will open the EXCEL/WORD, document, my question is, how can I remove/bypass the popup dialog screen asking me to logon to SAP WAS. Is this a network security issue?
    <td><a href="/docs/<%= file_name%>" target="_blank">
                           <%= att_name%></a></td>
    Note: "file_name" is the unix filename
          "att_name" is the description of the filename
    Thanks in advance for your help.

    Ok.
    Then the problem is with the relative path for your document. Your BSP application may be in a different node and your "docs" is in a different level in the sicf tree.
    you have to use something like ../docs .
    Regards
    raja

  • The Report Server page comes up on local server, but the page does not open from clients

    Hello,
    The Report Server Page opens up just fine on the local server, but page does not open up from desktops and client PCs.   SSRS is installed on a Windows Server 2008 R2 server and with SQL Server 2008 R2 SP2
    Clients are using IE 11 and they see:
    Oops! Internet Explorer could not connect to tumdv-fsql01
    How can make this site accessible from clients?
    Thanks
    Paul

    That did not work.
    What port numbers specifically does SSRS use?  I will check the firewall.
    http://100.100.100.100/CengeaReports/Pages/Folder.aspx
    When I add the IP Address and try the link again, IE says "This page can not be displayed".  When I try the Fix connection problems, IE says:
    "The website is online, but it is not responding to connection attempts."
    Paul

  • In a Google search, clicking on a search result causes the new page to open with the search terms highlighted in yellow -- how can I turn off th

    In a Google search within a Firefox session, clicking on a search result causes the new page to open with the search terms highlighted in yellow -- how can I turn off this highlighting?

    Try to clear the Google cookies and redo those Google options.
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"

  • What causes "report could not be opened for writing . . ." message

    "This report could not be opened for writing.  Any changes must be saved to a new file."  The version is CR 2013 SP1.  Win 7 Pro.  I'm new to CR and can't figure out why I get this error.  I've verified all Windows permissions.  It's an SAP error message - not a Windows message.  Thanks in advance.
    rd

    Hi Rd,
    Per SAP Note 1911880, this has been identified as a Bug in CR 2011. Since CR 2013 is just a rebranded version of the same tool, the SAP Note should apply to CR 2013 as well.
    For CR 2013, the issue has been resolved in FP3. I would suggest you to upgrade to the highest available version for CR 2013 and see if it works.
    Another workaround could be to right-click the CR Designer exe > Run as Administrator > Log-in with Admin credentials > try opening the report.
    -Abhilash

  • XL Reporter Reports Can't be Opened caused by security blockage from Excel

    Hi all,
    I have this problem of XL Reporter can't be opened because of security block from MS Excel. I have already set my Macro Security accordingly as low. Plus checked all there is in Trusted Publishers. Please let me know if there is ant other thing that I can do?
    Thanks.
    Bernard Wong
    SAP Business One - Malaysia

    Hi Frank,
    In XL reporter 6.80.01.05, I have tried to set it to low. I have experienced the same thing. What I did is after set the security, closing Excel, closing XL reporter and then reopening XL reporter. It has been success. So the steps are as follows:
    1. Start Microsoft Excel.
    2. In the Tools menu, choose Macro->Security...
    This opens the Security window.
    3. Choose the Trusted Sources tab and make sure the Trust all installed add-ins and templates and Trust access to Visual Basic Project checkboxes are selected.
    If you are running Microsoft Office 2000 on your computer, you can only select the checkbox; Trust all installed add-ins and templates.
    4. Choose OK.
    5. If problem still appears Install Visual Basic for Applications in Office.
    (This description is for Office 2003 and may vary depending on Office version)
    In Windows, go to Start -> Control Panel -> Add/Remove programs. Find Microsoft Office 2003, select it and choose Change.
    In the Office 2003 setup window, choose Add or Remove features and choose Next.
    Check the box "Choose advanced customization of applications" and choose Next.
    Expand the line "Office Shared Features", scroll down and choose the dropdownbox for Visual Basic for Applications and choose Run from My Computer.
    Choose Update and wait for the installation to finish. Choose OK when a message saying that Office 2003 has been updated successfully appears.
    Check that all settings are according to note 853821 and start XL Reporter. You should now be able to run or edit reports in Excel.
    Contact LPE (local product expert) or SAP support if nothing changes afterwards.
    Rgds,

  • Firefox start page no longer opens first: "iminent search the web" opens and I can't get rid of it.

    IMBooster, also known as Iminent, and "Iminent Search the Web", has taken over my start-up page. I have tried everything to delete and uninstall all aspects of this unwanted application. It no longer appears anywhere in my computer, but it still opens my Firefox page instead of Google.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Getting a smaller duplicate of my firefox page everytime I open a new window and I have to close it out, nothing is working and even ran a virus scan- getting f

    Geez, have to go to 10 different things to even get here!!!! I am having a problem with getting a smaller version of firefox every time I open a new window but it is blank, it looks like your web page, I have to close it out to view my page I was opening. I ran a virus scan and there is nothing. I have windows and firefox is my home page, btw when I go to IE I do not have this problem, Seems like when firefox installs a new version something happens,.

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • History report page prints before printing each new document?cc=us

    How do i stop my HP Officejet 6700  Premium from printing a history report page before printing each new document, using Windows 7 & Using Microsoft Word? When I open a document and print it, it prints a history including: File Name; Directory; Template; Title; Subject; Keywords; Comments; creation Date; Change Number; Last Saved On; Last Saved By; Total Editing; Last Printed On; As of Last Printing....
    Everything worked perfectly for a year, then I had to reinstall the printer because I deleted it by mistake. I cary it with me when I travel to meetings and didn't have my install disk, so I had to download the install software. I haven't changed any settings in Word, but it appears that the report is generated from Word.
    Help will be appreciated. I can't find any other topic like mine to see an already presented solution.
    This question was solved.
    View Solution.

    Hi,
    The report indeed being generated by Word and not by the pritner driver.
    As you did not clarify your MS Office version I included the steps for Word 2010, I believe the same should also apply for Word 2007:
    From Word click the File menu, then select Options.
    Select Display from the left pane.
    Under the Printing Options sections, uncheck the box next to Print document properties.
    Click OK and try printing again.
    If you cannot find the specific option, please clarify your exact Microsoft Wiord version.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • I updated to OS 10.8.2 and now Pages won't open

    I updated to OS 10.8.2 and now Pages won't open

    ted39 wrote:
    I updated to OS 10.8.2 and now Pages won't open
    Please elaborate on what exactly you mean by it "won't open".
    Do you try to launch it and get an error message from the Finder (for example, something like "This application is damaged and cannot be launched....")? Does an icon for the application ever appear in the Dock when you try to launch it? Does it start to launch and then immediately crashes (Finder will display an "unexpectedly quit" dialog)? Or does it start to launch and never seems to "finish" launching (in other words, it basically hangs and is unresponsive)?
    If the application crashes, please post the contents of the crash log here.
    Otherwise, if the application seems to be hanging, can you, before attempting to launch it, open the Console.app application (it's in the /Applications/Utilities/ folder), and see if anything is reported when you attempt to launch it? If so, please post it here.

  • I noticed when I restart Firefox 4, it opens my previous tabs even I set the option "Open a blank page" and it opens blank page when I have "Show my windows and tabs from last time". Please ignore my question if you're already aware of this issue. Thanks.

    I noticed when I restart Firefox 4, it opens my previous tabs even I set the option "Open a blank page" and it opens blank page when I have "Show my windows and tabs from last time". Please ignore my question if you're already aware of this issue. Thanks.

    Your previous tabs will not re-open or be available to re-open when starting Firefox if:
    *your previous session was in Private Browsing mode; see --> http://support.mozilla.org/en-US/kb/Private+Browsing
    *you use Clear Recent History (''Firefox button > History > Clear Recent History'' or ''Tools > Clear Recent History''); see --> https://support.mozilla.org/en-US/kb/Clear%20Recent%20History#w_how-do-i-clear-my-history
    *you clear History automatically when closing Firefox; see --> https://support.mozilla.org/en-US/kb/Clear%20Recent%20History#w_how-do-i-make-firefox-clear-my-history-automatically
    NOTE: Your third-party Plugins (Add-ons > Plugins) are not in the "Application Basics" (Troubleshooting Information) in the "More system details" of your original post. Third-party Plugins are categorized separately in "Installed Plugins" under "More system details". You should review but not change the Plugins as detected automatically by the software on this forum when posting a question.
    If you problem still exists after checking the above, the problem could be caused by one or more of your Extensions or Plugins:
    *See --> [http://support.mozilla.org/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    *See --> [http://support.mozilla.org/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    *See --> [http://support.mozilla.org/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • When restarting firefox after a crash, how do I stop it from re-opening all web pages that were open at the time of the crash?

    When firefox crashes, or if it hangs and I have to kill it, then when I go to restart it, it tries to re-open all pages that were open at the time it crashed or was killed. This is incredibly annoying, especially if one of the visited pages caused the crash or hang. It is also really annoying if some of the web pages happened to require passwords to log in, from multiple sites. In my case this occurs as I am frequently logged into multiple online educational web sites like ucsc-extension.edu and berkleemusic.com. In the login case you get multiple login prompt pop-ups with no way to correlate which pop-up goes with which web page. If there are a lot of them then it's a hopeless mess. This behavior is something that I never ever want and it infuriates me that not only is it the default behavior, it is something that there seems to be no way to turn off, at least via the configuration menus. Am I wrong? Is there a way to turn this off? If not can somebody either make it configurable or get rid if this fantastically idiotic behavior?
    I suspect there's a command line option for this but on my Mac (or most systems these days) it's sort of "unnatural" to be starting programs like browsers by means other than a provided program start-up icon, which gives you no choice about the command line options.
    Besides, as a default behavior the current behavior is something I cannot conceive of ever wanting. I would rather have a poke in the eye with a sharp stick.
    == This happened ==
    Every time Firefox opened
    == firefox crashed

    You can try this.
    In the address bar type about:config you will be warned that this is dangerous.
    Search for browser.sessionstore.resume_from_crash
    Double click on true to toggle it to false.
    Exit the page.
    Firefox will now NOT try to reload websites after a crash.

  • When i want to return to my home page I click on the home icon and it resets the page to my home page but also open a blak tab which i don't want how can I stop this as i have too many tabs open.

    When I want to return to my home page after looking at a website I click on the home icon and it resets the page to my home page but also open a blak tab which i don't want.How can I stop this as I have too many tabs open and have to close all of them.

    You may have an unwanted extension that is modifying sites (or the toolbar area). Try this:
    Disable ALL nonessential or unrecognized extensions on the Add-ons page. Either:
    * Ctrl+Shift+a
    * orange Firefox button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Usually a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Does that flush the tab?
    Please report back on anything suspicious you find so others can learn about its bad behavior.

  • DON;T WANT TO GO TO HOME PAGE WHEN I OPEN NEW TAB

    HOW DO I STOP GOING TO HOME PAGE WHEN I OPEN A NEW TAB? I DON'T WANT TO GO TO HOME PAGE WHEN I OPEN A NEW TAB, I WANT TO SEE A BLANK PAGE, THEN I CAN PUT IN THE URL OF MY CHOICE. I ONLY WANT TO SEE HOME PAGE WHEN I OPEN FIREFOX, OR WHEN I SELECT IT USING THE HOME PAGE BUTTON.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for