Query on item placement within a report region
Hi there,
I frequently place items within report regions for search texbox fields etc. Normally the items get placed above the report body, but since we have adopted a new theme, the items are appearing below the report.
Can anyone tell me where I can control the rendering order of the items within tht region in relation to the report body?
We are using Apex 3.2
Many thanks,
Mike Cretan
Thank you both for your responses. I did have my report region appearing at a template display point other than Page Template Body 3 (I had it at Region Position 06), and it would appear that Apex's default rendering order for any region other than Page Template Body 3 is for it to render the report first, followed by the regions items.
So it doesn't appear that there is any other way of getting the items above the report within the same region other than to use Page Template Body 3 display point, then to move the #BOX_BODY# placeholder within the page template to the desired location.
Correct me if I'm wrong here ;)
Thanks again,
Mike Cretan
Edited by: MGC on Aug 16, 2009 2:05 PM
Similar Messages
-
Printing PDF from Report Region - Header Details
Hi,
I've searched around for a while but was unable to find an answer to my query.
I have a simple report region, which i added a "Print" link to the bottom of - this brings up a formatted PDF version of the report which can be printed out, i'm just using the default PDF layout.
When it comes to adding a header and footer the PDF still functions ok, but when i try to add any page items it all stops working.
I basically need the time and date to appear at the top of the report, i created a hidden field just using the PL/SQL command "SYSDATE" which does return the correct value. But when i try to add this to the header or footer in the format "This document was printed on &P1_DATE", the PDF doesn't work, and when i try to download it, IE says the filesize is 0b.
Any suggestions would be appreciated, either something i've done wrong or if there is a better method,
Thanks in advanceThanks for the reply Scott,
The PDF does download when I put a fullstop after the name of the item. Unfortunatly now the PDF displays as if the item "P1_DATE" is empty, i.e. it says "This document was printed on ",
I've made P1_DATE visible and it definitly displays a date, yet the exported PDF displays nothing where P1_DATE is referenced,
Just to confirm:
The Item is called P1_DATE
The references i've tried are &P1_DATE. and &P1_DATE
the date is populated by the code SYSDATE
Thanks again,
Iain. -
Print out of Report Region dropping negative values
I am very new to APEX (< 2 months) and don't have much of a programming background. I have created a report layout using BI publisher and made it available as a shared component in my APEX applicaiton. When I print the the report region, most of the data displays fine on the print out, but any amounts with negative values are suppressed. I can view the negative amounts just fine when they are displayed on the report region itself.
It took me quite a while to get the style sheets from BI Publisher to work with APEX. I thought the two were supposed to be compatible. Does anyone know how to resolve the issue above or if their are any known compatability issues between BI Publisher and APEX? We are on APEX version 4.2.1.00.08 and BI Publisher version 11.1.1.This was indeed a bug. Response from Oracle:
This issue has been noted by development as a bug and I have file bug 16224878 regarding your issue. The issue explained by development pertains numeric format string which wraps the negative value in angle brackets: < val > , and the report is treating this as a HTML tag and filters it out. It looks like this is happening only for classic report regions, i.e. report queries seems to support this type of numeric format mask.
A work around would be to turn off printing for the classic report region and to provide a button to a report query for printing, using the same SQL for the report query as is used for the report region. Alternatively you could also use a different format mask. -
How to replace a table name with an item value in report region SQL query?
I've got a SQL query in a report region that goes like this:
SELECT :P30_HIDDEN FROM v_dms_dataset
GROUP BY :P30_HIDDEN
P30_HIDDEN is populated from a textfield input. Why doesn't this work, and is there a way to achieve what I'm trying to do here? I really need the ability to dynamically generate SQL queries in this way.Ben - you could either:
1. case when :P30_HIDDEN = 'COL1' then col1 else ... end
in order to determine which column to select (only really useful if you have a small number of predetermined columns to select from), or
2. generate the SQL dynamically.
Set the report region to SQL Query (PL/SQL function body returning SQL query), then have something like:
declare
l_sql VARCHAR2(4000);
begin
l_sql := 'SELECT ' || :P30_HIDDEN || ' FROM v_dms_dataset
GROUP BY ' || :P30_HIDDEN;
return l_sql;
exception
etc.
end;
John. -
Page item field placement in report region
I have a report region that has item fields in it. Additionally I have a page item field that I can only display above left of the report region. Question: how can I move the page item to middle area above region and how do I associate it's value with one of the report item fields for use in PL/SQL block updates from that page?
I have a report region that has item fields in it. Additionally I have a page item field that I can only display above left of the report region. Question: how can I move the page item to middle area above region and how do I associate it's value with one of the report item fields for use in PL/SQL block updates from that page?
-
Converting SQL Report Region to PLSQL Function Body Returning SQL Query
All:
I want to convert my SQL Report Region to a PLSQL-generated SQL Report Region so that I can eliminate where clauses dynamically and speed up my app, and also so that I can provide additional sorting options.
<br><br>
My problem is that I have lots of embedded single quotes that already are coded as 3 single quotes in the SQL Report Region. I am not sure at all how to code them within the PLSQL.
<br><br>
As example, here is one column from my query:
<br><br>
select decode(nvl(g.date_sub_1,g.date_rec_1), null, decode(g.article, 0, 'E', 1, 'U'), '< a href="javascript:unElevate( ' ' ' || g.grid || ' ' ',' ' ' || g.natca || ' ' ')">' || decode(g.article, 0, 'E', 1, 'U') || '< /a>') "Reverse" from g_table g
<br><br>
(Note that I added spaces within the code so it would display properly in the browser.)
<br><br>
To clarify, that's a double quote before javascript, and then 3 single quotes before the first concatenation group, then 3 single quotes after the second concatenation group, then 3 single quotes before the third, 3 single quotes after the fourth followed by an end-paren followed by a double quote etc.
<br><br>
My question is, what do I do with these triple-single quotes within PLSQL? Probably a no-brainer for the experienced folks, but I am thinking like a mobius strip at this point.
<br><br>
Bill
Message was edited by:
[email protected]
Message was edited by:
[email protected]
Message was edited by:
[email protected]Scott,
I think that feature was made for my situation! I keep getting
Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
(ORA-20001: Unable to bind :43 verify length of item is 30 bytes or less. Use v() syntax to reference items longer than 30 bytes. ORA-01006: bind variable does not exist)
I did chop the query up into little bits, i.e.
p_sql := p_sql || q'! ... !';
p_sql := p_sql || q'! ... !';
p_sql := p_sql || q'! ... !';
return p_sql;
But I'm not sure what I'm supposed to do here.
Thank you.
Bill -
How do I reference items in a report region
I've created a report. You can view the region attributes at http://i3.tinypic.com/wcn59h.jpg.
I've changed the "Display As" attribute of one of the items (QUAN_ID) to 'Select List (query based LOV)'. I've set the "LOV Query" attribute on this item to the following.
select quan.answer_txt
, quan.id
from vug_question_answers quan
, vug_survey_questions suqu
where suqu.id = quan.suqu_id
and suqu.surv_id = :p33_surv_id
--and suqu.id = :suqu_id
order by quan.question_answer_seq_no
The purpose of this LOV is to return QUESTION_ANSWERS that have a foreign key to the SURVEY_QUESTIONS record identified by the sufu_id. The bind-variable ":p33_surv_id" is a page item. I THOUGHT the bind-variable ":suqu_id" (referenced in the commented-out line) would be the name of a column item in my report region. However, the LOV doesn't return correct values if I uncomment the line containing :SUQU_ID.
How do I determine the name of the report region column item so that I can reference it within the LOV of another item in the same region?
Thanks,
-KenIvo,
That's it!
My original tabular form query read as follows.
select rean.id,
rean.resp_id,
suqu.surv_id,
suqu.question_txt,
quan.suqu_id,
rean.quan_id, --this is the column I was adding an LOV to
rean.entered_by,
rean.entered_on,
rean.updated_by,
rean.updated_on
from vug_respondent_answers rean
, vug_question_answers quan
, vug_survey_questions suqu
where rean.resp_id = :p33_resp_id
and quan.id = rean.quan_id
and suqu.id = quan.suqu_id
and suqu.surv_id = :p33_surv_id
I've changed it to the following.
select rean.id,
rean.resp_id,
suqu.surv_id,
suqu.question_txt,
quan.suqu_id,
htmldb_item.select_list_from_query
( 6
, rean.quan_id
, 'select quan.answer_txt, quan.id from vug_question_answers quan, vug_survey_questions suqu where suqu.id = quan.suqu_id and suqu.surv_id = :p33_surv_id and suqu.id = '|| suqu.id ||' order by quan.question_answer_seq_no') quan_id,
rean.entered_by,
rean.entered_on,
rean.updated_by,
rean.updated_on
from vug_respondent_answers rean
, vug_question_answers quan
, vug_survey_questions suqu
where rean.resp_id = :p33_resp_id
and quan.id = rean.quan_id
and suqu.id = quan.suqu_id
and suqu.surv_id = :p33_surv_id
My screen now looks as found at http://i3.tinypic.com/wgq4g9.jpg. (Note that I've also changed the question since a previous post.) -
Hi
I'm trying to come up with query report to show Inactive Item bought within a specific period and not sold within a specific period by whse and have stock
The report should show Item Number, Item Name ,Item cost,Retail Price [Based on a price list], Qty in Whse, Last Purchase Date, Last sale Date etc.
e.g item bought between 2011-2013 and have not been sold with the same date range or the last 12 months.
Regards
Brian Ndunda.Hi,
Try this query:
SELECT T0.[ItemCode], T0.[ItemName], T0.[OnHand], T0.[AvgPrice], T0.[LastPurPrc], T0.[LstSalDate] FROM OITM T0 left JOIN INV1 T1 ON T0.ItemCode = T1.ItemCode left JOIN OINV T2 ON T1.DocEntry = T2.DocEntry WHERE T1.[Quantity] is null and T0.[OnHand] >0 GROUP BY T0.[ItemCode], T0.[ItemName], T0.[OnHand], T0.[AvgPrice], T0.[LastPurPrc], T0.[LstSalDate]
Thanks & Regards,
Nagarajan -
SQL Query (updateable report) Region - Conditionally Hide and Set Values
SQL Query (updateable report) Region - Conditionally Hide and Set Values
Outline of requirement :-
Master / Detail page with Detail updated on same page using SQL Query (updateable report).
The detail region has the following source
SELECT item_id,
contract_id,
CASE WHEN hardware_id IS NOT NULL THEN
'HA'
WHEN backup_dev_id IS NOT NULL THEN
'BD'
WHEN hardware_os_id IS NOT NULL THEN
'HS'
END item_type,
hardware_id,
backup_dev_id,
hardware_os_id
FROM "#OWNER#".support_items
WHERE contract_id = :P26_CONTRACT_IDThe table support_items implements arced relationships and has the following columns
CREATE TABLE SUPPORT_ITEMS
ITEM_ID NUMBER NOT NULL,
CONTRACT_ID NUMBER NOT NULL,
HARDWARE_ID NUMBER,
BACKUP_DEV_ID NUMBER,
HARDWARE_OS_ID NUMBER
)A check type constaint on support_items ensures that only one of the fk's is present.
( hardware_id IS NOT NULL
AND backup_dev_id IS NULL
AND hardware_os_id IS NULL
OR ( hardware_id IS NULL
AND backup_dev_id IS NOT NULL
AND hardware_os_id IS NULL
OR ( hardware_id IS NULL
AND backup_dev_id IS NULL
AND hardware_os_id IS NOT NULL
) Hardware_Id is a FK to Hardware_Assets
Backup_dev_id is a FK to Backup_Devices
Hardware_os_id is a FK to Hardware_op_systems
The Tabular Form Element based on item_type column of SQL query is Displayed As Select List (based on LOV) referencing a named list of values which have the following properties
Display Value Return Value
Hardware Asset HA
Backup Device BD
Computer System HSThe Tabular Form Elements for the report attributes for hardware_id, backup_dev_id and hardware_os_id are all Displayed As Select List (Based on LOV).
What I want to do is only display the Select List for the FK depending on the value of the Select List on Item Type, e.g.
Item_Type is 'HA' then display Select List for hardware_id, do not display and set to NULL the Select Lists for backup_dev_id and hardware_os_id.
Item_Type is 'BB' then display Select List for backup_dev_id, do not display and set to NULL the Select Lists for hardware_id and hardware_os_id.
Item_Type is 'HS' then display Select List for hardware_os_id, do not display and set to NULL the Select Lists backup_dev_id and hardware_id.
There are properties on elements to conditionally display it but how do we reference the values of the SQL query Updateable region? they are not given a page item name?
Also on the Tabular For Elements there is an Edit tick against a report item - however when you go to the Column Attributes there is not a property with which you can control the Edit setting.
What's the best way of implementing this requirement in APEX 3.1?
Thanks.>
Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far... -
SQL Query (report region) without full page reset
Hello,
I have a page with several items, some of them with default values, and a report region, performing SQL query based on one of the items text field (always submits page when Enter pressed). When the page submits, the HTML DB engine performs and display the query, but at the same time, reset the other page items to their default values.
Is it possible to run the query without the HTML DB reset the item values to their default state?
Thanks,
Arie.Hi Peter,
Well, this is not exactly the case. I have an Item File Browse which defined as "Only when current value in session state is null", and a HTML text region, which contain Iframe, with default src tag (which I'm changing, using JavaScript, prior to the running of the SQL query). After running the query in a report region both the item and the Iframe reset to their original state.
Any Ideas on how to prevent that?
Thanks,
Arie. -
Items is a region displayed after a sql report region!
Hello everybody!
I have 3 regions :
1/ HTML text region with some items : sequence 10, column1
2/ SQL report region : sequence 20, column1
3/ HTML text region with some items : sequence 30, column1
I have many problems and errors when submitting the page and saving data into tables, I think that htmldb is not getting the correct values corresponding to the correct items.
If I change the column diplay of the sql report region to "2", or if I change the sequence of the SQL report region to 40, all is ok!!!
(I am using wwv_flow.g_f10(i) to retreive data from the report).
Any idea ?Hello Raju,
Ok, My example is more complexe, but I have succed to reproduce the error in a sample example in my oracle htmldb workspace,
My access info have bee sect to : [email protected]
You will find the example in application 21275_TEST page 2.
I have 3 regions, the second is a report sql region in witch I have a popkeyfrom query item.
My submit button, update a table with a text field (item P2_IT, region1) and a date(item P2_MONTH ,region3).
You will see that when submitting, you will get an error : not a valid month....
I have not understand what is being done at save, but I am sure that the value of P2_MONTH is not correctly setted when updating the table!
Just, changing the sequence of the report region from 10 to 30 resolve the problem,
but I must have this region between the two others!!!
Thanks for the help! -
Layout issue: sql report region and items derived from a different table
Hi all,
I have a report region whose source is a sql query. I am trying to display other items in the same region(These I added manually on the page and they come from another table in the schema). It works fine, except the items that I added manually in the region always appear at the top of the items that are derived from the query. I want the other way around if possible, where I want the items from report query to appear first and then the other items to appear below them. Can this be done? If so how?
Thanks in advance
srsr,
on the definition page of your region, set the property "Display Point" to "Page Template Body (1. items below region content).
I think that's what you are looking for.
Patrick
*** New *** Oracle APEX Essentials *** http://essentials.oracleapex.info/
My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/ -
SQL Query as Item Source/Oracle Reports w/ HTML DB?
I have successfully used a SQL Query as an item source in the past on several occasions. However, in this instance, every time I try to do this, I get the following error:
Error ERR-1019 Error computing item default value: page=3 name=P3_TEST_ITEM.
ORA-01460: unimplemented or unreasonable conversion requested ORA-02063: preceding line from [database_name]
If I use the exact same query in creating a report region, the page displays fine and the query returns the correct data. Why might this be happening, and what can I do to fix it?
Also - off the subject - is there a way to use HTML DB to deploy reports that are created in Oracle Reports Builder? I have created several employee productivity reports for supervisors and managers in HTML DB, which is great for allowing them to run them live and have fields as parameters for varying employees, date ranges, etc... but formatting them to be browser and printer friendly is an absolute nightmare so far. If I could create and format the reports in Reports Builder and then deploy them using HTML DB, while still being able to offer parameters to the user, that would be perfect. Is this possible?Here is my query:
SELECT
TO_CHAR((sum(decode(ef.production_function,'Y',ef.function_minutes+ef.function_ot_minutes))/60)/8, '9999999.99')
FROM
RLAPPLSG.EMPLOYEE_INFO@REMOTE_SERVER EI,
RLAPPLSG.SC_EMP_FUNCTIONS@REMOTE_SERVER EF,
RLAPPLSG.SC_EMP@REMOTE_SERVER E
WHERE
( e.SC_EMP_NBR=ef.SC_EMP_NBR )
AND ( ei.EMP_ID=e.EMP_ID )
AND (
( trunc(( e.SC_DATE )) BETWEEN :P2_BEGIN_DATE AND :P2_END_DATE )
AND (ei.EMP_MGRS_ID = :P2_SUPERVISOR_ID
OR ei.EMP_ID = :P2_SUPERVISOR_ID)
Every table and/or view that is referenced here is done so remotely. The column datatype breakdown is as follows:
production_function - BOOLEAN
function_minutes - NUMBER
function_ot_minutes - NUMBER -
Problem with using a Spatial Query in a report region
All: I am trying to create a report region using the below query. The query is syntactically correct and returns 10 rows. I have checked it out in SQL Developer AND in APEX SQL Workshop. It returns rows in 1-2 seconds.
However, after putting the query into a report region, the APEX page locks up when it runs. I've tried masking it in a view, using other functions. I can places the spatial function in the select clause and it works. However, placing the function in the Where clause causes the page to lock up.
Any thoughts?
Thanks,
John
select lastname, address
from changetracking.individuals
where sdo_nn (spatiallocation, MDSYS.SDO_GEOMETRY(2001,8265,MDSYS.SDO_POINT_TYPE(-87.55728,33.137569,null),null,null), 'sdo_batch_size=10') = 'TQImaging is not officially supported in the Measurement & Automation (MAX) toolkit, though you may find some luck with our free legacy QImaging LabView interface here: http://www.qimaging.com/support/downloads/software/windows/QCamLabViewInstaller221.exe depending on the version lf LabView you're using.If you're looking for something that is actively updated and supported, you may want to get back in touch with Fred at +1.800.874.9789 and ask about our SITK LabView interface as well.
PMQI_Josh,
Yes I've already installed the LabVIEW interface beforehand. Also the version of LabVIEW I'm currently using is 8.6. I'll get in contact with Fred to see if there's a solution to this problem. Thank you. -
Error when trying to use this query in report region
Hi ,
I am getting "1 error has occurred
Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00933: SQL command not properly ended"
while trying to use this query in reports region .
Pls help.
Thanks ,
Madhuri
declare
x varchar2(32000);
begin
x := q'!select (first_name||' '|| last_name)a ,
count(distinct(session_id)),manager_name
from cappap_log,
MIS_CDR_HR_EMPLOYEES_MV
where DECODE(instr(upper(userid),'@ORACLE.COM',1),0,upper(userid)||'@ORACLE.COM',upper(userid)) = upper(email_address)!';
if :P1_ALL = 'N' then
x:= x||q'!and initcap(first_name ||' '|| last_name)=:P1_USERNAME!';
else
x:= x||q'!and initcap(first_name ||' '|| last_name)like '%'|| :P1_USERNAME||'%'!';
end if;
if :P1_APP_NAME = '%' then
x:= x||q'! and flow_id like '%'!';
else
x:= x||'flow_id = :P1_APP_NAME';
end if;
x:= x||q'! group by first_name||' '|| last_name , manager_name!';
return x;
end;Hi, I am actually stuck here. Can you please let me know which among these is the higher version.
1) Final Release 3.50
Version 3500.3.016
2) Final Release 3.50
Version (Revision 481)
Because it is working fine in the 1st one whereas its throwing that error pop-up in 2nd one(as soon as we select the Change query global definition option) .
Maybe you are looking for
-
Any help would be greatly appreciated. I am new to Mac and am not sure how to get my camcorder to be recognized by ny Mac.
-
I pre-order justin bieber's new album <justin bieber acoustic album> and i can't find it on my itunes or on my ipod. How can i find it and make it appear on my ipod and on my itunes on my laptop? please help! thanks
-
How to use a function key on keyboard for executing a non SAP program
Hello Gurus. My client want to run a non SAP program selecting the specific function key on keyboard during the entering data on SAP. i knew that it is possible to execute a non sap program after adding special program each by SAP program. but, it i
-
Projector can't open a projector
Hi all, I have a projector that I'm using as a menu, when I click buttons on the projector I want to open other projectors and close this menu projector. What is the best way to accomplish this? I tried the following statements before but they only w
-
Corruption on screen recordings - Captivate 6
I am trying to capture some simple data entry screens in Captivate 6. However I keep getting artefacts in the output SWF file .. horizontal lines and the remnants of previous screens text boxes. Have experimented with loads of different settings ...