Report Query using a Named Column Report Layout fails to produce PDF
I am testing FOP and the Shared Component Report Queries query with a Named Column Report Layout. The xsl file was built using Stylus Studio and worked fine with the saved XML data file in Stylus Studio.
500 Internal Server Error
500 Internal Server Error
Servlet error: An exception occurred.
The current application deployment descriptors do not allow for including it in this response.
Please consult the application log for details.
I assume this is a message from FOP. What do I do now?
tia,
Sam
Sam,
I would suggest to take APEX out of the picture first and see if you can get this to work directly with your FOP solution, i.e. generate the XML data and take your XSL file and then post it directly to the FOP JSP (or whichever rendering engine you use). If this works, the problem might be somewhere in your APEX configuration. If it doesn't work, then the problem is likely in your XSL or XML structure. Here's how you can setup a static HTML page to post your XML and XSL to FOP:
http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
Regards,
Marc
Similar Messages
-
Example Named Column Report Layout?
Howdy,
Using APEX 3.1.2, I've successfully setup and tested Apache FOP for a print server. I'm hoping to create a multi-line report layout to emulate the MS Access (of Evil) one this app is replacing, but I'm having trouble getting started.
It seems that I need to create a Named Column report layout. I've been scouring this forum, the web, and even the new Pro APEX book to find an example of the contents of even the simplest of these XSL-FO files, but I can't find one anywhere. Granted, a little XSL-FO experience would help here, but I can't seem to glean enough from the web to put the pieces together, at least as it applies to APEX. It seems that the examples I do find contain static data, whereas it looks like I should be creating a template form for APEX to populate for passing onto the FOP engine.
Does anyone have a simple two-column layout they'd be willing to share? Or a good weblink?
TIA!
RichHi Rich,
This is an example we use in our training:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:fox="http://xml.apache.org/fop/extensions" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon" >
<xsl:template match="DOCUMENT">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="pagemaster1" page-height="845.0pt" page-width="598.0pt" margin-top="10.0pt" margin-left="10.0pt" margin-bottom="10.0pt" margin-right="10.0pt">
<fo:region-body margin-left="28.0pt" margin-top="28.0pt" margin-bottom="28.0pt" margin-right="28.0pt"/>
<fo:region-before extent="28.0pt" precedence="true"/>
<fo:region-after extent="28.0pt" precedence="true"/>
<fo:region-start extent="28.0pt" precedence="false"/>
<fo:region-end extent="28.0pt" precedence="false"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="pagemaster1" master-reference="pagemaster1">
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<fo:static-content flow-name="xsl-region-before">
<fo:block-container position="absolute" top="3.0pt" left="357.0pt" height="25.0pt" width="216.0pt">
<fo:block line-height="14.399999999999999pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" position="relative" top="3.0pt" left="357.0pt" height="25.0pt" width="216.0pt" color="#000000" font-family="Arial" font-size="12.0pt" font-style="italic">
<fo:block text-align="left" white-space-collapse="false" linefeed-treatment="preserve" >
<fo:inline>
<xsl:text>Report ran by: </xsl:text></fo:inline>
<fo:inline>
<xsl:value-of disable-output-escaping="no" select="USER_NAME"/>
</fo:inline>
</fo:block>
</fo:block>
</fo:block-container>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after"/>
<fo:static-content flow-name="xsl-region-start"/>
<fo:static-content flow-name="xsl-region-end"/>
<fo:flow flow-name="xsl-region-body">
<fo:block/>
<fo:block-container position="absolute" top="4pt" left="2pt" height="752.0pt" width="536.0pt" border-width="1.0pt"> <fo:block span="none" white-space-collapse="false" font-family="Helvetica" font-size="12pt" text-align="start" position="relative" top="44pt" left="27pt" height="752.0pt" width="536.0pt"><fo:instream-foreign-object xmlns:xlink="http://www.w3.org/1999/xlink"></fo:instream-foreign-object></fo:block></fo:block-container><fo:block span="none"><!-- GENERATE TABLE START-->
<fo:table table-layout="fixed">
<fo:table-column column-width="80.0pt"/>
<fo:table-column column-width="80.0pt"/>
<fo:table-column column-width="80.0pt"/>
<fo:table-column column-width="80.0pt"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell display-align="before" background-color="#cccccc">
<fo:block line-height="19.2pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
<xsl:text>Ename</xsl:text></fo:block>
</fo:table-cell>
<fo:table-cell display-align="before" background-color="#cccccc">
<fo:block line-height="19.2pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
<xsl:text>Hiredate</xsl:text></fo:block>
</fo:table-cell>
<fo:table-cell display-align="before" background-color="#cccccc">
<fo:block line-height="19.2pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
<xsl:text>Job</xsl:text></fo:block>
</fo:table-cell>
<fo:table-cell display-align="before" background-color="#cccccc">
<fo:block line-height="19.2pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
<xsl:text>Salary</xsl:text></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell display-align="before">
<fo:block line-height="14.5pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
<xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/ENAME"/>
</fo:block>
</fo:table-cell>
<fo:table-cell display-align="before">
<fo:block line-height="14.5pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
<xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/HIREDATE"/>
</fo:block>
</fo:table-cell>
<fo:table-cell display-align="before">
<fo:block line-height="14.5pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
<xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/JOB"/>
</fo:block>
</fo:table-cell>
<fo:table-cell display-align="before">
<fo:block line-height="14.5pt" white-space-collapse="false" linefeed-treatment="preserve" text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
<xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/SAL"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell/><fo:table-cell/><fo:table-cell/><fo:table-cell/></fo:table-row>
</fo:table-body>
</fo:table>
</fo:block></fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>XSL-FO is not the easiest thing to learn ;-) but hopefully the above gives you a headstart.
Regards,
Dimitri
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/
http://www.apexblogs.info/ -
Pagination incorrect in Named Column reports
I create a Named Column report template and a report based on that template.
Everything ok but pagination
- First page displayed correctly
- Click Next page button, second page displayed but first page still there, it's not hidden,
there's two page navigation panels
Any help ?Here's the link
http://apex.oracle.com/pls/otn/f?p=37181:10 -
What is the standard format of the query used to bring bw report as iview ?
Please tell me the format of the query used to bring bw report into the portal when we have webtemplateid .
Koti ReddyHI,
It's well described in help,
for EP 6.0 and BW 3.5: http://help.sap.com/saphelp_nw04/helpdata/en/27/6c013a53271a05e10000000a11402f/frameset.htm
for EP 7.0 and BI 7.0 is more difficult, but You have a wizard:
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/ef05462480025ae10000000a1553f7/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/33/39fa40ee14f26fe10000000a1550b0/frameset.htm
Regards,
Jarek -
Programmatically change the query used to generate Oracle Reports
I have two queries. Depending on some parameter value, I would like to use one of these queries to generate my report. Is it possible to programmatically change the SQL query used to generate the Oracle Report.
ThanksThere are two options:
- The easy way
In the report paper layout create two frames, one for each query , and at runtime
display only one based on your parameters. (using format triggers on the frames)
- the not so easy way (but more elegant)
create the query at runtime using xml customizations using the examples from
the following documentation:
http://download-
uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_xml.htm#i1006734
16.3 Creating XML Data Models
16.4.1.3 Applying an XML Report Definition in PL/SQL
16.4.1.3.2 Applying an XML Definition Stored in Memory
Regards and Good Luck
Ionut S -
Content Tracker Reports Query file modification issue - Custom Report
Hi All,
I was trying to generate a custom report using Content Tracker. I was successful in doing so. However, I found that sometimes it does not pick up the updated query file of Content Tracker reports.
I made a change in my query:
from SELECT * FROM Users to
SELECT dname FROM Users
the change is written on the file but when i generated the report from C.T. UI, it's still showing me the old results having all the columns. Tried bouncing the server as well, but no use.
I also added a new query 24 hrs back (as SELECT count(*) As UsersNum FROM Users), it's still not recognizing it and giving error as Failure of server APACHE bridge: No backend server available for
connection: timed out after 10 seconds or idempotent set to OFF;
and the log says,
Unable to execute service SCT_GET_DOCUMENT_INFO_ADMIN and function sctExecuteQuery.
Unable to create the result set for query '(null)'. SQL statement to execute cannot be empty or null
What could be the resolution of this issue?
I am using UCM 11g + SSXA.Server bounce.
Issue is not file update but some other issue, ongoing in another thread by Me. -
Caml query using managed metadata column
hi,
I am having a console appln, where i want to pass the one paramater in the form of siteCol1:subsite1:subsite2 where siteCol1:subsite1:subsite2 is the path of subsite which is in MMS.
Can i pass this string paramter to the splist which contains a taxonomy column and match this paramter in the listitemcollection and fetch only those recordw which matches this crirteria.
and it should fetch the values which matches in a splist. the caml query it expects contains the taxonomy -managed metadata column - , but i am stuck with
SPList splistLIST = parenttWeb.Lists.TryGetList("LIST1");
if ((splistLIST.Items.Count > 0 && splistLIST!= null))
SPQuery objnodeQuery = new SPQuery();
objnodeQuery.Query =
string.Format(
"<OrderBy>" +
"<FieldRef Name='ID' />" +
"</OrderBy>" +
"<Where>" +
"<Eq>" +
"<FieldRef Name='myTaxonomy' />" +
"<Value Type='Text'>{0}</Value>" +
"</Eq>" +
"</Where>", _mcurrentPathTermSet);
SPListItemCollection nodeItemCollection = splistLIST1.GetItems(objnodeQuery);
am not able to retrieve the listitems which passes this as a parameter and retrieve those records where it matches this taxonomy column.
my doubt is, how to pass a string parameter to the splist contains taxonomy column and fetch those recordsHi,
Managed metada column does not supported in lookup column as the thread below:
https://social.technet.microsoft.com/Forums/en-US/0dee5ba4-9648-445f-a774-8c59cf01b81c/confirmation-needed-cant-lookup-managed-metadata-field-with-lookup-column?forum=sharepointgeneralprevious
If you prefer managed metadata in Search, then I'd suggest you find workaround to use managed metadata column in lookup column. You could use a workflow to copy the managed metadata column to a text field, make the text field to be hidded from the list if
necessary. Then lookup this text field in other list.
Regards,
Rebecca Tu
TechNet Community Support -
Data Warehouse report query using Entity Beans
I have used the EJB technology on one project, so I am not all that familiar with
best practices.
In my new project, I have to produce reports using a query that goes against a
dimensional database. I am wondering what options I have to run the query and
extract the results given that the application will run on WebLogic.
1) Straight JDBC
2) BMP
3) CMP (could be a problem because the quety is a join query, but I am not sure
if WebLogic requires that the query is against a table rather than a view)
The query is read-only. I am more interested in ease of coding and code management
rather than application performance at this point because I think the query will
spend a relatively large time executing on the Oracle database.
I would like to hear the best practices to be employed in this case. Thanks very
much!
Ravi.Don't use entity beans for this. Straight JDBC is not perfect either, but it
is preferable to entity beans for this type of work.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Ravi Navanee" <[email protected]> wrote in message
news:3c92693d$[email protected]..
>
I have used the EJB technology on one project, so I am not all thatfamiliar with
best practices.
In my new project, I have to produce reports using a query that goesagainst a
dimensional database. I am wondering what options I have to run the queryand
extract the results given that the application will run on WebLogic.
1) Straight JDBC
2) BMP
3) CMP (could be a problem because the quety is a join query, but I am notsure
if WebLogic requires that the query is against a table rather than a view)
The query is read-only. I am more interested in ease of coding and codemanagement
rather than application performance at this point because I think thequery will
spend a relatively large time executing on the Oracle database.
I would like to hear the best practices to be employed in this case.Thanks very
much!
Ravi. -
Query using Table named "Order" is failing
I'm writing a query to look at orders in a table called Order (I did not name it that). Unfortunately, this is also a reserved key term in SQL. In the query in visual studio I put the table name in brackets [Order]. The query is simple
SELECT DISTINCT O.ProjectNo, O.ReportType
FROM [Order] AS O
The query runs correctly while in VS, but once I upload the report to SSRS server, I get an error
Query execution failed for dataset 'EDROrders'. (rsErrorExecutingCommand)
Invalid object name 'Order'
Any ideas? I'm on SQL 2008 R2
Milissa HartwellAre you sure Order is in the same database which datasource is trying to connect? Also are you using an expression based connectionstring?
Another scenario where this can occur is Order table not being in dbo schema. It may be that it will in your default schema (say xxx) so that when you just refer it as Order it will work fine whereas when it runs from ReportServer its using another account
whose default schema is not same as yours. As such it wont find table as its neither in its default schema not dbo
To check that give it access to your schema (if different from dbo) and make select as below
SELECT DISTINCT O.ProjectNo, O.ReportType
FROM [schemaname].[Order] AS O
and try
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Report Navigation Using Hyperlinks to Another Report (not drill down)
I would like 2 sample reports. The first report would have a hyperlink to the second report. I want to publish these in BusinessObjects Enterprise and see this functionality using the Dhtml viewer preferably using the "my infoview".
Anyone have or know of samples for this?Hi,
Go to report painter, in the report display you can see the output types.
choose output area as Info control, Navagation control, dril down control, detail control.
Choose HTML Templet - SAP Template
choose Classic drilldown, choose basic list drilldown
change all this parameters in the report then you will be getting drilldown fuctionality.
Regards,
Padma -
How to make dynamic query using DBMS_SQL variable column names
First of all i will show a working example of what i intend to do with "EXECUTE IMMEDIATE":
(EXECUTE IMMEDIATE has 32654 Bytes limit, which isn't enough for me so i'm exploring other methods such as DBMS_SQL)
-------------------------------------------------CODE-----------------------------------
create or replace PROCEDURE get_dinamic_query_content
(query_sql IN VARCHAR2, --any valid sql query ('SELECT name, age FROM table')
list_fields IN VARCHAR2) --list of the columns name belonging to the query ( arr_list(1):='name'; arr_list(2):='age';
-- FOR k IN 1..arr_list.count LOOP
-- list_fields := list_fields || '||content.'||arr_list(k)||'||'||'''~cs~'''; )
AS
sql_stmt varchar (30000);
BEGIN
sql_stmt :=
'DECLARE
counter NUMBER:=0;
auxcontent VARCHAR2(30000);
CURSOR content_cursor IS '|| query_sql ||';
content content_cursor%rowtype;
Begin
open content_cursor;
loop
fetch content_cursor into content;
exit when content_cursor%notfound;
begin
auxcontent := auxcontent || '||list_fields||';
end;
counter:=counter+1;
end loop;
close content_cursor;
htp.prn(auxcontent);
END;';
EXECUTE IMMEDIATE sql_stmt;
END;
-------------------------------------------------CODE-----------------------------------
I'm attepting to use DBMS_SQL to perform similar instructions.
Is it possible?Hi Pedro
You need to use DBMS_SQL here because you don't know how many columns your query is going to have before runtime. There are functions in DBMS_SQL to get information about the columns in your query - all this does is get the name.
SQL> CREATE OR REPLACE PROCEDURE get_query_cols(query_in IN VARCHAR2) AS
2 cur PLS_INTEGER;
3 numcols NUMBER;
4 col_desc_table dbms_sql.desc_tab;
5 BEGIN
6 cur := dbms_sql.open_cursor;
7 dbms_sql.parse(cur
8 ,query_in
9 ,dbms_sql.native);
10 dbms_sql.describe_columns(cur
11 ,numcols
12 ,col_desc_table);
13 FOR ix IN col_desc_table.FIRST .. col_desc_table.LAST LOOP
14 dbms_output.put_line('Column ' || ix || ' is ' ||
15 col_desc_table(ix).col_name);
16 END LOOP;
17 dbms_sql.close_cursor(cur);
18 END;
19 /
Procedure created.
SQL> exec get_query_cols('SELECT * FROM DUAL');
Column 1 is DUMMY
PL/SQL procedure successfully completed.
SQL> exec get_query_cols('SELECT table_name, num_rows FROM user_tables');
Column 1 is TABLE_NAME
Column 2 is NUM_ROWS
PL/SQL procedure successfully completed.
SQL> exec get_query_cols('SELECT column_name, data_type, low_value, high_value FROM user_tab_cols');
Column 1 is COLUMN_NAME
Column 2 is DATA_TYPE
Column 3 is LOW_VALUE
Column 4 is HIGH_VALUE
PL/SQL procedure successfully completed.I've just written this as a procedure that prints out the column names using dbms_output - I guess you're going to do something different with the result - maybe returning a collection, which you'll then parse through in Apex and print the output on the screen - this is just to illustrate the use of dbms_sql.
best regards
Andrew
UK -
Text query using a Multi Column datastore index slow
I have created a text index using multi column datastore preference. I have specified two clob columns in my preference. Searching on this new index works, but it is slower than I expected.
I have done the following comparison:
My original two clob columns are: DocumentBody and DocumentFields. I have built an individual text index on each column. My new column with Multi Column index is DocumentBodyAndFields;
I did two queries:
1. search 'dog' on DocumentBody UNION search 'dog' on DocumentFields;
2. search 'dog' on DocumentBodyAndFields;
I would think the second search should be faster than the first one because it is a single query. But this is not the case. The second query is consistently slower than the first query by about 10-20%.
Things are getting much worse when I search on preceding wildcards. If I search '%job', the multi column index is twice as slow as the first query! I am very confused by this result. Is this a bug?I am unable to reproduce the performance problem. In my tests, the search that uses the multicolumn_datastore performs better, as demonstrated below. Can you provide a similar test case that shows the table structure, datastore, index creations, and explain plan?
SCOTT@orcl_11g> CREATE TABLE your_tab
2 (DocumentId NUMBER,
3 DocumentBody CLOB,
4 DocumentFields CLOB,
5 DocumentBodyAndFields VARCHAR2 (1))
6 /
Table created.
SCOTT@orcl_11g> INSERT ALL
2 INTO your_tab VALUES (-1, 'adog', 'bdog', NULL)
3 INTO your_tab VALUES (-2, 'adog', 'whatever', NULL)
4 INTO your_tab VALUES (-3, 'whatever', 'bdog', NULL)
5 SELECT * FROM DUAL
6 /
3 rows created.
SCOTT@orcl_11g> INSERT INTO your_tab
2 SELECT object_id, object_name, object_name, NULL
3 FROM all_objects
4 /
69063 rows created.
SCOTT@orcl_11g> BEGIN
2 CTX_DDL.CREATE_PREFERENCE
3 ('your_datastore', 'MULTI_COLUMN_DATASTORE');
4 CTX_DDL.SET_ATTRIBUTE
5 ('your_datastore', 'COLUMNS', 'DocumentBody, DocumentFields');
6 END;
7 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11g> CREATE INDEX your_idx1 ON your_tab (DocumentBody)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 /
Index created.
SCOTT@orcl_11g> CREATE INDEX your_idx2 ON your_tab (DocumentFields)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 /
Index created.
SCOTT@orcl_11g> CREATE INDEX your_idx3 ON your_tab (DocumentBodyAndFields)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 PARAMETERS ('DATASTORE your_datastore')
4 /
Index created.
SCOTT@orcl_11g> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'YOUR_TAB')
PL/SQL procedure successfully completed.
SCOTT@orcl_11g> SET TIMING ON
SCOTT@orcl_11g> SET AUTOTRACE ON EXPLAIN
SCOTT@orcl_11g> SELECT DocumentId FROM your_tab
2 WHERE CONTAINS (DocumentBody, '%dog') > 0
3 UNION
4 SELECT DocumentId FROM your_tab
5 WHERE CONTAINS (DocumentFields, '%dog') > 0
6 /
DOCUMENTID
-3
-2
-1
Elapsed: 00:00:00.65
Execution Plan
Plan hash value: 4118340734
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 4 | 576 | 2 (100)| 00:00:01 |
| 1 | SORT UNIQUE | | 4 | 576 | 2 (100)| 00:00:01 |
| 2 | UNION-ALL | | | | | |
| 3 | TABLE ACCESS BY INDEX ROWID| YOUR_TAB | 2 | 288 | 0 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | YOUR_IDX1 | | | 0 (0)| 00:00:01 |
| 5 | TABLE ACCESS BY INDEX ROWID| YOUR_TAB | 2 | 288 | 0 (0)| 00:00:01 |
|* 6 | DOMAIN INDEX | YOUR_IDX2 | | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
4 - access("CTXSYS"."CONTAINS"("DOCUMENTBODY",'%dog')>0)
6 - access("CTXSYS"."CONTAINS"("DOCUMENTFIELDS",'%dog')>0)
SCOTT@orcl_11g> SELECT DocumentId FROM your_tab
2 WHERE CONTAINS (DocumentBodyAndFields, '%dog') > 0
3 /
DOCUMENTID
-1
-2
-3
Elapsed: 00:00:00.28
Execution Plan
Plan hash value: 65113709
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 4 | 76 | 0 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| YOUR_TAB | 4 | 76 | 0 (0)| 00:00:01 |
|* 2 | DOMAIN INDEX | YOUR_IDX3 | | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("CTXSYS"."CONTAINS"("DOCUMENTBODYANDFIELDS",'%dog')>0)
SCOTT@orcl_11g> -
XSL-FO Report Query / Named Layout - Dynamically set the output filename
Does anyone know if it is possible to dynamically set the name of the PDF file which is created via FOP?
Thanks
PaulJohn
Thanks for the quick reply, apologies, I should have been more explicit.
I am calling apache FOP via a report query and a named column layout using xsl-fo to format the PDF report.
The call is done via a javascript function which determines which report to print and then submits the approproate REQUEST. The request is picked up by conditional branches and calls the PRINT_REPORT
The PRINT_REPORT names the PDF file as same as the report query name.
BTW the long term goal is to store the resultant output as a blob back in the database but I can put that off to phase II of the project as I'm not sure that this is possible. Would be nice though!
Thanks
Paul -
I am trying to generate PDF reports using a named column template.
APEX 4.1, using the APEX-supplied FOP.war deployed on Glassfish 4.
I am using a Report Query - Report Layout.
Whenever I use a generic report template, all works fine.
When I use a named column report generated with Stylus Studio. I get this error (from the server.log):
[2014-01-02T19:08:44.375-0500] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=23 _ThreadName=http-listener-1(5)] [timeMillis: 1388707724375] [levelValue: 900] [[
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at java.io.StringReader.<init>(StringReader.java:50)
at org.apache.jsp.apex_005ffop_jsp._jspService(apex_005ffop_jsp.java:73)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:722)
In my original template - which worked fine in Stylus Studio - I had XPath for color-coding text based on values, and background-color coding certain rows based on values. I noticed Stylus Studio inserts special characters, including
I redid the Stylus Studio template, bringing it down to bare-bones, Title and Table.
Same issue.
The template is:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://www.stylusstudio.com/xquery">
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="default-page" page-height="8.5in" page-width="11in" margin-left="0.5in" margin-right="0.5in" margin-top="0.5in" margin-bottom="0.5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="default-page">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:block text-align="center">
<fo:block>
<fo:inline font-family="Tahoma">
<xsl:value-of select="/DOCUMENT/TITLE"/>
</fo:inline>
</fo:block>
<fo:block>
<fo:table width="100%" border-style="solid" border-width="1pt" background-repeat="repeat">
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-body>
<fo:table-row background-color="green">
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" text-align="center" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Inst Type</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Test</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Reagent</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Units</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>QC Lot</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Laboratory</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Inst</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>N</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Mean</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>SD</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>CV</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>TEa Fixed</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>TEa Pct</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Peer ean</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Sigma</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Sigma w/Bias</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Grade</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
<fo:block>
<xsl:text>Grade w/Bias</xsl:text>
</fo:block>
</fo:block>
</fo:table-cell>
</fo:table-row>
<xsl:for-each select="/DOCUMENT/REGION/ROWSET/ROW">
<xsl:variable name="ROW" select="."/>
<fo:table-row>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt">
<fo:block>
<xsl:value-of select="INSTRUMENT_NAME"/>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt">
<fo:block>
<xsl:value-of select="TEST_NAME"/>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt">
<fo:block>
<xsl:value-of select="REAGENT"/>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
<fo:block font-family="Times New Roman" font-size="9pt">
<fo:block>
<xsl:value-of select="UNITS"/>
</fo:block>
&lHello Mike,
Thanks for that but .. I had followed that paper exactly. When it gets to the "...make some fomrattign changes ..." part, the doc is not very specific. While I have yet to prove this out ( I have an APEX Listener, APEX 4.2 instance as well), I believe my template was incorrect no matter which APEX version (4.1 vs 4.2) or using the APEX Listener vs Glassfish deployment - the problem was indeed with my template.
The main issue blocking PDF generation was the fact that in my template, I did not have column-width's assigned to my <fo:table-column ...> directives. When I use Stylus Studio, the default post-processor is RenderX.XEP, not Apache FOP. Apache FOP has more limitations .. or the RenderX post-processing is more advanced, however you want look at it. Stylus Studio
Once I got the column-width's defined, I had to go step by step in adding additional features to the template, paying particular attention to Apache FOP documentation and Known Issues. Switching the post-processor to Apache FOP in the Stylus Studio Scenario properties helps, but does not catch everything.
I am plugging along .. my latest learning experience is that the nice XPath that works in Stylus Studio does not directly translate to Apache FOP ...I need to implement same using XSLT.
Fun with FOP!
Back to Mike's point of using the APEX Listener and APEX 4.2 .. if I could, I would, but we cannot upgrade until next year sometime, so I've got to work with what I've got. For kicks, when I have time, I'll compare results between APEX 4.1 APEX-supplied FOP.war and the APEX 4.2 APEX-supplied FOP.war, to see the differences. It's still Apache FOP, so there may be someimprovements, but I sitll expect to need to stick to strict Apache FOP and XLST 1.0, which is clearly stated. -
Sorting on columns with templated Report -- Named Column (row template)
Hi forum,
I'm trying to duplicate a regular report's column sorting functionality in a "Named Column" report.
The column headers are in the "Before first and after last row text" "Before Rows" area of the template :
<th onClick="sortByColumn('#REGION_ID#',5)">Frequency</th>invoking this javascript:
function sortByColumn(regionId,colNo) {
var u = "f?p=124:401:&SESSION.:fsp_sort_" + colNo + "::RP&fsp_region_id="+regionId.substring(1);
document.location.href=u;
}I'd like to sort descending when a user clicks the column again, and to display the column sort arrows (up/down).
However, since sorting is persisted per user, even when the page's cache is cleared, it would be necessary to pick up the sort column and order (ascending,descending) on page load or query it later using ajax, so that the sort display (the arrows) stays in synch with the actual sort.
Has anyone got an idea how to do this?
Cheers
Edited by: YT on Apr 1, 2009 4:19 PM
Edited by: YT on Apr 1, 2009 4:24 PM
Edited by: YT on Apr 1, 2009 4:26 PMHi,
Sort ordering on reports are stored as user preferences - see Need to do column SORTING only when I click the column heading for Denes' example on how to use this
Andy
Maybe you are looking for
-
helppppppppppppppppppppppppppppppppppppppp this is so annoying
-
Prevent users from making modifications to the about:config page?
-
Hi I cant seem to be able to add an image to a java application, im using jdk1.5.0_02 and jre1.5.0_02. I tried the following code but nothing happens: Image untitled = Toolkit.getDefaultToolkit().getImage ( "C:/Documents and Settings/User/Desktop/unt
-
Can't open encrypted HDD on another Mac
I have backed up my timecapsule to an encrypted external Hard Disk Drive. This worked fine and I can open the encrypted disk and view the contents from my mac running Mountain Lion 10.8.1. The problem is that my password is rejected when I try to ope
-
PO - Change Condition pricing date
Can we change Condition pricing date in PO.If Yes , then How?? Thanx, Viru