How to write a javascript function on a report column with type select list
I have a report with a select list column:
HTMLDB_ITEM.SELECT_LIST_FROM_LOV(22, "tablename"."PRIMARY", 'PRIMARY').
The value of primary can be null, yes, no. I want to write a javascript to achieve this: once the user changes one primary value to be yes, others with 'yes' will be changed to 'no' automatically.
Could somebody help me on this.
Thanks.
Jen
Thanks Patrick for your quick reply.
I created a dynamic action with the following steps, but the dynamic action is not taking place.
Event: After Refresh
Selection Type: Region
Region: Report 1 (my report name)
Then in the true action
Action: Execute Javascript SCode
Code: showHighlight();
I even tried to get an alert, but the dynamic action is not done at all. It seems the After refresh dynamic action is not working for a region.
Similar Messages
-
How to call a Javascript function from backing bean without any event
Hi,
Someone knows how to call a Javascript function from backing bean without any event ?
thanksPlease review the following thread:
ADF Faces call javascript
Luis. -
How to write the code to send the report output to the local file.
dear all,
how to write the code to send the report output to the local file.
Thanks & Regards,
Jyothi.Hi,
Try this , it will display report and download the file as well. Just vhange the path and execute
TYPE-POOLS : SLIS.
DATA : IT_SCARR TYPE TABLE OF SCARR,
IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.
SELECT *
FROM SCARR
INTO TABLE IT_SCARR.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
* I_PROGRAM_NAME =
* I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'SCARR'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FCAT
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME =
* IS_LAYOUT =
IT_FIELDCAT = IT_FCAT
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IR_SALV_LIST_ADAPTER =
* IT_EXCEPT_QINFO =
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_SCARR
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
* BIN_FILESIZE =
FILENAME = 'C:\Documents and Settings\sap\Desktop\Hi.xls' " Change path
* FILETYPE = 'ASC'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
CHANGING
DATA_TAB = IT_SCARR
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* NOT_SUPPORTED_BY_GUI = 22
* ERROR_NO_GUI = 23
* others = 24
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
DOCUMENT = 'C:\Documents and Settings\sap\Desktop\Hi.xls' "Change path
* APPLICATION =
* PARAMETER =
* DEFAULT_DIRECTORY =
* MAXIMIZED =
* MINIMIZED =
* SYNCHRONOUS =
* OPERATION = 'OPEN'
* EXCEPTIONS
* CNTL_ERROR = 1
* ERROR_NO_GUI = 2
* BAD_PARAMETER = 3
* FILE_NOT_FOUND = 4
* PATH_NOT_FOUND = 5
* FILE_EXTENSION_UNKNOWN = 6
* ERROR_EXECUTE_FAILED = 7
* SYNCHRONOUS_FAILED = 8
* NOT_SUPPORTED_BY_GUI = 9
* others = 10
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Please Help!!!
How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
January 2014 January
2013 +/-
Region Entry Exit Total Entry Exit Total (Total of Jan2014-Total of Jan2013)
A 2 3
40 5 7 30 40-30= 10What is a table structure? Sorry cannot test it right now..
SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
FROM tbl
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How do I get the function browser to appear when I type an = sign in a cell-The fn browser was working OK and then quit appearing---
I just stumbled onto the answer---The format sidebar must be selected before the function sidebar will appear--Did not see this in the help section--maybe just overlooked it--
-
How to write a shell script to execute a procedure with out parameter
Hi,
How to write a shell script to execute a procedure with out parameter.
here is my procedure
PROCEDURE sample(invar1 VARCHAR2,
invar2 VARCHAR2,
invar3 VARCHAR2,
invar4 VARCHAR2,
ecode out number);
Any example really helpfull
Thanks in advanceOr if we're passing values in, maybe something like:
Test procedure:
CREATE OR REPLACE PROCEDURE p (myin IN VARCHAR2, myout OUT VARCHAR2)
AS
BEGIN
myout :=
CASE myin
WHEN 'A' THEN 'APPLE'
WHEN 'B' THEN 'BANANA'
ELSE 'STARFRUIT'
END;
END;Shell script:
#!/bin/bash
my_shell_variable=$1
unset ORACLE_PATH
sqlplus -s un/pw@db <<-EOF
set feedback off pause off
set pagesize 0
set autoprint off
VAR out varchar2(30)
VAR myin varchar2(30)
exec :myin := '${my_shell_variable}'
BEGIN
p(:myin, :out);
END;
print out
exit
EOFTest:
/Users/williamr: xx A
APPLE
/Users/williamr: xx B
BANANA
/Users/williamr: xx
STARFRUITObviously in a real script you would not hardcode the password or let it show in a "ps" listing.
Message was edited by:
William Robertson -
JavaScript: Disabling textarea in report column cell depending on flag
Hi,
I got an updateable report with the following behavior:
- Depending on the value of column "PFT_PCODE" (1 or 2) the column gets a yellow or red background color.
- If the value of column "PFT_PCODE" is 1 the next column (for remarks) gets a grey background color.
- Some flags get values set.
With the kind help of Andy (ATD) I got that running nicely. See also:
Javascript - Referencing report column value and
JavaScript: Disabling textarea in report column cell
Now I want to add an additional feature:
- If a flag ('P11_SPERR_FLAG') has the value '1' then the column (remarks) (var j) should be disabled.
I tried the following (see additional code between asterisks) but it's not working. I feel a little stupid since I thought that shoud be an easy fix.
Anyone has an idea what's wrong with the additional code? I find debugging quite difficult in JavaScript...
////////////////// PAGE HTM HEADER //////////////
function hilite(f1) {
var ft1 = document.getElementById('P11_FEHLERTYP1_FLAG');
ft1.value = '0';
var ft2 = document.getElementById('P11_FEHLERTYP2_FLAG');
ft2.value = '0';
*var sperrflag = document.getElementById('P11_SPERR_FLAG');*
var h = 0;
if (document.getElementById(f1)) {
h = document.getElementById(f1);
var t = h.parentNode;
while (t.tagName != 'TABLE') {
t = t.parentNode;
var rows = t.rows;
var k;
var i;
var j;
var c;
var headers = t.getElementsByTagName("TH");
for (k = 0; k < headers.length; k++) {
if (headers[k].id == f1) {
c = k;
for (k = 1; k < rows.length; k++) {
i = rows[k].cells[c];
j = rows[k].cells[c+1].getElementsByTagName("TEXTAREA")[0];
*if (sperrflag.value == '1') {*
* j.disabled = 'true';*
if (i.innerHTML == '2') {
i.style.backgroundColor = 'yellow';
i.style.color = 'white';
i.style.fontWeight = 'bold';
i.style.fontSize = '18px';
ft2.value = '1';
if (i.innerHTML == '1') {
i.style.backgroundColor = 'red';
i.style.color = 'white';
i.style.fontWeight = 'bold';
i.style.fontSize = '18px';
j.style.backgroundColor = 'grey';
ft1.value = '1';
//j.disabled = 'true'; //This would work.
////////////////// REGION FOOTER //////////////
<script type="text/javascript">
hilite('PFT_PCODE');
</script>Thank you,
RogerI found the solution, it had nothing to do with JavaScript:
Item P11_SPERR_FLAG was of type Diplay as Text / Doesn't save state.
Without saving state the JavaScript wouldn't work.
Sorry to bother,
Roger -
How to create a index on a column with type clob
how to create a index on a column with type clob
You should have a look to Oracle Text to check if Oracle Text indexing features can meet your needs:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/cncptdev.htm#CNCPT1537 -
How to write a java function for use in where clause in SQL statement
Hi,
Does anyone know a good tutorial on how to write and include a Java class/function into Oracle.
I'd like to write mathematical function to use in my queries, but the resources available in PL/SQL are very limited.
Many thanxPim,
I see you got an answer in the PL/SQL forum.
But in case you haven't seen it, perhaps this Web page will help:
http://www.oracle.com/technology/tech/java/jsp/index.html
Good Luck,
Avi. -
How to execute a javascript function in the body onload?
Hi everyone!
As you know in the HTML body attribute. You must specify the value of onload
What is the correct sintaxis for execute a function since in the onload body?
I only want to do some like this, but only I do it in APEX:
<body onload ="javascript:namefunction();" >
I do not know how to use #ONLOAD# when you using want to set some value.
Could u help me please ?
Any help would be very appreciated.
Thank u in advance
Best RegardsHi Chris
Thank you for your help
I tried with the next code but it doesn´t work.
Do you know for what?
Best Regards
I paste the next code in the HTML Header :
<head>
<script language="JavaScript" type="text/javascript">
function addLoadEvent(func){
var oldonload = window.onload;
if (typeof window.onload != 'function'){
window.onload = func;
else {
window.onload = function() {
oldonload();
func();
function ejecuta()
doSubmit('ACEPTAR_R')
addLoadEvent( ejecuta );
</script>
</head> -
How to call a javascript function from XSL
I'd a requirement to take an action each time a page loads
I called the javascript function from addLoadEvent() available in javascript.
But my reviewer commented that it should be called using XSL as we are using XSLT,
What is preferred?
To pass function name to the already available function or somehow call it from xsl ? if second is preferred option then,
how to call a function through XSLT, if it is to be called aftr the page loads?Thank u..
but i'd seen that link wen i searched in google..
Is it possible without using any 3rd party JARs and all?
and more importantly plz tell me what should be preferred way to call a javascript function?
Do it using addLoadEvent() or Windows.Load etc
OR
Call it thru Xsl? (I donno how to do dis)
Thanks in Advance..
Edited by: ranjjose on Jun 3, 2008 8:21 AM -
How can i call javascript function with out internet connection?
I have trying to call javascript function through ExternalInterface. But flash player recomonding to have internet connectivity. i have allredy used allowscript="always" .
first, allow the folder that contains your flash files to connect to the internet by adjusting your security settings:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
then try the following in a swf and open the published html in your browser to test:
import flash.external.ExternalInterface
ExternalInterface.call("function(){alert('test');}") -
How to write the expression when create the calculated column?
Dear,
I want to create some calculated column in my attribute view, but I don't know how to write the code in the expression, is there any introduction about this part, how to use those function and how about the grammar in this expression code ? or is there any example about this calculated column?
Thanks for your sincerely answer.Hi Zongjie,
you can find some information about the creation of calculated columns in the HANA Modeling Guide (http://help.sap.com/hana/SAP_HANA_Modeling_Guide_for_SAP_HANA_Studio_en.pdf).
Within chapter 6.2.1 (Create Analytic Views) you can see under point 7 some basics and also a simple example. The same is also valid for Calculation Views.
Chapter 8.9 (Using Functions in Expressions) describes the different available functions.
You also can use the integrated search in the HANA Studio by clicking the "?" button in the button left corner. Then you get some links in the side panel with related information.
In general you can write your expression manually or you can just drag and drop the functions, elements, operators into the editor window. For example if you drag and drop the "if" function into the editor window you get "if(intarg,arg2,arg3)" inserted. The arguments can be replaced manually or also by drag and drop.
It is also worse to use the "Validate Syntax" button on top of the editor window. It gives you directly a feedback if your expression syntax is correct. If not you get some helpful information about the problem (ok, sometimes it is a little bit confusing because of the cryptic error message format ).
Best Regards,
Florian -
How to Get SUMCT SUMGT functionality in WEBI reports.
Hello All,
How to get the SUMCT SUMGT functionality in WebI reports using variables/formulates, as these fictions cant be used in Bex if we are developing a BO report on top of that.
We are developing BO WebI reports on top of BeX query. nd we are on BO 4.0
I tried to search in SDN but didnt got any relevant link.
Thanks & Regards
Neeraj.Hello,
Srry for disturbance.
Got the soln for the same. Can be achieved easily using report context.
For more details refer below link.. :
http://www.dagira.com/2010/01/04/calculation-context-part-i-overview/
Neeraj. -
How to implement tool tip functionality in SSRS report
Hi,
I want to implement the tool tip functionality in on report.
Requirement is like this, When ever I have to move my mouse to the
particular below mentioned column the fully qualified name should have to shown in the tool tip.
What are all the thing I have to use to implement on this.
Whether I have to use the java script or anything else.
Please let me know..Hello,
We already have a build-in tooltip functionality in reporting services / report Definition, simply use that:
Olaf Helper
[ Blog] [ Xing] [ MVP]
Maybe you are looking for
-
I want to create a command button for my Numbers spreadsheet.
I am creating a Numbers spreadsheet and need to have a command button. It is really simple in Excel so I assume Numbers would be too. Please advise. Thanks, Hank
-
Applying row-level security to crystal report instance
Hi we have created crystal reports based on sap r/3 data using open sql driver and imposed row level security and published to BOE.The user when opens report with view on demand can see the data which he is supposed to see. Is it possible to schedule
-
Hi, I've got the XI 3.0 installed and also the SP number 09 has been installed.the JDK version is 1.3.1.which version of the JAVA Web Start should i download and from where can i get it dowloaded. Thanks and Regards, Jishi
-
MacBook Pro Crashes due to a USB Printer?
You heard it right. So I needed to print something out over a friend's apartment and one girl had a printer connection via USB. So I thought since Macs are usually "plug and play" to plug in and go. The printer was a Canon Pixma iP3000. Well the prog
-
Can't upgrade CS6 Extended to Camera Raw
I am trying to update CS6 with Camera Raw 8 but it gives me a message that the server is not responding.I am not able to use the Adobe site to download this update so how am I suppose to see Canon 70D raw files? I am running Windows 7.