Output of PDF report based on (custom, hand-coded) XSL-FO

I am attempting to reproduce a fairly particular report format using the XSL-FO "option" in ORACLE APEX. I am operating on our client's machine (which is APEX 3.1 and Oracle 10 something), but receive similar results under the hosted apex.oracle.com environment (APEX 4, BI, etc.). I presume (but currently can't verify) they have the Oracle BI set up as their print server (simple XSL-FO, RTF all seem to work).
I have been using the Oracle BI Publisher Desktop template viewer tool to process my XML/XSL-FO into PDF, and it looks and works great!; I see an almost exact reproduction of their "old" report.
However, when I upload the XSL to APEX, I get a PDF with 0 bytes (error somewhere). I have tried to reduce the XSL to the point where I get an error and I will try to explain what works and what doesn't:
1. Goto APEX -> Application -> Shared Components -> Report Layouts -> Create and Create new Generic XSL-FO report.
2. Copy the text in "Page Template" to new (empty) text document [in Notepad++].
3. Upload to APEX as new Name Columns (XSL-FO) layout.
-- Still Works --
4. Changed page size to letter format (612pt x 792pt) and modified margins to 10pt all-around.
-- Still Works --
5. Insert text (within <fo:block> and <fo:inline> elements) into header.
6. Add a table:
                         <fo:table xsl:use-attribute-sets="border" margin-top='10pt' width='100%'>
                              <xsl:variable name="_XDOFOPOS2" select="number(1)"/>
                              <xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
                              <fo:table-column column-width="40%"/>
                              <fo:table-column column-width="60%"/>
                              <fo:table-body>
                                   <fo:table-row >
                                        <fo:table-cell padding-top='20pt'> <fo:block text-align='right' > <fo:inline> Inspected By: </fo:inline> </fo:block> </fo:table-cell>
                                        <fo:table-cell> <fo:block text-align='left' > <fo:inline> <xsl:value-of select='.//INSPECTOR' /> </fo:inline> </fo:block> </fo:table-cell>
                                   </fo:table-row>
                                   <fo:table-row >
                                        <fo:table-cell> <fo:block text-align='right' > <fo:inline> Approved By: </fo:inline> </fo:block> </fo:table-cell>
                                        <fo:table-cell> <fo:block text-align='left' > <fo:inline> <xsl:value-of select='.//APPROVAL' /> </fo:inline> </fo:block> </fo:table-cell>
                                   </fo:table-row>
                                   <fo:table-row>
                                        <fo:table-cell> <fo:block text-align='right' > <fo:inline> Date Approved: </fo:inline> </fo:block> </fo:table-cell>
                                        <fo:table-cell padding-bottom='20pt'> <fo:block text-align='left' > <fo:inline> <xsl:value-of select='.//APPROVALDATE' /> </fo:inline> </fo:block> </fo:table-cell>
                                   </fo:table-row>
                              </fo:table-body>
                         </fo:table>
STOPS WORKING
My query is: SELECT * FROM Inspections
and all of the fields referred to above exist.
Does anyone know how to find out what the internal server is choking on, or is there some problem with my process, or?
Thanks kindly,
Daniel

