Passing #COLUMN_VALUE# as parameter to pl/sql function in column template
Hi all,
I want to color negative amounts in red in sql report using column template.
I created a pl/sql function"isNegativeNum" which returns 1 or -1.
create or replace function isNegativeNum(p_column_value varchar2) return number
as
l_dummy number;
begin
l_dummy := to_number(p_column_value,'999G999G990D00PR');
IF l_dummy < 0
THEN
RETURN 1;
else
return -1;
END IF;
exception
when others then
RETURN -1;
end;Below is column template.
Column Template 1
<td class="t3dataalt" #ALIGNMENT#><p color=red>#COLUMN_VALUE#</p></td>Column Template 1 Condition
isNegativeNum('#COLUMN_VALUE#') = -1The issue is #COLUMN_VALUE# value is not being passed to the function, Insert statement in function reveals p_column_value as a string "#COLUMN_VALUE#". When I try without quotes like isNegativeNum(#COLUMN_VALUE#) = -1, I get below error.
ORA-06550: line 1, column 48: PLS-00103: Encountered the symbol "#" when expecting one of the following: ( ) - + case mod new not null others select table avg count current exists max min prior sql stddev sum variance execute multiset the both leading trailing forall merge year month DAY_ hour minute second timezone_hour timezone_minute timezone_region timezone_abbr time timestamp interval date
Error ERR-1025 Error processing PLSQL expression. isNegativeNum(#COLUMN_VALUE#) = 1
Any help is appreciated.
Kishore
Hi Kishore,
using #COLUMN_VALUE# would probably not make much sense, because normally a report has multiple columns and not just the numeric column which you want to verify if it's negative. But APEX will fire the template condition for each column, because the report template is a column cell template.
What you can do to make it more generic is to use for example
#CHECK_AMOUNT#
in the template and provide a not displayed column in your SQL statement which contains your value which is named CHECK_AMOUNT. For example:
SELECT NAME
, BALANCE
, BALANCE AS CHECK_AMOUNT
FROM XXX;Because this CHECK_AMOUNT column would be a generic name, you can use this template in all your reports as long as you provide this column.
Thope that helps
Patrick
Similar Messages
-
Pass a value from a PL/SQL function to a javascript (html header) ? ?
Hey Guys,
Have a question regarding how to pass a value from a PL/SQL function to a javascript in the HTML Header.
I have created a PL/SQL function in my database, which does looping.
The reason for this is: On my apex page when the user selects a code, it should display(or highlight buttons) the different project id's present for that particular code.
example= code 1
has project id's = 5, 6, 7
code 2
has project id's = 7,8
Thank you for your Help or Suggestions
Jesh
The PL/SQL function :
CREATE OR REPLACE FUNCTION contact_details(ACT_CODE1 IN NUMBER) RETURN VARCHAR2 IS
Project_codes varchar2(10);
CURSOR contact_cur IS
SELECT ACT_CODE,PROJECT_ID
FROM ACTASQ.ASQ_CONTACT where ACT_CODE = ACT_CODE1;
currec contact_cur%rowtype;
NAME: contact_details
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 6/25/2009 1. Created this function.
BEGIN
FOR currec in contact_cur LOOP
dbms_output.put_line(currec.PROJECT_ID || '|');
Project_codes := currec.PROJECT_ID|| '|' ||Project_codes;
END LOOP;
RETURN Project_codes;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END contact_details;
/Jesh:
I have made the following modifications to your app to get it to work as I thing you need it to.
1) Changed the source for the HTML Buttons Region(note use of id vs name for the Buttons)
<script>
function hilitebtn(val) {
//gray buttons
$x('graduate').style.backgroundColor='gray'
$x('distance').style.backgroundColor='gray'
$x('career').style.backgroundColor='gray'
$x('photo').style.backgroundColor='gray'
//AJAX call to get project-ids
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=GETPROJECTS',0);
get.addParam('x01',val)
gReturn = get.get();
var arr=gReturn.split(':'); //dump into array
get = null;
for (i=0;i<arr.length;i++) {
// alert('val=' + arr);
if ( arr[i]==5)
$x('graduate').style.backgroundColor='red';
if ( arr[i]==6)
$x('distance').style.backgroundColor='red';
if ( arr[i]==7)
$x('career').style.backgroundColor='red';
if ( arr[i]==8)
$x('photo').style.backgroundColor='red';
</script>
<table cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<input type='button' id='graduate' value='Graduate'>
</td>
<td>
<input type='button' id='distance' value='Distance'>
</td>
<td>
<input type='button' id='career' value='Career/Tech'>
</td>
<td>
<input type='button' id='photo' value='Photos'>
</td>
</tr></table>
2) Defined the application process GETPROJECTS as DECLARE
IDS varchar2(1000);
l_act_code varchar2(100) :=4;
begin
IDS:='';
l_act_code := wwv_flow.g_x01;
for x in(
SELECT ACT_CODE,PROJECT_ID
FROM ASQ_CONTACT
where ACT_CODE = l_act_code)
LOOP
IDS := IDS || X.PROJECT_ID|| ':' ;
END LOOP;
HTP.PRN(IDS);
END;
3) Changed the 'onchange' event-handler on p1_act_code to be 'onchange=hilitebtn(this.value)'
4) Added the JS to the HTML Page Footer <script>
hilitebtn($v('P1_ACT_CODE'));
</SCRIPT> -
Data passed from Java to a PL/SQL function
OK, I am at the beginner-to-intermediate level when it comes to PL/SQL...and a virtual novice when it comes to Java, so please forgive me if my question seems strange or naive.
We are developing a Java-based web app. Some of the screens are reminiscent of a spreadsheet-type layout--potentially LOTS of rows and LOTS of columns (actually, an open-ended # of rows/columns--the rows represent a particular 'thing' and the columns represent the dates on which that 'thing' occurred), where the user can check off any and all the cells that apply. We are also 'auditing' all database activity (who did what to the data, and when). The approach we have chosen is as follows: When the user clicks save, the first thing we do is 'inactivate' all of the existing active rows in the db for that screen, whether or not they have changed(i.e., there is an 'active' flag that we set to false & we also save the user id of the person making the change and the date time of the change). Then the Java code calls the database once per row/contiguous column unit. For instance, on a single row, if the user checks off columns 1-4 and 7-15 and column 21 the Java code will send three calls to the database for that row with info about the start/stop column for each unit.
OK--here is my concern...the majority of the time there will be a reasonably small #of 'units'. Occasionally there will be a moderate, and once in awhile a LARGE # of 'units'. So, let's take an extreme case and say that currently the db has 200 such row/contiguous column units for a given screen. The user goes into that screen and adds the 201st unit, then clicks Save. Java calls the db to first inactivate the 200 rows. Then one by one Java calls the db to add the rows back in, only on row #40, the internet connection is lost. The only way the user can tell what happened is to look at the entire screen and reverify ALL the data in order to tell what got saved/resaved and what didn't. Obviously this is a bad situation that we want to avoid.
I should add that the reason this approach was chosen is that the Java developers thought it would be way too complex in this situation to track the changes the user made on the screen, sort out what has been added/modified/deleted, and only call the db for changes.
So given this background, can anyone offer any suggestions/ideas on how we can prevent unintended data loss given the auditing constraints and concern about minimizing complexity on the Java side (redesigning the GUI screen is NOT an option, as the users are very attached to this design)?
Is there a way for Java to pass a multidimensional (& variable-sized) array to a PL/SQL function? Can Oracle's complex (row, table) data types be used in a function's parameter string, and if so...how?...Or else is there some way we can send a single call to the db on a screen like this one? We thought of calling the db once and sending one very large string packed with all the data (could get very big, not sure of Oracle's limatations on passed data--is it 32K for varchar2? )
Advice, ideas, even random thoughts would be greatly appreciated!Tracy,
<quote>⦠only on row #40, the internet connection is lost. The only way the user can tell what happened is to look at the entire screen and reverify ALL the data in order to tell what got saved/resaved and what didn't</quote>
That would be "the only way" if the Java programmers had decided to totally bury the error ⦠what should happen here is the end-user should get a proper error message ⦠no need to re-verify at this point since all bets are off (in fact, nothing shouldâve been changed in the database).
Nonetheless, your concerns regarding the chosen approach are valid ⦠making multiple calls to the database after a Save makes controlling a business transaction rather complex (in an n-tier system) ⦠they should make one call only to the database passing in all the data to be saved ⦠one database transaction ⦠either all changes get applied or none.
The fact that lots of data may need to be passed in for one Save is of no relevance ⦠if you have to carry 500Kb of data for that screen then, well, you have to do it ⦠1 bucket of 500Kb or 50 buckets of 10Kb? ⦠it doesnât really matter as far as the actual transport part is concerned.
As already answered, one can pass complex types in pl/sql ⦠so one database call per Save would be my first random thought. There are lots of suspect things in here ⦠some things you didnât mentioned at all ⦠like how is concurrency addressed? ⦠have you/they implemented some sort of optimistic locking mechanism? Of course the architecture of your system wonât be solved in a forum ⦠so, finding a good system/data/Oracle architect on site for the project would be my second random thought.
PS. One last random thought ⦠fight off that idea of packing and sending large strings (XML or not) ⦠if the data is structured then contemplate XML for no more than few seconds. -
How to passed an xsl parameter to a javascript function inside an xsl styel
Hi:
I am having problem passing an xsl param variable as a parameter to a javascript function inside an
xsl styelsheet.
Here is my xsl stylesheet.
>
<xsl:param name="numberOfRecordsFromDatabase" select="search-result/rec-num" />
<xsl:template name="Body">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onLoad="cloneHeader();window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>);"
onresize="cloneHeaderResize();window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>);">
</body>
</xsl:template>
I am trying to pass a variable called numberOfRecordsFromDatabase to
a javascript function called window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>).
Is this possible?
If not, is there a way to do this.
Any hint would be greatly appreciated.
Yours,
Frustrated.I would do it like this:
Load the "search-result/rec-num" value into a field within an invisible div tag:
<div id="miscproperties" style="visibility:hidden">
<input id="numberOfRecs" type="text">
<xsl:attribute name="value">
<xsl:value-of select="search-result/rec-num"/>
</xsl:attribute>
</input>
</div>Then, your js function can retrieve the value via
var x = document.getElementById("numberOfRecs").valueR. Grimes -
How to call PL/SQL function inside column in entity
Hello,
How can I do next:
- Crete entity from existing table in database, but one column in the table gets value from function. Function is written in oracle PL/SQL language and it is located inside some package on database.
Application should run LCDS3 and tomcat.
All help is appricitatedAnil,
I'm using LCDS3, and here is what I trying to do (for example):
- I have on Oracle DB table REGION, with columns: Code, State, Population.
- I want to create entity that contains same columns as table REGION (Code, State, Population) and to have addition column RegionName witch get value from PL/SQL function (loacated in package "common" on DB) "common.fgetRegionName(Code)".
Can you explain me how to create that entity.
Thanks
Almir -
Problem with extended SQL functions in RTF Template
Hello,
I'm new to BI Publisher and I'm trying to create a new rtf template. I've created my layout and added fields without any problems, but I'm having trouble trying to insert calculations such as add,substract,multiply,divide, etc.
Here is an example of what I'm trying to do:
<?xdofx:STAFF_ASMT+100?>
Where STAFF_ASMT is one of my fields. When I add this function all I get is the actual value from that field returned on the first page, and then on other pages I get the value plus an extra zero.
So with my example data below I get: 6600 on page 1 and 51830 on page 2. Any ideas on what I'm doing wrong or if it is possible to do what I'm doing? Also, is it possible to add/substract/multiple two or more fields together?
Something like this: <?xdofx:STAFF_ASMT+GROSS_INV?>
I was going to add all of these functions to my SQL statement, but I have 30 or so calculations I want to perform in the layout and I don't want to have to write that all out in SQL.
<ROWSET>
<ROW>
<STAFF_ASMT>6600</STAFF_ASMT>
<GROSS_INV>0</GROSS_INV>
</ROW>
<ROW>
<STAFF_ASMT>5183</STAFF_ASMT>
<GROSS_INV>0</GROSS_INV>
</ROW>
</ROWSET>
Thanks for your helpWhen I tried that I get the following error message when I click the Validate Template option:
[080609_031631893][][ERROR] [Line 162.184] Incorrect XPath: +
And when I try to generate a PDF preview I get:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at RTF2PDF.runRTFto(RTF2PDF.java:629)
at RTF2PDF.runXDO(RTF2PDF.java:439)
at RTF2PDF.main(RTF2PDF.java:289)
Caused by: oracle.xdo.parser.v2.XPathException: Error in expression: './/+'.
at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571) -
How to use the Java objects or methods in pl/sql function as a parameter
dear all,
I java object passed as a parameter in pl/sql. how can i access the java objects as parameter in pl/sql function. please give a soultion to me
mohan reddyI'm not sure whether this would help you.
Have a look at this program to list files from a directory.
CREATE GLOBAL TEMPORARY TABLE DIR_LIST
( FILENAME VARCHAR2(255) )
ON COMMIT DELETE ROWS
Table created.
create or replace
and compile java source named "DirList"
as
import java.io.*;
import java.sql.*;
public class DirList
public static void getList(String directory)
throws SQLException
File path = new File( directory );
String[] list = path.list();
String element;
for(int i = 0; i < list.length; i++)
element = list;
#sql { INSERT INTO DIR_LIST (FILENAME)
VALUES (:element) };
Java created.
SQL>
create or replace
procedure get_dir_list( p_directory in varchar2 )
as language java
name 'DirList.getList( java.lang.String )';
SQL> exec get_dir_list( 'C:\Bhagat' );
PL/SQL procedure successfully completed.
Thanks,
Bhagat -
How to pass a parameter into a sql expression?
How to pass a report parameter into a sql expression?
Hi Donald,
The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
Regards,
Vinay -
Calling pl/sql function from JSP to get data
Hi,
Ideally I want to pass the results of a PL/SQL function or procedure to my JSP page as a resultset or an array.
I've manage to pass all the data as a string like this:
// this works for a function that returns a string
String str;
CallableStatement cstmt = conn.prepareCall("begin ?:= temp_package.pass_string(); end;");
cstmt.registerOutParameter(1,Types.VARCHAR);
cstmt.execute();
str = cstmt.getString(1);
but if I try to pass a collection or Varray or Ref Cursor like this:
// LETS TRY A PROCEDURE THAT ALTERS THE CONTENTS OF AN ARRAY
CallableStatement cstmt = conn.prepareCall(" begin ?:= temp_package.pass_varray(); end;");
cstmt.registerOutParameter(1,Types.ARRAY);
cstmt.execute();
or this:
CallableStatement cstmt = conn.prepareCall(" begin ?:= temp_package.pass_cursor(); end;");
cstmt.registerOutParameter(1,Types.CURSOR);
cstmt.execute();
or this:
CallableStatement cstmt = conn.prepareCall(" begin ?:= temp_package.pass_cursor(); end;");
cstmt.registerOutParameter(1,OracleTypes.CURSOR);
cstmt.execute();
I get an error saying that the type can�t be translated or something similar. It seems happy with VARCHAR but not with ARRAY,VARRAY or CURSOR.
Can anyone help please as this has driven me crazy for hours surfing google and various forums. Thanks.Ok, I made the changes, but I'm now getting the following error:
Error code = 1403
Error message = ORA-01403: no data found
ORA-06512: at "IOBOARD.GETSTATUS", line 6
ORA-06512: at line 1
The ora-01403 I don't understand because there is data for the name Kelly.Brace.
ora-06512 error: at string line string.
Here's what the code looks like after I made the changes:
String sql = "{?=call ioboard.GetStatus(?)}";
// create a Statement object
myStatement = myConnection.prepareCall( sql );
myStatement.setString( 1, "Kelly.Brace" );
myStatement.registerOutParameter(2, java.sql.Types.LONGVARCHAR );
// create a ResultSet object, and populate it with the
// result of a SELECT statement
ResultSet myResultSet = myStatement.executeQuery();
// retrieve the row from the ResultSet using the
// next() method
myResultSet.next();
// retrieve the user from the row in the ResultSet using the
// getString() method
String status = myResultSet.getString(1);
System.out.println("Hello Kelly, your status is: " + status);
// close this ResultSet object using the close() method
myResultSet.close();Here's what the function looks like:
CREATE OR REPLACE FUNCTION GetStatus( user_name in varchar2)
RETURN VARCHAR2
is
v_status varchar2(10);
BEGIN
select iob_location into v_status
from ioboard.iob_user
where iob_username = user_name;
RETURN( v_status);
END;This works perfectly in the SQL Window:
select iob_location
from ioboard.iob_user
where iob_username = 'Kelly.Brace'; -
Passing XML from Java to PL/SQL using CLOBs?
Hi. Here at the University at Buffalo, we're trying to develop an architecture where departments can send XML transactions to the business offices over HTTP. Since we don't have much Java expertise on staff, the boss has decided that we should use PL/SQL wherever possible. To that end, I have a Java servlet that calls PL/SQL stored procedures using JDBC.
My question is this: We anticipate that we will have the need to process documents larger than the limit on VARCHAR2 data. However, unless I am misunderstanding the documentation on working with LOBs, the LOB itself must already exist in the tablespace. How will I take the XML document I receive through the servlet and pass it through to the PL/SQL function which accepts it? This function, FYI, routes documents to various systems based on document type, checks user security, and does a bunch of other things before the XML document is committed to a table.
Is this possible? If there are already resources available that answer my question, can you point me in the right direction?
Thanks in advance,
Craig Drabik
Lead Programmer/Analyst
SUNY at Buffalo
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Craig Drabik ([email protected]):
Hi. Here at the University at Buffalo, we're trying to develop an architecture where departments can send XML transactions to the business offices over HTTP. Since we don't have much Java expertise on staff, the boss has decided that we should use PL/SQL wherever possible. To that end, I have a Java servlet that calls PL/SQL stored procedures using JDBC.
My question is this: We anticipate that we will have the need to process documents larger than the limit on VARCHAR2 data. However, unless I am misunderstanding the documentation on working with LOBs, the LOB itself must already exist in the tablespace. How will I take the XML document I receive through the servlet and pass it through to the PL/SQL function which accepts it? This function, FYI, routes documents to various systems based on document type, checks user security, and does a bunch of other things before the XML document is committed to a table.
Is this possible? If there are already resources available that answer my question, can you point me in the right direction?
Thanks in advance,
Craig Drabik
Lead Programmer/Analyst
SUNY at Buffalo<HR></BLOCKQUOTE>
You has to use temporary CLOB for this purpose.
If you needs some kind of examples I'll sent to you directly the codes.
Best regards, Marcelo.
null -
Parameter passing to custom SQL query using PL/SQL FUNCTION
Hi
In order to pass a parameter to the query in custom folder of a business area I created a function and mapped it to the Custome query using Discoverer Desktop. There is no error in mapping as the system does not throw any error. When I am inputting the Parameter for the input values everytime the query doesnot return any rows.
Can anybody help in this regardHi,
I need to take the request Id as input from the user and then fetch only the data pertaining to that requet Id. As a lot of complex joins are involved I need to pass request id as parameter to the custome folder.
The package i greated:
CREATE OR REPLACE PACKAGE SETPARAM
AS
param1 varchar2(25);
param2 varchar2(25);
FUNCTION SET_PARAM1(p1 IN varchar2) RETURN NUMBER ;
FUNCTION GET_PARAM1 RETURN varchar2;
END SETPARAM;
CREATE OR REPLACE PACKAGE BODY SETPARAM AS
FUNCTION SET_PARAM1(p1 IN varchar2) RETURN NUMBER IS
BEGIN
fnd_client_info.set_org_context('138');
param1 := p1;
dbms_output.put_line(param1);
RETURN 1;
END;
FUNCTION GET_PARAM1 RETURN varchar2 AS
BEGIN
RETURN param1;
END;
END SETPARAM;
I registered the set_param1 function as a pl/sql function in discoverer admin.
This function is called on the condition associated with the parameter in Discoverer Desktop when i run the report.
In the custom folder query i have this piece in the where clause
WHERE tnfo.request_id = NVL(APPS.SETPARAM.GET_PARAM1,7383588)
And everytime i get the data pertaining to request id =7383588,
Please suggest where i went wrong
thanks
Ashwini -
How to call PL/SQL function and pass parameter to ODI variable?
Can I call PL/SQL function and assign a return value to an ODI variable? Also can I assign ODI variable to IN paramter and assign OUT parameter to ODI variable? What ODI doc has that information?
ThanksHi,
Refer this http://odiexperts.com/how-to-use-plsql-procedures-and-functions-in-odi
Thanks,
Sutirtha -
How to debug PL/SQL functions? Passing parameter and debugger error
Hi,
How to debug a PL/SQL function in JDeveloper? There are two problems with it:
1) Don't see how it's possible to pass parameters required by function call (in the dialog opening after Debug -> Debug FUNCTION_NAME)
2) In a function returning table_name%ROWTYPE (and having a record declaration for table_name%ROWTYPE), debug gives error:
PLS-00103: Encountered symbol "/" when expecting one of ... in line
v_Return PL/SQL RECORD;
Debugging procedures works as expected.
Found a similar question without answer here:
Debugging PL/SQL with parametersCheck
http://www.oracle.com/technology/obe/obe9051jdev/plsqlobe/obeplsql.htm#t2
Frank -
Problem with empty report parameters when passed to PL/SQL function
Hi,
We have come across what appears to be a bug in the JRC. When passing a report parameter to a PL/SQL function as a parameter, empty parameters are changed before being sent to the function. More specifically, an empty string "" ends up as the value "(')" in the PL/SQL function parameter. In our report we print the report parameters on the first page so we know that the parameters are OK before being passed to the database.
The problem exists for version 12.2.203, 12.2.204 and 12.2.205 of the JRC.
We have identified a workaround, but it is not exactly elegant: Before executing the report we modify all empty parameters ("") to " " . In the PL/SQL function, we trim all parameters before using them.
We call the function using a command object with a sql syntax like this example:
select * from table (qa_batch_release.get_qa_br('{?p_report_id}','{?p_reg_set_number}','{?p_cr_number}','{?p_change_id_decode}','{?p_country_id}','{?p_mfg_item_no}','{?p_4_no}','{?p_5_no}','{?p_7_no}'))
The PL/SQL function is a table returning function.
Best regards, ThorHi Kishore,
using #COLUMN_VALUE# would probably not make much sense, because normally a report has multiple columns and not just the numeric column which you want to verify if it's negative. But APEX will fire the template condition for each column, because the report template is a column cell template.
What you can do to make it more generic is to use for example
#CHECK_AMOUNT#
in the template and provide a not displayed column in your SQL statement which contains your value which is named CHECK_AMOUNT. For example:
SELECT NAME
, BALANCE
, BALANCE AS CHECK_AMOUNT
FROM XXX;Because this CHECK_AMOUNT column would be a generic name, you can use this template in all your reports as long as you provide this column.
Thope that helps
Patrick -
Invoking PL/SQL function (via DB Adapter) with in parameter (BPEL newbie)
Hi!
Using: JDeveloper: 10.1.3.3.0, OAS: 10.1.3
I'm new to BPEL, and now I have a simple problem:
anyway to pass in parameter value with PL/SQL function call via DB Adapter?
PL/SQL function like this:
>>
create or replace function f_test_bpel (p_in in number)
return number
is
begin
return p_in;
end;
>>
For example (audit part of invoke in BPEL Console. Output always null :( ):
>>
Invoke_F_TEST_BPEL
[2008/01/10 15:51:39] Invoked 2-way operation "F_TEST_BPEL" on partner "F_TEST_BPEL".less
- <messages>
- <Invoke_1_F_TEST_BPEL_InputVariable>
- <part name="InputParameters" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/MYDB/F_TEST_BPEL/">
<P_IN>7</P_IN>
</InputParameters>
</part>
</Invoke_1_F_TEST_BPEL_InputVariable>
- <Invoke_1_F_TEST_BPEL_OutputVariable>
- <part name="OutputParameters" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/MYDB/F_TEST_BPEL/">
<F_TEST_BPEL>
</F_TEST_BPEL>
</OutputParameters>
</part>
<part name="response-headers" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</part>
</Invoke_1_F_TEST_BPEL_OutputVariable>
</messages
>>
RegardsAdding more to what 'Arcturus' has put across :
1) You can check your input & output arguments to a PL/SQL function/procedure using an assign activity, in which you tend to assign a source variable to a target variable.
Here, you can check to see, if the input & output to the DB Adapter are correct, if not, you can always recreate the adapter.
2) You can also check the schema of the PL/SQL function, to check if it has the right inputs & outputs.
It'd be a .xsd file in the format of <SCHEMA_NAME-OF-FUNCTION.xsd> viz. SCOTT_EMPDETAILS.xsd
Maybe you are looking for
-
How do I set Firefox 8 to mark accessed links as read?
Firefox used to indicate which links provided in a search list had been accessed by changing the color in a read link. That seems to have disappeared in Firefox 8. I cannot find a setting to recreate that function.
-
Setting number of rows and columns
How do I set the number of rows and columns of a table, say 2348 rows by 3 columns? Then how do I quickly select the last row? Also, if I enter a formula in row 1 column 2, how do I quickly copy that formula down to row 1435, or to the end of the col
-
Document Description Issue.
Hi All, When I create a document in CV01n and mention some description for that document, the description of the document is stored only in the log in language. e.g. I logged in with EN, then the description of the document will only be stored in EN
-
Before rename database trigger
Hi! I have the following database trigger to catch alter table ... rename to ... statements: CREATE OR REPLACE TRIGGER CHECK_BEFORERENAME BEFORE RENAME ON DATABASE BEGIN END; The problem is it doesn't fire on this statement although the Oracle 9i doc
-
When importing clips to iMovie11 the audio is missing. I have been able to successfully to this in the past and all of the sudden it is not working. Any help to solve the problem would be appreciated. Thank you for your help!