Multiple Queries in Shared Components Report Queries
Hey all,
I am creating a report query which has multiple queries and I am running into to some issues with the builder.
1.Whenever I try to edit a query it always sends me to the same query. (I can see that it is passing a different ID in the url, but the query never changes)
- Ex: I create a report query and add two queries, SELECT 1 FROM DUAL and SELECT 2 FROM DUAL. no matter which querry i try to edit it always shows SELECT 1 FROM DUAL.
2. There is no way to delete individual queries.
- does anyone know a workaround to delete a query? (rather than just deleeting the entire report query)
Cheers,
Tyson Jouglet
This was a bug that has been fixed in APEX version 3.2.1
(its always helpful to list the version you are using along with your question)
If you are using this with a BI publisher report layout, you will also get problems with earlier versions as the rowsets don't always get returned in the correct order.
See this thread for more details....
Bi Publisher result set question
I ended up deleting my whole query and spending a long, careful afternoon adding the 33 queries I had in order one by one having made SURE they were all EXACTLY what I wanted using SQL Developer.
Gus..
You can reward this reply by marking it as either Helpful or Correct
;-)
Similar Messages
-
Shared components - Report Queries - Too many rows?
I have a query that returns 70,000 rows that the business owner wants to be printed as a reference manual. I built the reprot template (*.rtf) and saved the query. If I run the query with a limiting where clause for only 1000 records everything is fine. However, as I continue to increase the number to 10,000 records I no longer get a report. I get an blank IE page with no content.
Is this a timing issue where it jus takes too long to generate the report? Or, is there a limit to the number of rows that can be returned in a report Query/template?
I am not running a report to export as CSV - I am aware of the small int limitation of Excel that prevents greater than ~65,000 rows.
Thanks in advance!
-JTHi,
(APEX 3.1)
I was getting the same error. It was because I was trying to insert into a view on a synonym pointing to a table across a database link. This would also fire a trigger.
A simpler test case of the same architecture produced the same error. As there was no attempt to bind longs I believe the error is misleading.
I removed some of the layers by creating a table which accepted the insert from the form, with an insert trigger that relayed the insert to the table in the second database, firing the trigger that did the work that was the real point of the exercise.
hope that may be of some use -
Issue with Shared Components - Report Layouts Download
After my isp provider upgraded from APEX 3.2.1 to 4.0, I am now unable to go into the Shared Components -> Report Layouts section and access an existing report to download my rtf template. Is there another way to go and get this out of the database. I need to update a report layout that is old and I do not have a backup of the original report and do not want to spend the time to recreate.
Thanks,
MarkIf you have TOAD, or if you can install it, by connecting to your database you will be able to access your report layout via the Schema Browser. The whole path should be "All Schemas -> APEX_040000 -> Tables -> WWV_FLOW_REPORT_LAYOUTS". In that table you will find you report layout. Double click on it and copy/paste it into a text editor.
Note: You might need to be granted some rights to access the 400+ tables of the APEX_040000 schema. Or if you have a DBA, ask him to do this for you.
Of course, if you don't want to install TOAD, I bet you could query that table from the SQL Commands of the SQL Workshop, but you would again need the rights to access said table.
Best regards,
Mathieu -
Shared component Report Queries
Hi All,
Can anybody tell how to add report queries(shared components) in button or how to access report queries.
ThanksHello,
If you can go for BI Publisher that would be very nice and integrates awesome.
To install and configure you can follow this: http://dgielis.blogspot.com/2007/06/testing-oracle-bi-publisher-with-apex.html
There's also a guide of Oracle here: http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html
If you can't go for BI Publisher, you can use Apache FOP for ex or PLPDF (but that's something totally different from the other two)
Regards,
Dimitri
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/
http://www.apexblogs.info/ -
Shared Components Report Layouts
Is there a way to modify the Column Template to produce alternating colors.
I've already created 2 attribute-sets in the Page Template
I can use either set and it works fine, however when ever I add anything else to the Column Template like <xsl: variable name "xxxx"> the pdf will not be generated and I get an error message.
Thanks
WayneHello Wayne,
Are you using the Generic Columns or the Named ones?
Before I've been trying with something like:
<xsl:if test="(position() mod 2 = 1)">
<xsl:attribute name="background-color">#BODY_BG_COLOR#</xsl:attribute>
</xsl:if>Regards,
Dimitri
-- http://dgielis.blogspot.com/
-- http://apex-evangelists.com/
-- http://apexblogs.info/ -
Report Queries - Multiple Source queries - One source returns & one doesn't
Hi Folks.
Odd one here.
I have a report query entry in the Shared Components of the APEX UI.
Within the Query are two source queries.
Both return unique column names.
Both use the same bind variable.
When generating a PDF using the call to the report, the data from one query is being returned and the data from another is not.
I have generated a sample XML file from APEX which is populated with data for both queries.
If I import this into MS-Word using the BIP plugin and generate a preview all is fine. All fields using data from both source queries are populated.
When generated via a regular call within APEX it simply does not work. I only get the data from one query.
Does anyone have any suggestions?
Anyone had a similar thing?
Any comments/suggestions welcome.
Many thanks
Dogfighter.
Message was edited by:
Dogfighter
Message was edited by:
DogfighterHi Marc
Does this make sense to you?
I have now set up a simple report query and report layout.
The record ID is hard coded into the query so that it only returns one row.
I am using an RTF based template.
If I navigate to Shared Components > Report Queries > Edit Report Query and then press the 'Test Report' button it runs perfectly.
If I copy the 'Print URL:' value from this page and use it as the URL target on any page in the app. it also works perfectly.
If I try and execute the following...
update invoice_summary
set invoice_pdf = APEX_UTIL.GET_PRINT_DOCUMENT (127, -- App ID
'TEST_INVOICE', -- query name
'TEST_INVOICE') -- layout name
where invoice_summary_gsm_id = a.INVOICE_ID;
I get the pdf saved to the BLOB column with the field labels in place but no data.
Three ways of running the report.
Two of them work perfectly but the one I want (generate direct into BLOB column) does not. Why would the exact same report query & report layout work with the other two methods but not the GET_PRINT_DOCUMENT route?
It's not as if the pdf does not get into the BLOB column, it does, but it only has the labels and no values.
Any ideas?
Simon.
PS. I only have one report query and one report layout set up so as to avoid confusion. Both with the same name.
Message was edited by:
Dogfighter -
Report Queries Rendering Issue
I'm having real trouble generating RTF reports from Report Queries using BI Publisher. When i copy the url into a button link the output is below
{\rtf1\ansi\deff0 {\fonttbl {\f0 Arial;} {\f1 Times;} {\f2 Courier New;} {\f3 Helvetica;} } {\colortbl ; \red0\green0\blue0; \red221\green221\blue221; \red239\green239\blue239; } {\info {\title } {\doccomm Generated by Oracle BI Publisher 10.1.3.3.3} } \formshade\viewkind1\viewbksp1\uc1\dntblnsbdb \paperw15840\paperh12240\margt1800\margb1800\margl1320\margr1320\landscape {\header \pard\itap0\qc\sl0\lin120\rin120 \par } {\footer \pard\itap0\qr\sl0\lin120\rin120 {\f3\fs16\cf1 \chpgn}\par \pard\itap0\qc\sl0\lin120\rin480 \par } \trowd \trhdr \trleft12 \clcbpat2\clbrdrt\brdrs\brdrw10\brdrcf1\clbrdrb\brdrs\brdrw10\brdrcf1\clbrdrl\brdrs\brdrw10\brdrcf1\clbrdrr\brdrs\brdrw10\brdrcf1 \cellx13252 \pard\intbl\sl0\lin108\rin108 {\f3\fs16\cf1 CONTACT LABEL}\cell \trowd \trhdr \trleft12 \clcbpat2\clbrdrt\brdrs\brdrw10\brdrcf1\clbrdrb\brdrs\brdrw10\brdrcf1\clbrdrl\brdrs\brdrw10\brdrcf1\clbrdrr\brdrs\brdrw10\brdrcf1 \cellx13252 \row \trowd \trleft12 \clcbpat3\clbrdrt\brdrs\brdrw10\brdrcf1\clbrdrb\brdrs\brdrw10\brdrcf1\clbrdrl\brdrs\brdrw10\brdrcf1\clbrdrr\brdrs\brdrw10\brdrcf1 \cellx13252 \pard\intbl\sl0\lin108\rin108 {\f3\fs16\cf1 Adrian Jones}\line {\f3\fs16\cf1 BRITISH SKY BROADCASTING}\line {\f3\fs16\cf1 GRANT WAY}\line {\f3\fs16\cf1 ISLEWORTH}\line {\f3\fs16\cf1 LONDON MIDDLESEX}\line {\f3\fs16\cf1 SW1E 5JL}\cell \trowd \trleft12 \clcbpat3\clbrdrt\brdrs\brdrw10\brdrcf1\clbrdrb\brdrs\brdrw10\brdrcf1\clbrdrl\brdrs\brdrw10\brdrcf1\clbrdrr\brdrs\brdrw10\brdrcf1 \cellx13252 \row \pard\itap0\sl0\lin120\rin120 {\*\bkmkstart page_total_master0}{\*\bkmkend page_total_master0}{\*\bkmkstart page_total}{\*\bkmkend page_total}\par }
I expect an attachment box with an RTF file to download. When i use the test functionality within shared components>report queries an RTF is generated. Why when i use the link is the RTF not been rendered. I'm using the latest version of apex with an 11g database. I have had trouble with the access control list before; could this be a problem?
Any help will appreciated
Thanks
KevinIt looks like the issue is within the application and not the configuration as the sample application within the same workspace is okay. Does anyone know why i would encounter an error like this. Have i deleted something accidentally or altered a setting?
Any help will be greatly appreciated.
Thanks
Kevin -
Report Queries and collections
Hello!
I want to intergrate a collection query into the report query for pdf-printing.
(Home>Application Builder>Application 111>Shared Components>Report Queries>Edit Report Query)
I trigger the report generation by a submit button. Wheras the collection content is visable in any page it is not within the report query.
What do I do wrong?
Thanks
DietmarHi John!
Thank you for your reply!
The query looks like:
select ordername, ...., ...
from v_odetails
where O_ID in (select c001 from apex_collections where collection_name = 'PRINTLIST')
The collection is filled with ids of orders the user has selected.
It seemed that session information is not available.
But, surprise, now, after a few logins it works perfectly.
Thank you!
Dietmar
Edited by: DiWiNe on 25.02.2010 19:34 -
Translate report layouts (Shared Components)
Hi,
I create in my application PDF using shared components (Report Queries and Report Layouts) and the BI Publisher. The queries I have deposited in Report Qieries and templates in report layouts. The call is done via the URL (which appears in the report query). Now I have translated my application and see that the titles of my templates are not visible with the xlife file. How can I translate the report layout from the Shared Components.
Thank you in advance for your support.
InesSruthi Tamiri wrote:
1. Apex version#3.2
Out of date and unsupported...please consider upgrading.
2. IE# 6+
Are you really still trying to support IE6?
When i clik on that specfic tab which is time causing, in that screen contains
1. Popup screens
2. Text items
3. List items
We have tried to this option from toad to check which Query is cauisng the problem, but nothing query is running in back end to tarce what could be exact problem
In toad#9.2 version we have option as Database->Monitor>Session Browser [where we can see which query is running under specfic session]
To establish exactly where time is being spent, use Debug mode to identify APEX or database issues, and timeline/profiling developer tools in the browser to check for network or JavaScript problems.
What web server are you using? If you're using EPG check the SHARED_SERVERS configuration. -
Report Queries are using different sort order
Hello,
my enviroment is
Apex 3.1.2
Apache Web Server
OC4J Apache FOP
i have 4 Source queries in one Report Query (shared components --> report queries)
This 4 Source queries have to be executed in a specific order, for instance my data in
DATA>
<ROWSET1>
<ROWSET1_ROW>
<query1>AABBCC<\query2>
<\ROWSET1_ROW>
<ROWSET2>
<ROWSET2_ROW>
<query2>XXYYZZ<\query2>
<\ROWSET2_ROW>
content always the same rows.
Apex is doing some strange things here. Sometimes my queries are executed in a different sequence.
So the output is like
DATA>
<ROWSET1>
<ROWSET1_ROW>
<query2>XXYYZZ<\query2>
<\ROWSET1_ROW>
<ROWSET2>
<ROWSET2_ROW>
<query1>AABBCC<\query1>
<\ROWSET2_ROW>
How can i fix the sequence of my source queries??
Any help is welcome!!
bye
Volker StrasserI found the solution.
Anychart seems to have a problem with null values!
The corrupted sorting only occured for a specific set of search criteria and a specific day. At this day some values have been null.
I added a "nvl( [...], 0) for every value.
No I get a correct sort order. -
Shared Components APEX Report Query and Layout
Does anyone know how to call the report query and layout from the Shared components section from a page within the application?
mtbdude40 wrote:
What I need is this: The ability to create a PDF report with a custom header defining the data (example - select * from emp where deptno = :deptno and the header includes the department name).
I use this white paper as my source: http://www.oracle.com/technetwork/developer-tools/apex/learnmore/custom-pdf-reports-1953918.pdf
You need to build and use a Shared Resource -> Report Queries.
The Report Query will have two queries associated with it (see below).
one query will be for the header information, the other will be for the data.
use the "download" of the "xml data" as your source for Altova/other tools.
If you add/remove/change queries, You'll have to redo your report (from scratch) as that changes the XML Schema required. (at least, with my experience)
Once you get the hang of it, 2x queries is easy (Header, data)
I've experimented with 3x queries (header, master,details) but have been unsuccessful. I have some ideas though ("link" master->detail info via XPath stuff within Altova) but haven't gotten around to testing it.
If you want to run the report for multiple departments....That might require some finesse.
Unfortunately, the Source of the Queries can't be a scalar SQL that returns 1 row of 1 column of data type XMLType....
MK -
Direct Link to Report layout in Shared Components
Is it possible to put a link on my page that goes directly into the Shared-Components- Report Layouts? I do'nt want my developer users to have to open up the builder to create/upload new (.rtf) Report Layouts.
Yeah
It's
http://host:port/pls/apex/f?p=4000:1400:&APP_SESSION.With the normal substitutions for your setup and removing pls if your using EPG.
Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;) -
How do i access multiple bex queries in one crystal reports??
Hello Experts,
I have 10 cubes and 30 bex queries on it and i need to create 3 final crystal reports on these 30 queries.
I am on BI 4.0 & CR 2011. but my client is not on correct SAP patch ie., he is on 15+ but he must be on 23+ to access multiple bex queries on CR 2011 Database expert. (I am unable to see bex queries in Database expert to link couple of bex queries)
And my client env doesnt have SAP EP for SAP BW Netweaver Connection to create a connection to access cubes or queries in IDT.
Do my client env need EP? so that SAP BICS Connection will work in IDT?
How do i approach to achive this...
Thank you...Hi,
have you checked the option "allow external access" in your query? SAP Toolbar will find all queries but the database export needs this flag to be set.
Using multiple queries within one crystal report is using the "multi database join feature" of crystal reports. You can link your queries by key fields and crystal will join them in memory. So when there are many queries or many datarows this can be a huge performance killer.
Actuallly one of our customers is running a report which has more than 20 BEx queries linked together. It runs just fine.
Please be sure to set your joins correctly. E.g. crystal will try to make a join on the "key figures" sturcture if you let it create a suggestion or it will try to link on all fields of an infoobject. This will bring MDX errors.
So you should be setting your joins correctly - the [infoobject]-[20infoobject] fields are fine for that.
I hope you can use some of my words.
Regards
Thorsten -
Using multiple Collections in Report queries
I am using many collections in my Report Queries (where conditions) to create the XML needed for running reports (see where condition below). I name each one with a different collection name. I am seeing some performance issues and it looks like it has to do with the amount of collections I am using. It looks like after around 6 collections used in the query, the sql slows down tremendously. It doesn't matter which ones I use, so it doesn't seem to be a specific one.
Are there issues with using many collections? Should I try using 1 collection and add an identifier to one of the collection columns instead?
where ...
and C.FK_SCHOOL IN (SELECT c001
FROM apex_collections AC1
WHERE AC1.collection_name = 'SIS_REPORTS_SCHOOLS')
and nvl(C.ACTIVE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C.ACTIVE,'NONE'),C001)
FROM apex_collections AC2
WHERE AC2.collection_name = 'SIS_REPORTS_ACTIVES')
and nvl(C5.CALENDAR_NO,'NONE') IN (SELECT decode(c001,'NONE',nvl(C5.CALENDAR_NO,'NONE'),C001)
FROM apex_collections AC3
WHERE AC3.collection_name = 'SIS_REPORTS_SCHOOL_CALENDAR_NOS')
and nvl(C10.CLUSTER_CODE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C10.CLUSTER_CODE,'NONE'),C001)
FROM apex_collections AC4
WHERE AC4.collection_name = 'SIS_REPORTS_CLUSTER_CODES')
and nvl(C4.EMPLOYEE_NUMBER,'NONE') IN (SELECT decode(c001,'NONE',nvl(C4.EMPLOYEE_NUMBER,'NONE'),C001)
FROM apex_collections AC5
WHERE AC5.collection_name = 'SIS_REPORTS_COUNSELORS')
and nvl(I3.DISTRICT,'NONE') IN (SELECT decode(c001,'NONE',nvl(I3.DISTRICT,'NONE'),C001)
FROM apex_collections AC6
WHERE AC6.collection_name = 'SIS_REPORTS_DISTRICTS')
and nvl(A1.ETHNIC,'NONE') IN (SELECT decode(c001,'NONE',nvl(A1.ETHNIC,'NONE'),C001)
FROM apex_collections AC7
WHERE AC7.collection_name = 'SIS_REPORTS_ETHNICS')
and nvl(C2.GRADE_LEVEL,'NONE') IN (SELECT decode(c001,'NONE',nvl(C2.GRADE_LEVEL,'NONE'),C001)
FROM apex_collections AC8
WHERE AC8.collection_name = 'SIS_REPORTS_GRADE_LEVELS')
and nvl(C3.HOMEROOM,'NONE') IN (SELECT decode(c001,'NONE',nvl(C3.HOMEROOM,'NONE'),C001)
FROM apex_collections AC9
WHERE AC9.collection_name = 'SIS_REPORTS_HOMEROOMS')
and nvl(C9.PROGRAM_CODE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C9.PROGRAM_CODE,'NONE'),C001)
FROM apex_collections AC10
WHERE AC10.collection_name = 'SIS_REPORTS_PROGRAM_CODES')
and nvl(E2.S_TYPE,'NONE') IN (SELECT decode(c001,'NONE',nvl(E2.S_TYPE,'NONE'),C001)
FROM apex_collections AC11
WHERE AC11.collection_name = 'SIS_REPORTS_SCH_TYPES')
and nvl(A.SEX,'NONE') IN (SELECT decode(c001,'NONE',nvl(A.SEX,'NONE'),C001)
FROM apex_collections AC12
WHERE AC12.collection_name = 'SIS_REPORTS_SEXS')
and nvl(C7.SPECIAL_ED,'NONE') IN (SELECT decode(c001,'NONE',nvl(C7.SPECIAL_ED,'NONE'),C001)
FROM apex_collections AC13
WHERE AC13.collection_name = 'SIS_REPORTS_SPECIAL_EDS')
and nvl(A.STUDENT_ID,'NONE') IN (SELECT decode(c001,'NONE',nvl(A.STUDENT_ID,'NONE'),C001)
FROM apex_collections AC14
WHERE AC14.collection_name = 'SIS_REPORTS_STUDENTS')
and A.PK_ID IN (SELECT decode(c001,'NONE',A.PK_ID,AC16.FK_STU_BASE)
FROM student_list_det AC16, apex_collections AC15
WHERE AC15.collection_name = 'SIS_REPORTS_STUDENT_LISTS' and
AC16.fk_student_list (+) = AC15.c001)Hi,
APEX_COLLECTIONS are special structures that do not have indexes, expect for the one on SEQ_ID. The result is that as the number of collections used in a query increases the number of full table scans on underlying tables kill speed. They are not intended for such heavy use as has been discussed in some of the threads in this forum.
They are extremely useful , but no good for very large data sets or large number of joins. Global temporary tables are also not an option with Apex.
You may have to resort to Materialized Views or intermediate/temp tables to get speed.
Regards, -
We have had a production issue crop up twice now where reports begin running slowly seemingly at random.
When this happens we can see from running SQL Profiler that the report queries are taking an extremely long time to execute. The same queries when run directly in management studio run quickly.
Initially I suspected parameter sniffing, and tried using OPTION (RECOMPILE) in the reports, as well as clearing out the particular query from the plan cache and running the SQL in SSMS to try and get a better plan etc but no amount of jiggery pokery by
me could get the queries to run any faster.
The really weird thing - is that stopping and starting the report server via the reporting services configuration manager instantly cures the problem.
I'd really love to know - why this might be? Is it something to do with the report server closing and re-opening its connections to the database? That's the only sort of thing I can think of...any ideas? Anyone? Any suggestions would be much appreciated.
LucasFHi LucasF,
In your scenario, usually we can monitor the execution log in Report Database. If you run below query, you can get the results how long the report takes to render (TimeRendering), how long to process the report(TimeProcessing) and how long to retrieve data
from Database(TimeData). You can check the starttime and endtime to know the total time for executing a report.
SELECT TOP1000 *FROM[ReportServer].[dbo].[ExecutionLog2]
More details information, please reference to similar thread below:
Steps for troubleshooting a slow SSRS 2014 server
Troubleshooting Reports: Report Performance
In SQL Server Reporting Services, a job will be created by SQL Server Agent if any of the following processes is underway:
query execution on a remote or local database server
report processing
report rendering
To cancel a job that is running on the report server, we can cancel the job directly or reduce the report execution time-out value in the SQL Server Management Studio and then will stop query execution. Please refer to the steps below:
Open SQL Server Management Studio, and connect to "Reporting Services".
Under the Report Server node, right-click on the "Jobs" folder and select "Refresh". Then, right-click on "Jobs" again and click "Cancel All Jobs".
Right-click on the Report Server node and open the "Server Properties" dialog.
Click the "Execution" option, and set the "Limit report execution to the following number of seconds:" to a much smaller number. After this issue is resolved, this configuration should revert to the previous state.
Reference:
Managing a Running Process
Setting Time-out Values for Report and Shared Dataset Processing
In addition, we can also use the KILL Transact-SQL statement to terminate a normal connection by terminating the transactions that are associated with the specified session ID. For the details information, you can refer to:
KILL (Transact-SQL)
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support
Maybe you are looking for
-
Extend Wily Introscope in Solution Manager
Hello, Could I monitor other non SAP solutions in Solution Manager? I need to integrate all systems that are intended for monitoring (SAP and non SAP systems) to Solution Manager What is the scope of Wily Introscope in Solution Manager? Is the scope
-
FICA - Clearing Variants - Alternative Clearing Variant
Hi all, I'm facing an issue with this Clearing Variants, We have one clearing variant defined with 5 steps. In step 4 we need to attach a customer Function module to validate certain conditions (For eg. We'll be checking whether there are open items
-
Button change color on select, then change back
I have 3 buttons, named but,but2,but3. What I want is if you click a button it changes color to show what page your on. But when you click a different button now that one is highlighted and the original one goes back to the original color. Here's the
-
I don't see how you can specify colour sampling in compressor... can you export to MPEG2 format with 4:2:2 from an uncompressed 10bit 4:2:2 file??? Final Cut cannot directly output mpeg2 so i'm interested if anyone else knows of a compression program
-
Trouble switching between applications
When switching between applications I have a weird problem. Intermittently the menubar for the app I'm switching from will stay but the windows for the app I'm switching to will appear like they should. Most of the only way to fix this is to kill the