I would like to post what I did in fact get to work.
I took the suggestion to replace single-quotes with double-quotes. What also DID seem to help things was:
1. removing all XML entities from my markup, even properly escaped ones (like &amp; or &#160;)
2. ensuring that:
<xsl:variable name="_XDOFOPOS2" select="number(1)"/>
<xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
appeared in the table (before anything else, still not sure what these are controlling or internal Oracle logic is happening).
I am still not 100% (or even 60%) sure this problem won't crop up if we have to modify our template, but through going through our original markup and adding it to a file that "works", table by table, and
assessing any errors, our reporting now works.
However, having entities (especially ampersand, or the non-breaking space [used as a placeholder for NULL database values to ensure the table-cell gets created]) would be useful.
Thanks for your comments.
Daniel

Similar Messages

  • Need Report based on "CUSTOM DATA field @ Shop Order Maintenance"

    Need the REPORT based on CUSTOM DATA field.
    Requirement - I am having the CUSTOM data at Shop Order Maintenance that is called as XXX, I need some report in SAP ME which can display the SFC related to particular Shop order based on XXX Number.

    Hi!
    As far as I remember there is no such base report. So, you may try to create it using SDK or request it as custom enhancement from SAP.
    If you want to create it using SDK, you can find the required data for report in CUSTOM_FIELDS table.
    Regards,
    Alex.

  • Can We generate Check report based on Custom Dimension in FDM

    Hi All,
    We got a requirement in our project to generate the check report based on custom dimension. As far as i know the check reports that got generated in FDM are based on Entity Dimension.
    So, will you please let me know whether it is possible to generate report based on any one of the custom dimension.
    Thanks.

    I guess I am not understanding the question here?
    The check report is based on the location/entity that you are running the report for.  You can pull values for a specific intersection in the target application with the check report, so you could specify the custom dim in the intersection.

  • Report based on custom Query - Question about Data Source

    Hello,
    I am trying to create Crystal reports (EBO R3.1, Oracle 11g Database, CR2008) based on custom queries. Tried using different kinds of Data Sources but getting stuck once I export them to Infoview.
    1. Using Oracle Server: This method works fine on my local & Infoview. But since I have lot of reports, I do not want the DB username/password associated to the report. I neither want BO to prompt username/pwd to my user.
    2. Using ODBC(RDO):
    Again, works fine on my local. Once I export to Infoview, it fails with this error: "Failed to open the connection"
    Which makes sense, because the DSN is created on my local machine and not on the server.
    How and what do I create on the server, so that the reports run?
    I do not know if using ODBC(RDO) is even the right way for creating custom SQL reports.
    I have been reading about Business Views, but not clear on how good they work.
    My goal is to create multiple reports, using custom SQL queries which use some kind of connection to the database that can be managed on the
    server in one place, and used by multiple reports.
    Can any of you please help me here
    Thanks,
    Sowmya.
    Edited by: SBat22 on Apr 13, 2011 5:58 PM

    Thanks for moving it to the right forum!!
    But, if I setup in CMC, a default username/password that the report needs....what would happen if my password changes?
    I would need to go to each and every report and update the password.
    I am looking for using one common "connection" for multiple reports. So that, when passwords change, all I update is in one central location.
    Can anyone please help!
    Thanks,
    Sowmya.

  • Display Error Message in BW Report based on Customer Exit Variable

    Hi
    I need to display an error message in the BW report based on the value of a customer exit variable - i was able to do this successfully in BW3.5 using the below code.
      WHEN 'ZUPN'. "Here ZUPN is the customer exit variable
        IF i_step = 1.
          <check for condition -- if successful, variable flag = 1, else variable flag = 0>
          IF flag = 0.
            MESSAGE e157(00). "Error Message
          ENDIF.
        ENDIF.
    I have upgraded my system to BI 7.0 now. Whenever the variable check is not successful, it displays a blank screen instead of the error message in the report. Please advice if we need to change the code and how ??

    Bhanu,
      Thanks for u r reply.This warning message appears every time i execute the report through portal.
    Any idea ?
    Regards
    Mano

  • Order Management seeded reports based on customer party relationships??

    Hi All:
    We have a requirement where our customers are associated to the buying groups/management companies. We are creating a party of type "Organization" for the buying groups and management companies and associating all the customers to these buying groups as party relationships. Ideally this client looks for all the sales reporting for the customers associated to these buying groups/management companies at the end of the month to pay them the royalities/commissions.
    So are there any oracle seeded reports(order details) which we can run based on the buying group/management company party and their party relationships with the customers or do we need to write the custom reports??
    Please let me know.
    Best Regards,
    Prashanthi Chennupati.

    Dear Venkata Chalapathi,
    Following is the logic for your requirement.
    If the check is on the basis of payment terms of pending billing documents alone, then
    check DYNAMIC with Reaction C/D and Status 'checked'
    Then maintain the same settings against OLDEST OPEN ITEM with Days oldestItem = 0
    Now, make a sales order and system will trigger the credit check message (assuming there are uncleared documents )
    Ask your abaper to find an Exit/Enhancement in this message spot and you can write a logic to check the
    billing documents in BSEG by fetching the document types with 'RV' (assuming we are considering only the billing documents)
    and in the VBRK get the billing date and we can get the payment term in vbrk-zterm and its corresponding date in T052-ZTAG1
    If the billing date + T052-ZTAG1 value is greater than SYSTEM date , then you have to trigger the credit check message in the sales order. Else allow the sales order.
    Check and revert back if there is any doubt/additional requirements.
    Thanks  & Regards,
    Hegal K Charles

  • Difference in output for asset report based on report date

    Dear all,
    Our fiscal year is Jan- Dec.
    In Asset balance report S_ALR_87011963,when I give report date as 31.07.2011, in output it is showing the value in every field as zero.
    But if give 30.06.2011 or 31.08.2011 or any other period end it is showing correctly values like acquisition,accumulated depreciation and net book value.
    Any of have any idea on this?
    Your help is much appreciated.
    Thanks in advance.
    Kumar

    Hi Bernhard,
    Thanks for your reply.
    It is happening only for some assets.
    Could you please elaborate your explanation on this.
    Only for July ending (31.07.2011) values are coming as zero.
    Thanks,
    Kumar

  • Publishing Output of FSG Reports into Custom Directory instead of defaults

    Hello,
    We have a requirement of publishing the output of FSG Reports into a custom directory/network directory instead of default database directory. We are using report manager.
    Please help !
    Thx/Faisal Ahmad
    Edited by: Faisal Ahmad on Apr 18, 2013 10:49 PM

    Oh.. i thought you will hit here at last. But finding the path of the EXE every time in the client PC is not a suitable solution. So we cant hardcode the EXE path also.
    But even here, we can handle in 2 ways.
    1) Putting the EXE in the PATH variable of the SYSTEM
    2) Finding the EXE path by reading the REGSITRY of the client PC.
    But our current standards doesnt allows us to take either of this. Because we arent allowed to use HOST commands from the front end.
    Anything else we can do to achieve apart from what i have said before
    Many thanks for your participation and prompt replies.
    Guru

  • Custom Filename for PDF Report

    Hi,
    I have a requirement to download pdf for a report. I provided the download action as a column link on the report. Clicking the link I direct to the URL for the custom report I created (f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT= MyReport). Pdf gets downloaded with the name MyReport.pdf. But I need to provide a custom name for the downloaded pdf, it should be based on the Id value of the report column something like this Emp123.pdf where 123 is the employee Id (selected row's employee id value in my report).
    I searched in the forums and came across this thread APEX 3 PDF Report Export Custom Filename? but here its mentioned that
    " In this case there's no separate attribute for the file name. And we don't do substitutions on the report query name, so setting the name dynamically as you described in your sample, won't be possible. "
    Since the thread is a old one so posting a new one. Any pointers is highly appreciated.
    Thanks,
    Rakesh

    1. Call the report with utl_http.
    2. Store the output as a BLOB. Either local variable or store it in a table.
    3. Print the blob.
    Here is how you can print the blob and read the package spec for utl_http.
    Re: display a blob on webpage using mod-plsql

  • XML Publisher output to be emailed based on a customer

    Hello,
    I have to email the Oracle standard report - Print Selected Invoices, the requirement is, based on a particular cutomer, send an email to the corresponding email address. 1 PDF report output will have multiple invoices for multiple customers. For every customer the email add is different so an email has to be sent with the part of the output for the corresponding customer. How can this be achieved?
    I saw the control file, but not sure if the control file can handle multiple email addresses and if we can put the restriction there. Please advise!!!
    Thanks
    Vidhya

    Check thread
    How Bursting works BI Publisher Enterprise Edition
    This is possible by bursting the report.

  • On PDF report I need Photo copy box on the right hand side

    When I generate Pdf report then on the right hand side I need the Photo copy box for attaching the photo.
    This is the my xsl file.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration = "yes" />
    <xsl:template match="/">
    <fo:root>
    <fo:layout-master-set>
         <fo:simple-page-master master-name="my-page">
              <fo:region-body margin="1in"/>
              <fo:region-before extent="1in" background-color="silver" />
         </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="my-page">
         <fo:static-content flow-name="xsl-region-before">
              <fo:block height="150px" width="1024px" background-color="#003366" >
              <fo:external-graphic width="340px" src="http://localhost:9000/web-determinations9000/images/logo.png"/>
              </fo:block>
         </fo:static-content>
         <fo:flow flow-name="xsl-region-body">
              <fo:block>
              <xsl:apply-templates mode="dump" select="/session/entity[@name='global']/instance[@label='global']"/>
              </fo:block>
         </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    <xsl:template match="/session/entity[@name='global']/instance[@label='global']" mode="dump" priority="100">
         <fo:block margin-top=".5cm" margin-left=".1cm" border-start-style="">
              Student ID : <xsl:value-of select="attribute[@id='StudentId']/number-val"/>
         </fo:block>
         <fo:block margin-top=".5cm" margin-left=".1cm" border-start-style="">
              First Name : <xsl:value-of select="attribute[@id='StudentName']/text-val"/>
         </fo:block>
         <fo:block margin-top=".5cm" margin-left=".1cm" border-start-style="">
              Last Name : <xsl:value-of select="attribute[@id='p3@Properties_studentProps_xsrc']/text-val"/>
         </fo:block>
    </xsl:template>
    </xsl:stylesheet>
    Thanks.
    Edited by: 848231 on Apr 13, 2011 4:40 AM

    Unfortunately, there aren't any XSL-FO gurus tracking this forum. You might have better luck posting to a forum dedicated to that type of discussion.
    Kind regards,
    Davin.

  • Report output as pdf

    I followed the instructions from OTN "Rendering Oracle HTML DB Reports as PDFs Using Formatting Objects Processor". All installation steps have been performed.
    After clicking on the "Output to PDF Document" link I get the following errormessage in a new browser window:
    "The requested URL /htmldb_fop_render.jsp was not found on
    this server."
    I've changed the path in the htmldb_pdf.js file to:
    var g_Render_URL = 'http://131.141.11.163:7777/htmldb_fop_render.jsp';
    Any ideas?
    Thanks for your help

    Depending on your environment (I tried the following with AS 10g / J2EE); you should use http://131.141.11.163:7777/j2ee/htmldb_fop_render.jsp - note the additional j2ee.

  • Print Report Output in PDF Format

    :-) Hiee E'body
    I generated the output of a Report(developed in Report Builder 6i) in PDF format.
    The output file is created properly and the PDF file gets displayed on the screen in proper format but when i try to print the PDF file it gets printed across the page instead of printing
    it straight.
    I have checked all page and printer settings but cannot find the reason for this.
    If anybody is aware of the solution to this problem please guide me for the same.
    Have a nice day !!
    Thanking You ..
    Vivek Kapoor

    hello,
    sounds like you have a problem with portrait/landscape orientation of your document.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                   

  • PAYABLES NOT GETTING THE REPORT OUTPUT IN PDF AFTER APPLYING RUP5 R12

    Hi All,
    RDBMS:10.2.0.3.0
    Oracle Apps :12.0.4
    OS:AIX 5.3
    Problem Description:
    We are presently facing an issue in Payables not getting the report output in PDF esp for the reports "Invoice Register", Invoice Hold Report and also other reports. We were able to generate the reports till our last test performed on last Thursday. This instance was cloned over the last weekend and probably the new upgrade to RUP5 R12,would have impacted it.
    Concurrent Programs submitted are completed normal but on clicking "view output" results in Blank PDF output.
    The error message what was shown is as below:
    "Adobe Reader could not open 'AcrC.tmp' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)".
    Where could we locate ther above 'AcrC.tmp' of Adobe Reader..
    could anyone please share such an experience encountered for resolution..
    Would appreciate an early response..
    Thanks for your time!
    Regards,

    I suggest you speak to your DBA/sysadmin. This is not likely to be a reports problem.
    Check that you can see the output from apps through the viewer (the report may not hav output anything)
    Check whether you can print anything on that printer from apps.
    May also be worth checking to see if you can print to another printer from this report.

  • Report Output to PDF

    Hi all,
    I am facing the following and I am wondering if any of you could help me.
    I have developed a number of bilingual reports (english and greek text) using Oracle reports 6i (batch 10) on Windows 2000. The reports are ok ... but when I try to export the output to pdf the greek text gets messed up. Actually, a lot of strange characters appear instead of the greek ones. Metalink states this as a bug, with 2 possible workarounds, either to use Acrobat Reader 3 (!!!!) or to use specific font styles (btw ... I haven't manage to find these fonts anywhere).
    I am wondering whethere any of you has faced a similar problem (with greek or any other non-latin language). Does any of you has any idea if the problem is solved with Reports 9i?
    Thanks in advance
    Kind regards
    Ioanna

    Hi,
    At Reports 6i, you can see greek data in .pdf files, if you use Acrobat3 and Batang(western) fonts.
    Maria Karakiza

Maybe you are looking for