HELP, SQL report
I created a SQL Report,the report asked me if i would like to add a search feature, i said yes,
the search function queryies ID numbers 1-50,
when i run the application and ask for id number 4; the query responds to id # 4,14, 34,and 44.
If i'm asking for id # 4 shouldn't i get just 4,
why is it giving me these other numbers???
Is there a code that just shows the number i'm asking for???
thanks in advance
jo,
The SQL Report appears to only you to Enable Search on non-key columns of the table and assumes that you are going to search for any porition of the string that you provide in the search item of the page.
You could try altering your SQL and replace the instr line with something like this:
WHERE ( :px_report_search IS NULL
OR UPPER (your_column_name) = UPPER (:px_report_search)
The upper may not be necessary if you are not searching a character string.
Jeff
Similar Messages
-
Please Help - SQL Report long column value required in a separate cell
Hi.
I need to create a SQL report with the structure like below:
Country State City Vertical Business Details (detail desc)
US MA Quincy Healthcare
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
US MA Braintree IT
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
I came through a solution where you can hide/display the long column value in a different cell. But my requirement is that it should be displayed when the page opens and user don;t want to click on a button to see the value. This is mainly for their presentations and printing. so its very annoying for them to click on so many buttons to see the detail desc value for every record. I am new to Java script, Please helpI'm not sure I understand your requirements--are you showing us 2 lines of data, 7 lines, or 9? Do you want the long detail description on the same row, or underneath it?
I'm going to go on the assumption that you're showing us two rows, and that the long descriptions in this example happen to be 3-4 lines long, and that you want the long descriptions underneath the details. In which case, I suggest using "named column" templates. They're a lot easier to use than they appear when you first look at them, so bear with me.
Under "Shared Components", select "Templates", and then click on the yellow Create> button. You're creating a report template, from scratch. On the final page of the wizard, select "Named Column (row template)" for the template type. This will create a rather generic (and useless) template, which you'll have to edit; I don't know why they chose to not send you straight into the editor. When you edit it, you'll see that the only field with a value in it is "Row Template 1", and it's set to:
<tr><td>#1#</td><td>#2#</td><td>#3#</td><td>#4#</td><td>#5#</td></tr>For meeting your requirements with basic functionality, change it to something along the lines of:
<tr><td>#COUNTRY#</td><td>#STATE#</td><td>#CITY#</td><td>#VERT#</td></tr>
<tr><td colspan="4">#DETAILS#</td></tr>Then you'll probably want to put something under Column Heading Template, like:
<tr><td>Country</td><td>State</td><td>City</td><td>Vertical Business</td></tr>
<tr><td colspan="4">Details</td></tr>Apply whatever CSS styles you want to it, of course.
Using the template is straightforward: if your report, chose the template, and make sure your SQL returns values using the column names you specified in your template. Otherwise, you'll see literal "#COUNTRY#" text in your report.
You can get fancy with these, of course, such as applying different styles to alternating rows, but I'll leave this as good enough to get you started (I hope).
-David -
SQL Report with 1 updatable column - help urgent
Hi,
I have a SQL report. I am using collection to store value of selected record by link column.
I have a updatable text item (NULL) in the column. I am able to store that value in the collection.
Any clue?
Code
1. Creating a collection in parent page:
apex_collection.create_or_truncate_collection
(p_collection_name => 'ORDER');
2. Query to populate item rows with option to key 'QTY' before pressing 'Add to Order' link.
select
itemcode,
description,
NULL AS qty,
'Add to Order' add_to_order
from itemtab
3. Made 'QTY' to Text item -- to allow users to key value
4. Created 'hidden & protected' items P1_ITEMCODE, P1_QTY
5. Set values of itemcode, qty in add_to_order link
6. Created a process to add values into collection:
for x in (select * from itemtab where itemcode = :P1_ITEMCODE)
loop
apex_collection.add_member(p_collection_name => 'ORDER',
p_c001 => x.ITEMCODE,
p_c002 => x.DESCRIPTION,
p_c003 => :P1_QTY
end loop;
7. Display value of itemcode, description, qty in report region
select c001, c002, c003
from apex_collections
where collection_name = 'ORDER'
Probem: The value of qty is not being stored in the collection and not appearing in the #7 report. itemcode and description values are fine.
Thanks,
DipDip,
I'm guessing here as I can't see your application, I think your missing the page process to collect the data from your QTY field.
I created a quick demo of what i think your trying to achieve on apex.oracle.com
http://apex.oracle.com/pls/apex/f?p=19923:2
I added this to the html expression on the report Field add to:
<input type="button" onclick="doSubmit(#RANDOM_ID#)" value="Add To" />
Then the page process to collect and set the page item:
DECLARE
l_qty number;
BEGIN
FOR i in 1..APEX_APPLICATION.G_F03.COUNT LOOP
l_qty := nvl(APEX_APPLICATION.G_F03(i),0);
IF l_qty > 0
THEN
:P2_QTY := l_qty;
:P2_RANDOM_ID := :REQUEST;
EXIT;
END IF;
END LOOP;
END;
Let me know if this helps
Mark
Don't forget to mark reply as helpful or correct as this may help others reading this thread in the future!
Edited by: cptbutcher on Mar 25, 2010 10:40 PM -
Urgent help - Updateable column in SQL Report
Hi,
I have a SQL report. The collection is being used to manipulate values.
I have a updatable text item QTY. When someone enter the value of 'QTY' and press
the link 'Add to order', it should store value of QTY to the collection and display same
in another region (SQL Report).
Demo Application: http://apex.oracle.com/pls/apex/f?p=26306:11:2820041747530998
Workspace :ORAAPPS07
User ID :[email protected]
Password :gonena
Key the 'QTY' value in the Page 12 and click on 'Add to Order'.
Problem: The value of QTY is not being populated.
Thanks in Advance.
DipHi,
I have a SQL report. The collection is being used to manipulate values.
I have a updatable text item QTY. When someone enter the value of 'QTY' and press
the link 'Add to order', it should store value of QTY to the collection and display same
in another region (SQL Report).
Demo Application: http://apex.oracle.com/pls/apex/f?p=26306:11:2820041747530998
Workspace :ORAAPPS07
User ID :[email protected]
Password :gonena
Key the 'QTY' value in the Page 12 and click on 'Add to Order'.
Problem: The value of QTY is not being populated.
Thanks in Advance.
Dip -
Pop up text on clicking link on a sql report
Hi
I'm using apex 3.2
I've a sql report like below
taskId(edit) Task_details Notes owner .....
What I want to do is if I click on taskId which is edit link ,pop up text box should open where I can add notes to that row.
How can I achive this?
Thanks in advanceHi,
Take a look at the following blog posts and see if they can help you get what you are looking for (there are sample applications in them showing the functionality):
http://monkeyonoracle.blogspot.com/2010/07/modal-pop-up-with-dynamic-actions.html
http://www.danielmcghan.us/2008/12/popup-in-report.html
Hope that's useful for you.
Regards,
Sergio -
Add Image column in classic sql report to open a pop page
I have sql report I want to add a new column which will have image to click, Once user clicks the image a popup page should open.
Hi Vikram,
Sorry to bother you, I am very new to apex. Here is my sql query for sql report. Can you please help me.
<xmp>select
case
when ISUPPORT_NUMBER is null or ISUPPORT_NUMBER = 'N/A' then '<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Enter SR Number</p></a>'
else '<span style="background-color:red;font-weight:bold">'
|| ISUPPORT_NUMBER
|| '</span>'
end ISUPPORT_NUMBER,
case
when ISUPPORT_NUMBER is not null and ISUPPORT_NUMBER != 'N/A' then '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#FF0000;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
else '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
end MACHINE_NAME,
FUNCTION,
VERSION,
VENDOR_CLUSTER,
case when used_by is null then '<a href="javascript:myFunc2(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc5(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || used_by || '</p></a>'
else used_by
end used_by,
case
when loaned_to is null and ( upper(used_by)=v('APP_USER') or used_by is null) then '<a href="javascript:myFunc(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc6(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || loaned_to || '</p></a>'
else loaned_to
end loaned_to,
LOANED_TO_EXPIRY_DATE,
LOAN_INFO,
decode(SCAN_NAME,null,'<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>','<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>') SCAN_NAME,
USERNAME,
VNC_PASSWORD,
LAST_UPDATED_BY , </xmp>
<b>Here I want to add a image column where I can give a link like above to open popup </b>
from install_dbqa_machines
Edited by: Sivaramaraju on Jun 19, 2012 9:06 AM
Edited by: Sivaramaraju on Jun 19, 2012 9:07 AM
Edited by: Sivaramaraju on Jun 19, 2012 9:08 AM -
Date syntax for MySql query in SQL Reporting Services
I am currently trying to link a mysql Stored Procedure to a Microsoft SQL Reporting Server. It is coming up with a Syntax error. I believe this is down to the
Date_from and Date_to Parameters. The query is below any help would be appreciated
DELIMITER $$
USE `mydb`$$
DROP PROCEDURE IF EXISTS `DTI`$$
CREATE DEFINER=`linkeduser`@`%` PROCEDURE `DTI`(IN date_from DATETIME,
IN date_to DATETIME)
BEGIN
SELECT title,gender,firstname,lastname,address1,town,postcode,dob,IF(co.start_date = '00-00-0000', '', CAST(DATE(co.start_date) AS DATE)) AS 'StartDate'
FROM cf_user AS us
JOIN ca_compliance AS co ON co.user_id = us.user_id
WHERE co.start_date BETWEEN date_from AND date_to;
END$$
DELIMITER ;Hello,
The dataset query runs on the external data source.
In your case, you create a report by retrieve data from MySQL database with a stored procedure. The stored procedure will run on MySQL Server and return the result in the Report designer or Report Builder. To solved this issue, please execute the stored
procedure on the MySQL database and check the syntax error.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Upgrade 2010 to 2013 with SQL Reporting Services
I'm getting ready to upgrade to 2013.
When I run the Test-SPContentDatabase I get:
Category : MissingWebPart
Error : True
UpgradeBlocking : False
Message : WebPart class [ab6d9dad-e23c-ce4f-ff98-f6575a1ccf4c] (class [
Microsoft.ReportingServices.SharePoint.UI.WebParts.ReportView
erWebPart] from assembly
[Microsoft.ReportingServices.SharePoint.UI.WebParts,
Version=10.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91]) is referenced [24] times
in the database [is-sharepoint], but is not installed on the
current farm. Please install any feature/solution which
contains this web part.
Remedy : One or more web parts are referenced in the database
[is-sharepoint], but are not installed on the current farm.
Please install any feature or solution which contains these
web parts.
Locations :
Category : MissingAssembly
Error : True
UpgradeBlocking : False
Message : Assembly
[Microsoft.ReportingServices.SharePoint.UI.ServerPages,
Version=10.50.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91] is referenced in the
database [is-sharepoint], but is not installed on the
current farm. Please install any feature/solution which
contains this assembly.
Remedy : One or more assemblies are referenced in the database
[is-sharepoint], but are not installed on the current farm.
Please install any feature or solution which contains these
assemblies.
Locations :
Category : Configuration
Error : False
UpgradeBlocking : False
Message : The [is.photomask.com] web application is configured with
claims authentication mode however the content database you
are trying to attach is intended to be used against a
windows classic authentication mode.
Remedy : There is an inconsistency between the authentication mode of
target web application and the source web application.
Ensure that the authentication mode setting in upgraded web
application is the same as what you had in previous
SharePoint 2010 web application. Refer to the link
"http://go.microsoft.com/fwlink/?LinkId=236865" for more
information.
Locations :
The first two have to do with reporting services. I'm trying to workout how to go about getting these errors to go away. I don't want to remove SQL reporting or migrate a broken site and fix it later. FYI it does migrate but reporting services
is of course broken.
So what I was wanting to do was to upgrade SQL Reporting Services for SharePoint 2010 from 2008 SQL to 2014 SQL first. This would be in the hopes that it would make the migration to SharePoint 2013 work as the assemblies would change to the proper
version.
Can anyone elaborate on my upgrade path?
I'm still looking up the "Claims Based" authentication thing. I've found an article on how to migrate it so not a big deal. I do wonder however if this is tied to the issue I saw with default.aspx and home.aspx being denied to all users
after I did migrate a content db.
David JenkinsHi David,
The following sections describe the basic steps needed to upgrade or migrate from 2008 versions of Reporting Services SharePoint mode to 2014 version.
SQL Server 2008 R2 to SQL Server 2014
Starting environment: SQL Server 2008 R2, SharePoint 2010.
Ending environment: SQL Server 2014, SharePoint 2010.
In-place upgrade is supported and there is no down time for your SharePoint environment.
Install the SQL Server 2014 version of the Reporting Services add-in for SharePoint on each web front-end in the farm. You can install the add-in by using the SQL Server 2014 installation wizard or by downloading the add-in.
Run SQL Server 2014 installation to upgrade SharePoint mode for each “report server”. The SQL Server installation wizard will install the Reporting Services Service and create a new Service application.
If you also want the ending environment to run SharePoint 2013, you need to complete a database-attach upgrade of the SharePoint 2010 to SharePoint 2013.
For more scenarios information, please refer to:
http://msdn.microsoft.com/en-us/library/ms143747.aspx#bkmk_sharePoint_scenarios
Per the supported combinations of SharePoint and Reported Services Components, I’d recommend you firstly upgrade Reporting Services to 2014, then upgrade SharePoint to 2013.
For more information:
http://msdn.microsoft.com/en-us/library/gg492257.aspx
The link below is the reference for migrating a Reporting Services:
http://msdn.microsoft.com/en-us/library/hh759331.aspx
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
SQL Report not showing data - available in SQL Workshop and SQL Developer
I am having an issue with developing a SQL Report in APEX 3.2.1. I run the code in both SQL developer and SQL Workshop and I get data pulled back (both against my development environment). When I run the same code in a SQL Report region, it returns no data available. Does anyone have any idea what would be causing this? Other regions on the page accessing different tables in the same schema return data without issue. Any help would be appreciated.
Thanks
FreddieCould you explain the last comment a bit more. Here is a bit more info just in case I touch on the info with it. The db schema is BPAMGR, the Workspace is BPAMGR. We use the same schema for all of our reporting. All of our tables are in the same schema. We don't use any tables outside of this schema. Our APEX workspace has been associated to only this schema. The tables are able to be queried by SQL Workshop in the same APEX instance that the report application is under.
Freddie -
Creating tabs for a single SQL report type region
I would like to find a way to use tabs in a single SQL report type region. The problem I have is that there are too many columns to be displayed so the report looks very cluttered. I would like to find a way to assign say columns 1 - 5 to tab 1, 6-10 to tab 2 etc so the user can find the columns they need by simply clicking on the various tabs without having to execute the query again.
I have looked at JQuery tabs but that seems to only be applicable to more or less unrelated regions. I tried to create different regions using the same query with different columns and that kind of works, but the regions don't stay in sync if say the user change the order for column 2 in tab 1, when they click on tab 2 everything displays in a different order.
Another wrinkle is that this is an updatable report so some of the columns are updatable.
I also looked at the hide / display column solution which is described in a few threads and that may also sort of work, but it is also not quite what I am looking for.
Any help is greatly appreciatedDoes anybody know if this can be accomplished using APEX? What I am really looking for is very similar to an old fashioned client / server screen developed using say Oracle Forms. Consider an order line screen where say columns line number, SKU and SKU description is to the left of the tabs so these columns are visible no matter which tab is active. Then the first tab has say pricing information including UOM, quantity, list price, unit selling price, price list. The next tab has say customer information including customer number, name, bill to and ship to addresses. the next tab has say shipping information with say the warehouse, shipping instructions and shipping method.
-
Conditional display in a SQL-Report/Report Region
Hi,
here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
First you have to put the following javascript code in the Page HTML-Header:
<script type="text/javascript">
<!--
// SOURCE
// W:\oracle\PRJ DWLS\javascript.07.js
// Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
// Help (Substitution Strings):
// http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
// HTML Expression:
// <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
function ex_conditional_td
( p_id
, p_rownum
, p_cellnum
var l_td;
l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
// hier die Bedingung definieren
if (true) {
l_td.style.color = '#808080';
} // -- eof ex_conditional_td -- //
// Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
// HTML Expression:
// <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
function ex_conditional_tr
( p_id
, p_rownum
var l_tr; // TABLE.TR
var l_td; // TABLE.TR.TD
if (true) {
l_tr = vd_getRow(p_id, p_rownum);
l_tr.onmouseover = null;
l_tr.onmouseout = null;
for (var i=0; i<l_tr.cells.length; i++) {
l_td = l_tr.cells;
l_td.style.backgroundColor = '#DDDDDD';
} // -- eof ex_conditional_tr() -- //
var g_DEBUG = false;
var g_TBODY = null;
// Liefert das Body-Element der Tabelle mit der ID <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// Return
// das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getBody
( p_id
if (g_TBODY == null) {
var l_table = null;
l_table = document.getElementById( p_id );
if (l_table == null) {
l_table = document.getElementByName( p_id );
if (l_table != null) {
if (vd_debug()) {
alert("Tabelle gefunden, " + l_table.nodeName);
g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
return g_TBODY;
} // -- eof vd_getBody() -- //
// Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// Return
// die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getRow
( p_id
, p_rownum
var l_body = vd_getBody(p_id);
if ( l_body != null
&& l_body.nodeName == 'TBODY'
&& l_body.children[p_rownum].nodeName == 'TR') {
return l_body.children[p_rownum];
else {
return null;
} // -- eof vd_getRow() -- //
// Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
// Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// p_column - der Index der Spalte / Zelle
// Return
// die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
function vd_getColumn
( p_id
, p_rownum
, p_column
var l_tr = vd_getRow(p_id, p_rownum);
if ( l_tr != null
&& l_tr.nodeName == 'TR'
&& l_tr.children.length >= p_column
&& l_tr.children[p_column].nodeName == 'TD') {
return l_tr.children[p_column];
else {
return null;
} // -- eof vd_getColumn() -- //
// Rekursives Suchen nach einem Node.
// Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
// SQL-Report.
// Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
// darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
// Klasse <p_class> befindet.
// Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
// "t10data" formatiert.
// Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
// Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
// selbst ermittelt werden.
// Der Beispielaufruf:
// var l_body;
// var l_node = document.getElementById( 'R112233' );
// l_body = search( l_node, 'TD', 't10data', 'TBODY');
// durchsucht also das mit der Id "R112233" versehene Element [der Report, für
// den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
// die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
// definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
// Parameter
// p_node - das Ausgangselement
// p_searchIn - der Knotenname, der durchsucht werden soll
// [node.nodeName == p_searchIn]
// p_class - der Name der CSS Klasse
// [node.classList[<index>] == p_class
// p_parentName - der Name [node.parentNode.nodeName == p_parentName]
// des Elements, das zurückgeliefert werden soll. Wird als
// p_parentName der Suchname p_searchIn angegeben, wird
// das Element selbst zurückgegeben.
// Return
// das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
function vd_search
( p_node
, p_searchIn
, p_class
, p_parentName
var LN = "vd_search";
var l_element = null;
// DEBUG
if (vd_debug()) {
alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
// 1) der aktuelle Knoten ist der, der durchsucht werden soll
if (p_node.nodeName == p_searchIn) {
if (p_node.classList.length > 0) {
for(var c=0; c<p_node.classList.length; c++) {
if (p_node.classList[c] == p_class) {
// Parent Node dynmisch suchen
l_node = p_node;
if (l_node.nodeName == p_parentName) {
return l_node;
while(l_node != null && l_node.parentNode != null) {
if (l_node.parentNode.nodeName == p_parentName) {
return l_node.parentNode;
else {
l_node = l_node.parentNode;
// 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
// weitersuchen
if (p_node.children.length > 0) {
var i = 0;
while (i<p_node.children.length && l_element==null) {
l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
i++;
return l_element;
} // -- eof vd_search() -- //
// Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
// Return
// true - debug ist eingeschaltet
// false - debug ist ausgeschaltet
function vd_debug()
return g_DEBUG;
-->
</script>
Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
Second is, that you set an static id for your report region. I prefer this structure:
R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
<script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
<script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum
c) the cellnum (here we have to subtract 1 to get the "real" cell index)
The "ex_conditional" functions are just a representation of how to get the row or cell node.
Hope this help a bit.
TomI would use a CASE statement in the select....
each CASE would be an img src tag for a different button if the button is an image.
does that make sense? I can include an example if you would like... -
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! -
Hierarchy indentation problem in the sql report region
I've the following sql statement in sql report region. it works fine by bringing the all the users reporting to a manager correctly. In the sample user table below manager/id are in parent/child relationship.
select id from user_table start with upper(id)=upper(:p332_person_short_id) connect by prior id = manager
user1
user2
user3
where user2 and user3 are reporting to user1.
But I want to give some indentation between the user levels to show the hierarchy clearly in the report as below
user1
user2
user3
I tried with the following statment. It does indent the users correctly but in hierarchy is reversed.
select LPAD(' ',6*(Level-1))|| id "User" from user_table start with upper(id)=upper(:p332_person_short_id) connect by prior id = manager
the output is
user2
user3
user1
Any help is appreciated.I think padding with blanks will not work in HTML. You will have to pad with "Â ".
So, something like this should work:
select replace(lpad('@',6*(level-1),'@'),'@','&nbsp;')||id "User" from ....
Hope that helps
Jochen -
Application Express 4.0.2.00.09
Oracle 11 XE
How do I setup a Dynamic Action to refresh my region every X number of seconds? I can refresh the region easy enough on events, but I can't seem to figure out the timing thing. Maybe I just need some sleep...
AustinJoe -
Interestingly enough, I have not yet found a good way to alter the Report Region title with the last update time. I would think there is a way to do it, but I do not currenlty have that knowledge, nor the time to thoroughly investigate how to do it. I do have a bit to share about the mechanics of the refresh discussed earlier in this thread.
Consider this code, place in the footer of a SQL Report Region:
<script type="text/javascript">
<!--
var d = new Date();
document.write("Last Updated: " + d);
setInterval("jQuery('#INTRADAY_IRR').trigger('apexrefresh');", 2000);
-->This will place the date as a footer to the SQL report. The javascript will then refresh the report every two seconds. (or whatever timeframe you specify) Now, in my SQL for my report, I added an additional column that is the current time. My SQL would look something like:
SELECT foo,
bar,
to_char(sysdate, 'HH24:MI:SS') update_time
FROM dualThis SQL will show when the data was last fetched from the database, while the footer of the region shows the time when the region was loaded by the browser.
If you run the page with these, or similar, parameters, you will notice that the update_time column in the report changes with each refresh, however, the region footer does not change. This is because the script isn't called everytime the data is refreshed. This would indicate that using the methodology mentioned previously in this thread, the entire region is not refreshed but simply the dataset and the report itself. This would mean that you would have a quite difficult time updating the region title from the SQL code alone... I'm not saying it is impossible, I just don't know how to do it...
Having said that- I do have a work around.
Consider this as the region title:
<div id="MyUpdatedReport" ></div>Now consider this code in the region header:
<script type="text/javascript">
function getUpdatedDate() {
var d = new Date();
document.getElementById('MyUpdatedReport').innerHTML="Region Title - Last Updated: " + d;
t=setTimeout('getUpdatedDate()',2000);
</script>And this in the region footer:
<script type="text/javascript">
<!--
setInterval("jQuery('#INTRADAY_IRR').trigger('apexrefresh');", 2000);
getUpdatedDate();
-->
</script>We create a DIV tag as our header. Then we have a function in the header that updates our div tag every two seconds. In the footer, we tell APEX to refresh the data every two seconds, and we tell our function to begin working. Effectively, you have a timestamp indicating when, theoretically, the data should have been refreshed. Now, this timestamp in the Region Title is NOT the true update time, but, theoretically it should be close. You should probably test this to see if you want to use it. Personally, I don't like this solution and I don't think I would ever implement it in any sort of production application. However, in an application that is just for me, I might hack something like this up.
The key part of this work around would be to keep your times synchronized. It would be of no benefit if APEX was refreshing the data every 60 seconds but the title was refreshing every 6 seconds. Yikes, that could confuse a few people.
I hope this has been a help.
Austin -
How to pass a bind variable from one SQL Report to Another
Hello~
I've created a link on one SQL Report page (Page 1). I would like a value from Page 1 used in the SQL on Page 2 to determine the result set. The Where Clause in SQL Query containing the bind variable is as follows:
AND hp.party_name = ':District_Account'
When I run Page 1 and click on the link to execute Page 2, I get 'No Data Found'. The setup of the link is as follows:
Column_Name = District_Account
Link Text = #District_Account#
Target = Page in this application
Page = 2
I'm a rookie working in V1.6...any help would be greatly appreciated!
Thanks,
BeckyI don't see any parameter being passed in that URL. A little sample: http://htmldb.oracle.com/pls/otn/f?p=33203:4<br>
when you click on the edit link the URL looks like this:<br>http://htmldb.oracle.com/pls/otn/f?p=33203:5:16073998852455071705::NO:5:P5_TABLE_NAME,P5_OWNER:PRESIDENTS_THEMES%2CBLUETEST<br><br>
where P5_TABLE_NAME and P5_OWNER are the items and PRESIDENTS_THEMES and CBLUETEST are the values.<br><br>
The SQL on the filtered report looks like:<br>
SELECT *
FROM all_tab_cols
WHERE table_name = :P5_TABLE_NAME
AND owner = :P5_OWNER<BR><BR>
Maybe you are looking for
-
Runtime Error while summing a column in ALV output
Dear All, I have developed an ALV Report and the report is giving output without any flaws. I have defined proper field catalog and displaying the results using REUSE_ALV_GRID function module. Now the report is generating Runtime Error while the user
-
Find header-text in VA01 before save
In a salesorder creation (VA01) I have inserted a text in the header. Goto - header - text. Before saving the document, I need to see if there is any text - and what the text is. The tables are not updated, so I can't make a look-up there. Any sugge
-
HT201269 How do i delete photo albums off of my iphone?
I accidentally added over 7,000 photos onto my phone that i had uploaded to iphoto but obviously i don't need. How do i delete them? I can't do it on my phone or itunes
-
How to create graph through form9i
dear, I mant to know how to create graph in form 9i.Right now i have no idea about graphs use in form9i. please reply me as soon as possible. my mail id is [email protected] If you have any answer related to this problem please mail me in my mail id
-
Device doesn't have a QFS superblock (SBLK)
Hello, I am trying to set up a QFS shared file system between 2 Solaris machines and a SLES 11 SP1 machine. I have downloaded SUN QFS 5.3 and installed it on both Solaris machines and SLES 11 SP1 machine. I have chose one of the Solaris server to be