Checkbox representation in reports
Hello,
I would like to know if there is any way to create a second report based on the values selected in first report. I could do the similar work in forms. I use checkboxes to select the records I want and generate a second form based on the values checked in the checkbox.
In reports I could use a hyperlink. But with the hyperlink I am only able to select one record at a time. I would like the user to select any number of records and display any further details about the selected records in a second report.
Please let me know if there is a way around for this problem.
Thank you all in advance for your help.
Rama.
hello,
unfortunatly not in 6i. you might be able to achieve that using the XML output of one report as the input for your second (using the XML-datasource that is provided with Oracle9i reports).
regards,
the oracle reports team --pw
Similar Messages
-
I have question about checkbox in classic report.
I need to choose only one checkbox in every row, hot to ensure that only one checkbox can be checked at same time?
Checkboxes are defined in SQL query as:
apex_item.checkbox(1,msisdn,'UNCHECKED') as clear,
apex_item.checkbox(2,msisdn,'UNCHECKED') as to_analysis,
apex_item.checkbox(3,msisdn,'UNCHECKED') as to_barring
here is the picture:
http://www.deviantpics.com/images/mNgGR.jpg
Tnx!amend your api calls to add onclick event to every checkbox column
apex_item.checkbox(1,msisdn,'UNCHECKED onclick="chkckbox(1,this);"' ) as clear,
apex_item.checkbox(2,msisdn,'UNCHECKED onclick="chkckbox(2,this);"') as to_analysis,
apex_item.checkbox(3,msisdn,'UNCHECKED onclick="chkckbox(3,this);"') as to_barringCreate a javascript function in your page header > Javascript
function chkckbox(pId, pThis) {
//get current row index
var currIndex = $('input[name="f0'+pId+'"]').index(pThis);
if (pThis.checked) {
//simply uncheck other check boxes
if (pId == 1) {
$('select[name="f02"]')[currIndex].checked = false;
$('select[name="f03"]')[currIndex].checked = false;
} else if (pId == 2) {
$('select[name="f01"]')[currIndex].checked = false;
$('select[name="f03"]')[currIndex].checked = false;
} else if (pId == 3) {
$('select[name="f02"]')[currIndex].checked = false;
$('select[name="f03"]')[currIndex].checked = false;
}Please note that I have not tested this code but it should work, if you have any problem just try debugging using console.log -
Sales Representative Commission Report
Hi,
Is there any standard report for Sales Representative Commission Report for Professional services.
regards
ravito my knowledge there is no standard report as such....u need to gather the requirements and develop a new report in SE38.
-
How to make a CheckBox for a report parameter?
Hi,
How to make a CheckBox for a report parameter?
thanxdesign ur parameters forms using forms and call ur report form there
-
How to Disable a Checkbox on a report condionally.
I have a report and I created a checkbox on this report.
I have a button which is associated to the checkbox.
When I check a record an click the button I delete that record.
This all works great.
I want to disable the checkbox based on a condition.
Lets say I cannot delete DEPT rows 20 at all. In this case I want to disable the checkbox and do not allow use to delete these records.
Can anyone help me on this.
I really appreciate your help on this.In your SQL query, you may be able to use a CASE WHEN statement to accomplish this.
SELECT .. CASE WHEN dept_id = 20 THEN <dont display checkbox or show disabled> ELSE <show checkbox> END
Ravi -
I activated the checkbox "Automatically send report to apple" where can I disable it?
I activated the checkbox "Automatically send report to apple" where can I disable it?
I could solved it too on snow leopard 10.6.8. Leave you a copy.
Re: Reactivate Console's "Automatically Send Anonymous Diagnostic and Usage Data to Apple"
07-mar-2012 15:10 (in response to red_menace)
Thanks, red_menace, you were right; after an itunes forced exit, I was asked to create an inform, then to send it to apple and finally to "Automatically Send Anonymous Diagnostic and Usage Data to Apple". I accepted and cheked "Don't ask me again".
Now the Console Preferences check box is ennabled and checked again.
Thank you all for your help. -
Graphical representation of report
hi ..
How do we provide graphical representation of report output.Hi
1st example
report GRAPHICS_GUI_CE_DEMO.
global data
data: G_CE_CONTAINER type ref to CL_GUI_CUSTOM_CONTAINER.
data: G_CE_NEW_CONTAINER type ref to CL_GUI_CUSTOM_CONTAINER.
data: G_CE_VIEWER type ref to CL_GUI_CHART_ENGINE.
data: G_CE_VIEWER_NEW type ref to CL_GUI_CHART_ENGINE.
data: G_IXML type ref to IF_IXML.
data: G_IXML_SF type ref to IF_IXML_STREAM_FACTORY.
data: G_DESIGN_MODE type C.
data: G_VALUE_CHANGE type C.
data: G_SAVE_OKCODE like SY-UCOMM.
dynpro data
data: OKCODE like SY-UCOMM,
GT_SFLIGHT type table of SFLIGHT,
G_REPID like SY-REPID,
G_MAX type I value 100,
MYCONTAINER type SCRFNAME value 'NEW_CONTAINER',
reference to custom container: neccessary to bind ALV Control
CUSTOM_CONTAINER type ref to CL_GUI_CUSTOM_CONTAINER,
GRID1 type ref to CL_GUI_ALV_GRID.
'x_save' contains a flag to control which kind of a layout the user
can save (see below).
'gs_layout' identifies a layout. It must contain
at least the report-id.
§ 1.Declare a structure of type DISVARIANT to identify a layout
and a variable to define the saving options for users.
data: X_SAVE, "for Parameter I_SAVE
GS_LAYOUT type DISVARIANT. "for parameter IS_VARIANT
event handler
class LCL_CE_VIEWER_EH definition.
public section.
methods ON_CLICK for event CLICK of CL_GUI_CHART_ENGINE
importing
ELEMENT SERIES POINT.
methods ON_VALUE_CHANGE for event VALUE_CHANGE of
CL_GUI_CHART_ENGINE
importing
SERIES POINT VALUE.
methods ON_PROPERTY_CHANGE for event PROPERTY_CHANGE of
CL_GUI_CHART_ENGINE
importing
ELEMENT NAME VALUE.
endclass. "lcl_ce_viewer_eh DEFINITION
data: G_CE_VIEWER_EH type ref to LCL_CE_VIEWER_EH.
data: G_CE_VIEWER_EH_NEW type ref to LCL_CE_VIEWER_EH.
entry point
start-of-selection.
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
start-of-selection.
select * from SFLIGHT into table GT_SFLIGHT up to G_MAX rows.
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clear GS_LAYOUT.
create global objects
G_IXML = CL_IXML=>CREATE( ).
G_IXML_SF = G_IXML->CREATE_STREAM_FACTORY( ).
G_REPID = SY-REPID.
§ 2.At least field REPORT of this structure has to be filled!
GS_LAYOUT-REPORT = G_REPID.
X_SAVE = 'A'. "The user may save all types of a layout
call screen '100'.
ENDREPORT GRAPHICS_GUI_CE_DEMO.
*& Module STATUS_0100 OUTPUT
text
module STATUS_0100 output.
data: L_IXML_DATA_DOC type ref to IF_IXML_DOCUMENT,
L_IXML_CUSTOM_DOC type ref to IF_IXML_DOCUMENT,
L_OSTREAM type ref to IF_IXML_OSTREAM,
L_XSTR type XSTRING.
set pf-status '100'.
if G_CE_CONTAINER is initial.
create object G_CE_CONTAINER
exporting
CONTAINER_NAME = 'CONTAINER'.
create object G_CE_VIEWER
exporting
PARENT = G_CE_CONTAINER.
create object G_CE_VIEWER_EH.
set handler G_CE_VIEWER_EH->ON_CLICK for G_CE_VIEWER.
set handler G_CE_VIEWER_EH->ON_VALUE_CHANGE for G_CE_VIEWER.
set handler G_CE_VIEWER_EH->ON_PROPERTY_CHANGE for G_CE_VIEWER.
perform CREATE_DATA_DEMO using L_IXML_DATA_DOC.
L_OSTREAM = G_IXML_SF->CREATE_OSTREAM_XSTRING( L_XSTR ).
call method L_IXML_DATA_DOC->RENDER
exporting
OSTREAM = L_OSTREAM.
G_CE_VIEWER->SET_DATA( XDATA = L_XSTR ).
clear L_XSTR.
perform CREATE_CUSTOM_DEMO using L_IXML_CUSTOM_DOC.
L_OSTREAM = G_IXML_SF->CREATE_OSTREAM_XSTRING( L_XSTR ).
call method L_IXML_CUSTOM_DOC->RENDER
exporting
OSTREAM = L_OSTREAM.
G_CE_VIEWER->SET_CUSTOMIZING( XDATA = L_XSTR ).
endif.
call method G_CE_VIEWER->RENDER.
if CUSTOM_CONTAINER is initial.
create a custom container control for our ALV Control
create object CUSTOM_CONTAINER
exporting
CONTAINER_NAME = MYCONTAINER
exceptions
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
if SY-SUBRC ne 0.
add your handling, for example
call function 'POPUP_TO_INFORM'
exporting
TITEL = G_REPID
TXT2 = SY-SUBRC
TXT1 = 'The control could not be created'(510).
endif.
create object GRID1
exporting I_PARENT = CUSTOM_CONTAINER.
§ 4.Transfer your structure and your variable using parameters
IS_VARIANT and I_SAVE of method set_table_for_first_display.
call method GRID1->SET_TABLE_FOR_FIRST_DISPLAY
exporting
I_STRUCTURE_NAME = 'SFLIGHT'
IS_VARIANT = GS_LAYOUT "&see below
I_SAVE = X_SAVE "&see below
I_DEFAULT = 'X'
changing
IT_OUTTAB = GT_SFLIGHT.
& If you leave out the these parameters, the menu beneath
the layout icon disappears.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
module USER_COMMAND_0100 input.
G_SAVE_OKCODE = OKCODE.
clear OKCODE.
case G_SAVE_OKCODE.
when 'DESIGN'.
perform TOGGLE_DESIGN_MODE.
when 'VALUE'.
perform TOGGLE_VALUE_CHANGE.
when 'SAVE'.
perform SAVE_CUSTOMIZING.
when 'PRINT'.
perform PRINT.
when 'EXIT'.
leave program.
when 'BACK'.
leave program.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
*& IMPLEMENTATION
text
class CL_ABAP_CHAR_UTILITIES definition load.
*& Form create_data_demo
text
form CREATE_DATA_DEMO using P_IXML_DOC type ref to IF_IXML_DOCUMENT.
data: L_SIMPLECHARTDATA type ref to IF_IXML_ELEMENT,
L_CATEGORIES type ref to IF_IXML_ELEMENT,
L_SERIES type ref to IF_IXML_ELEMENT,
L_ELEMENT type ref to IF_IXML_ELEMENT,
L_ENCODING type ref to IF_IXML_ENCODING.
P_IXML_DOC = G_IXML->CREATE_DOCUMENT( ).
L_ENCODING = G_IXML->CREATE_ENCODING(
BYTE_ORDER = IF_IXML_ENCODING=>CO_LITTLE_ENDIAN
CHARACTER_SET = 'utf-8' ).
P_IXML_DOC->SET_ENCODING( L_ENCODING ).
L_SIMPLECHARTDATA = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'SimpleChartData' PARENT = P_IXML_DOC ).
L_CATEGORIES = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Categories' PARENT = L_SIMPLECHARTDATA ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'C' PARENT = L_CATEGORIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '1st quarter' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'C' PARENT = L_CATEGORIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '2nd quarter' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'C' PARENT = L_CATEGORIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '3rd quarter' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'C' PARENT = L_CATEGORIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '4th quarter' ).
L_SERIES = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Series' PARENT = L_SIMPLECHARTDATA ).
L_SERIES->SET_ATTRIBUTE( NAME = 'label' VALUE = 'Coffee' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '94' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '110' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '139' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '192' ).
L_SERIES = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Series' PARENT = L_SIMPLECHARTDATA ).
L_SERIES->SET_ATTRIBUTE( NAME = 'label' VALUE = 'Espresso' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '35' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '39' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '38' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'S' PARENT = L_SERIES ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '59' ).
endform. " create_data_demo
*& Form create_custom_demo
text
form CREATE_CUSTOM_DEMO using P_IXML_DOC type ref to IF_IXML_DOCUMENT.
data: L_ROOT type ref to IF_IXML_ELEMENT,
L_GLOBALSETTINGS type ref to IF_IXML_ELEMENT,
L_DEFAULT type ref to IF_IXML_ELEMENT,
L_ELEMENTS type ref to IF_IXML_ELEMENT,
L_CHARTELEMENTS type ref to IF_IXML_ELEMENT,
L_TITLE type ref to IF_IXML_ELEMENT,
L_ELEMENT type ref to IF_IXML_ELEMENT,
L_ENCODING type ref to IF_IXML_ENCODING.
P_IXML_DOC = G_IXML->CREATE_DOCUMENT( ).
L_ENCODING = G_IXML->CREATE_ENCODING(
BYTE_ORDER = IF_IXML_ENCODING=>CO_LITTLE_ENDIAN
CHARACTER_SET = 'utf-8' ).
P_IXML_DOC->SET_ENCODING( L_ENCODING ).
L_ROOT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'SAPChartCustomizing' PARENT = P_IXML_DOC ).
L_ROOT->SET_ATTRIBUTE( NAME = 'version' VALUE = '1.1' ).
L_GLOBALSETTINGS = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'GlobalSettings' PARENT = L_ROOT ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'FileType' PARENT = L_GLOBALSETTINGS ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( 'PNG' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Dimension' PARENT = L_GLOBALSETTINGS ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( 'PseudoThree' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Width' PARENT = L_GLOBALSETTINGS ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '640' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Height' PARENT = L_GLOBALSETTINGS ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( '360' ).
L_DEFAULT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Defaults' PARENT = L_GLOBALSETTINGS ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'FontFamily' PARENT = L_DEFAULT ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( 'Arial' ).
L_ELEMENTS = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Elements' PARENT = L_ROOT ).
L_CHARTELEMENTS = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'ChartElements' PARENT = L_ELEMENTS ).
L_TITLE = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Title' PARENT = L_CHARTELEMENTS ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Extension' PARENT = L_TITLE ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( 'href="sapevent:onclick?Title"' ).
L_ELEMENT = P_IXML_DOC->CREATE_SIMPLE_ELEMENT(
NAME = 'Caption' PARENT = L_TITLE ).
L_ELEMENT->IF_IXML_NODE~SET_VALUE( 'Caffeine Consumption' ).
endform. " create_custom_demo
*& Form toggle_design_mode
text
form TOGGLE_DESIGN_MODE .
data: L_WIN_CHART type ref to CL_GUI_CHART_ENGINE_WIN.
catch system-exceptions MOVE_CAST_ERROR = 1.
L_WIN_CHART ?= G_CE_VIEWER->GET_CONTROL( ).
endcatch.
if SY-SUBRC is initial.
if G_DESIGN_MODE is initial.
G_DESIGN_MODE = 'X'.
else.
G_DESIGN_MODE = ' '.
endif.
L_WIN_CHART->SET_DESIGN_MODE( FLAG = G_DESIGN_MODE EVENT = 'X' ).
L_WIN_CHART->RESTRICT_CHART_TYPES( CHARTTYPES = 'Columns|Lines' ).
L_WIN_CHART->RESTRICT_PROPERTY_EVENTS( EVENTS = 'ChartType' ).
endif.
endform. " toggle_design_mode
*& Form toggle_value_change
text
form TOGGLE_VALUE_CHANGE .
data: L_WIN_CHART type ref to CL_GUI_CHART_ENGINE_WIN.
catch system-exceptions MOVE_CAST_ERROR = 1.
L_WIN_CHART ?= G_CE_VIEWER->GET_CONTROL( ).
endcatch.
if SY-SUBRC is initial.
if G_VALUE_CHANGE is initial.
G_VALUE_CHANGE = 'X'.
L_WIN_CHART->ENABLE_VALUE_CHANGE( ).
else.
G_VALUE_CHANGE = ' '.
L_WIN_CHART->DISABLE_VALUE_CHANGE( ).
endif.
endif.
endform. " toggle_value_change
*& Form save_customizing
text
form SAVE_CUSTOMIZING .
data: L_XML_CUSTOMIZING type W3HTMLTABTYPE,
L_WIN_CHART type ref to CL_GUI_CHART_ENGINE_WIN,
L_FILENAME type STRING,
L_FILEPATH type STRING,
L_FILESIZE type I,
L_PATH type STRING.
catch system-exceptions MOVE_CAST_ERROR = 1.
L_WIN_CHART ?= G_CE_VIEWER->GET_CONTROL( ).
endcatch.
if SY-SUBRC is initial.
L_WIN_CHART->GET_CUSTOMIZING(
importing
DATA_TABLE = L_XML_CUSTOMIZING
describe table L_XML_CUSTOMIZING lines L_FILESIZE.
multiply L_FILESIZE by 255.
L_FILENAME = 'customizing.xml'.
call method CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
exporting
DEFAULT_FILE_NAME = L_FILENAME
changing
FILENAME = L_FILENAME
PATH = L_PATH
FULLPATH = L_FILEPATH.
if not L_FILEPATH is initial.
call method CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
exporting
FILETYPE = 'BIN'
FILENAME = L_FILEPATH
BIN_FILESIZE = L_FILESIZE
changing
DATA_TAB = L_XML_CUSTOMIZING
exceptions
FILE_WRITE_ERROR = 1
others = 22.
endif.
endif.
endform. " save_customizing
*& Form print
text
form PRINT .
data: L_WIN_CHART type ref to CL_GUI_CHART_ENGINE_WIN,
L_S_PRINT_PARAMETERS type PRI_PARAMS.
call function 'GET_PRINT_PARAMETERS'
exporting
DESTINATION = 'LOCL'
MODE = 'CURRENT'
NO_DIALOG = ''
importing
OUT_PARAMETERS = L_S_PRINT_PARAMETERS
VALID = L_VALID
exceptions
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
others = 4.
if SY-SUBRC <> 0.
BREAK USCGXS22.
endif.
catch system-exceptions MOVE_CAST_ERROR = 1.
L_WIN_CHART ?= G_CE_VIEWER->GET_CONTROL( ).
endcatch.
if SY-SUBRC is initial.
new-page print on parameters L_S_PRINT_PARAMETERS no dialog.
L_WIN_CHART->PRINT( ).
new-page print off.
endif.
endform. " print
*& Clas lcl_ce_viewer_eh
text
class LCL_CE_VIEWER_EH implementation.
method ON_CLICK.
data: L_MSG type STRING,
L_SERIES type STRING,
L_POINT type STRING.
L_SERIES = SERIES.
L_POINT = POINT.
concatenate 'Element clicked:'(M01) ELEMENT
'Series:'(T01) L_SERIES
'Point:'(T02) L_POINT
into L_MSG separated by SPACE.
message L_MSG type 'S'.
endmethod. "on_click
method ON_VALUE_CHANGE.
data: L_MSG type STRING,
L_SERIES type STRING,
L_POINT type STRING,
L_VALUE type STRING.
L_SERIES = SERIES.
L_POINT = POINT.
L_VALUE = VALUE.
concatenate 'Value changed:'(M02)
'Series:'(T01) L_SERIES
'Point:'(T02) L_POINT
'Value:'(T03) L_VALUE
into L_MSG separated by SPACE.
message L_MSG type 'S'.
endmethod. "on_value_change
method ON_PROPERTY_CHANGE.
data: L_MSG type STRING.
concatenate 'Property changed:'(M03)
'Element:'(T04) ELEMENT
'Name:'(T05) NAME
'Value:'(T03) VALUE
into L_MSG separated by SPACE.
message L_MSG type 'S'.
endmethod. "on_property_change
endclass. "lcl_ce_viewer_eh IMPLEMENTATION
2nd Example:
REPORT zmar_graphics .
This program illustrates a call to SAP Business Graphics. *
Each row in the DATA table contains one text label and a *
single numeric value. *
DATA: BEGIN OF data OCCURS 1,
text(25),
value TYPE p,
END OF data.
DATA: tcol1(5) VALUE '#1991'.
DATA: title(25) VALUE 'Sales'.
SET PF-STATUS 'GRAF'.
data-text = 'Product_1'.
data-value = 153470.
APPEND data.
data-text = 'Product_2'.
data-value = 253150.
APPEND data.
data-text = 'Product_3'.
data-value = 53470.
APPEND data.
data-text = 'Product_4'.
data-value = 182000.
APPEND data.
data-text = 'Product_5'.
data-value = 92410.
APPEND data.
WRITE: / 'Products',22 tcol1.
SKIP 2.
LOOP AT data.
WRITE: / data-text, 12 data-value.
ENDLOOP.
PF11: Put out a 2D graphic *
AT PF11.
CALL FUNCTION 'GRAPH_2D'
EXPORTING
titl = title
TABLES
data = data.
2nd Example:
REPORT zmar_graphics1.
Data for 2D-Modification
DATA: BEGIN OF data OCCURS 1,
text(25),
value TYPE p,
END OF data.
DATA: tcol1(5) VALUE '#1993'.
DATA: title(25) VALUE 'Merchandise 1993'.
DATA: tit2(10) VALUE 'Product'.
DATA: mod_row(5), mod_col(5), mod_val(20).
DATA: m_typ, b_typ, busg_stat.
FIELD-SYMBOLS: .
data-text = 'Refrigerators'.
data-value = 12345.
APPEND data.
data-text = 'Freezers'.
data-value = 22222.
APPEND data.
data-text = 'Ovens'.
data-value = 11111.
APPEND data.
data-text = 'Dishwashers'.
data-value = 54321.
APPEND data.
PERFORM output_2d.
AT PF08.
busg_stat = space. "// start and wait
Event-Loop
DO.
CALL FUNCTION 'GRAPH_2D'
EXPORTING
stat = busg_stat
inform = '7' "// allow modify
mail_allow = 'X' "// allow mail
IMPORTING
m_typ = m_typ
b_typ = b_typ
mod_row = mod_row
mod_col = mod_col
mod_val = mod_val
TABLES
data = data.
busg_stat = '4'. "// Just wait next time
CASE m_typ.
WHEN 'D'. "// Programm ended
EXIT.
WHEN 'I'. "// Valid message
IF b_typ = 'M'. "// Modify-event
READ TABLE data INDEX mod_row.
ASSIGN COMPONENT mod_col OF STRUCTURE data TO = mod_val.
MODIFY data INDEX mod_row.
ENDIF.
IF b_typ = 'S'. "// Select-event (ignored)
ENDIF. "// For element (MOD_ROW-MOD_COL)
ENDCASE.
ENDDO.
PERFORM output_2d.
FORM OUTPUT_2D (Show the actual data)
FORM output_2d.
WRITE: / 'Products',22 tcol1.
SKIP 2.
LOOP AT data.
WRITE: / data-text, 22 data-value.
ENDLOOP.
ENDFORM.
3rd Example:
REPORT zmar_graphics3.
DATA: BEGIN OF hpgl OCCURS 1,
entry(128),
END OF hpgl.
hpgl = 'SP6;PUPA0,0;'. APPEND hpgl.
hpgl = 'PDPA100,100,100,200,200,200,200,100,100,100;'. APPEND hpgl.
hpgl = 'SP1;PUPA100,150;'. APPEND hpgl.
hpgl = 'PDPA100,150,150,200,200,150,150,100,100,150;'. APPEND hpgl.
CALL FUNCTION 'GRAPH_HPGL'
TABLES
data = hpgl.
4th Example:
REPORT zmar_graphics4.
DATA: BEGIN OF objt OCCURS 1. "// Object Attributes
INCLUDE STRUCTURE gpoobjt.
DATA: END OF objt.
DATA: BEGIN OF area_tab OCCURS 1. "// Areas (unused)
INCLUDE STRUCTURE gpoarea.
DATA: END OF area_tab.
DATA: BEGIN OF col_text OCCURS 1, "// Value columns
c(40),
END OF col_text.
DATA: BEGIN OF values OCCURS 1, "// Object fields
p1 TYPE p,
p2 TYPE p,
p3 TYPE p,
p4 TYPE p,
p5 TYPE p,
p6 TYPE p,
p7 TYPE p,
p8 TYPE p,
p9 TYPE p,
END OF values.
DATA: BEGIN OF axis OCCURS 4.
INCLUDE STRUCTURE gpoaxis.
DATA: END OF axis.
DATA save LIKE sy-tabix.
SET PF-STATUS 'GRAF'.
Constraints: Number of VALUES rows == Number of OBJT rows
: Num of VALUES columns == Number of COL_TEXT rows
Column title for $OBJD::VALTIT
col_text = '% Market share'. APPEND col_text.
col_text = '% Growth'. APPEND col_text.
col_text = 'Sales'. APPEND col_text.
col_text = 'Market share trend'. APPEND col_text.
col_text = 'Growth trend'. APPEND col_text.
col_text = 'Fixed costs'. APPEND col_text.
col_text = 'Overhead costs'. APPEND col_text.
col_text = 'Admin. costs'. APPEND col_text.
col_text = 'Estimated profits'. APPEND col_text.
Attributes for $AXIS
axis-pos = 'RIGHT'.
axis-backclr = 'DARKGRAY'.
axis-textclr = 'WHITE'.
axis-scalclr = 'WHITE'.
axis-shadow = 'N'.
axis-ticks = '50'.
axis-start = '0'.
axis-end = '100'.
APPEND axis.
axis-pos = 'TOP'.
axis-backclr = 'DARKGRAY'.
axis-textclr = 'WHITE'.
axis-scalclr = 'WHITE'.
axis-shadow = space.
axis-ticks = '50'.
axis-start = '0'.
axis-end = '100'.
APPEND axis.
axis-pos = 'LEFT'.
axis-backclr = 'DARKGRAY'.
axis-textclr = 'WHITE'.
axis-scalclr = 'WHITE'.
axis-shadow = 'N'.
axis-ticks = '10'.
axis-start = '0'.
axis-end = '100'.
APPEND axis.
axis-pos = 'BOTTOM'.
axis-backclr = 'DARKGRAY'.
axis-textclr = 'WHITE'.
axis-scalclr = 'WHITE'.
axis-shadow = 'N'.
axis-ticks = '50'.
axis-start = '0'.
axis-end = '100'.
APPEND axis.
Objects
*BJT-LINECLR = 'WHITE'.
1. Trend line
objt-form = 'RECTANGLE'.
objt-fillclr = 'YELLOW'.
objt-textclr = 'BLUE'.
objt-title = 'Clarion 1990'.
objt-info = 'Sales in 1990'.
values-p1 = 10.
values-p2 = 20.
values-p3 = 10000.
values-p4 = 22.
values-p5 = 22.
values-p6 = 400.
values-p7 = 300.
values-p8 = 200.
values-p9 = 100.
APPEND objt.
APPEND values.
objt-form = 'RECTANGLE'.
objt-fillclr = 'YELLOW'.
objt-textclr = 'BLUE'.
objt-title = 'Clarion 1991'.
objt-info = 'Sales in 1991'.
values-p1 = 22.
values-p2 = 22.
values-p3 = 15000.
values-p4 = 45.
values-p5 = 35.
values-p6 = 100.
values-p7 = 200.
values-p8 = 300.
values-p9 = 400.
APPEND objt.
APPEND values.
objt-form = 'RECTANGLE'.
objt-fillclr = 'YELLOW'.
objt-textclr = 'BLUE'.
objt-title = 'Clarion 1992'.
objt-info = 'Sales in 1992'.
values-p1 = 45.
values-p2 = 35.
values-p3 = 22000.
values-p4 = 62.
values-p5 = 33.
values-p6 = 20.
values-p7 = 40.
values-p8 = 80.
values-p9 = 160.
APPEND objt.
APPEND values.
objt-form = 'RECTANGLE'.
objt-fillclr = 'YELLOW'.
objt-textclr = 'BLUE'.
objt-title = 'Clarion 1993'.
objt-info = 'Sales in 1993'.
values-p1 = 62.
values-p2 = 33.
values-p3 = 12000.
values-p4 = 62.
values-p5 = 33.
values-p6 = 600.
values-p7 = 700.
values-p8 = 600.
values-p9 = 700.
APPEND objt.
APPEND values.
2. Trend line
objt-form = 'CIRCLE'.
objt-fillclr = 'GREEN'.
objt-textclr = 'BLUE'.
objt-title = 'Sony 1988'.
objt-info = 'Sony UX400/CD, Sales in 1988'.
values-p1 = 2.
values-p2 = 50.
values-p3 = 2500.
values-p4 = 26.
values-p5 = 57.
values-p6 = 100.
values-p7 = 700.
values-p8 = 20.
values-p9 = 50.
APPEND objt.
APPEND values.
objt-form = 'CIRCLE'.
objt-fillclr = 'GREEN'.
objt-textclr = 'BLUE'.
objt-title = 'Sony 1989'.
objt-info = 'Sony UX400/CD, Sales in 1989'.
values-p1 = 26.
values-p2 = 57.
values-p3 = 3500.
values-p4 = 58.
values-p5 = 70.
values-p6 = 100.
values-p7 = 600.
values-p8 = 20.
values-p9 = 70.
APPEND objt.
APPEND values.
objt-form = 'CIRCLE'.
objt-fillclr = 'GREEN'.
objt-textclr = 'BLUE'.
objt-title = 'Sony 1990'.
objt-info = 'Sony UX400/CD, Sales in 1990'.
values-p1 = 58.
values-p2 = 70.
values-p3 = 11000.
values-p4 = 79.
values-p5 = 68.
values-p6 = 100.
values-p7 = 500.
values-p8 = 25.
values-p9 = 90.
APPEND objt.
APPEND values.
objt-form = 'CIRCLE'.
objt-fillclr = 'GREEN'.
objt-textclr = 'BLUE'.
objt-title = 'Sony 1991'.
objt-info = 'Sony UX400/CD, Sales 1991'.
values-p1 = 79.
values-p2 = 68.
values-p3 = 13000.
values-p4 = 87.
values-p5 = 54.
values-p6 = 100.
values-p7 = 430.
values-p8 = 45.
values-p9 = 120.
APPEND objt.
APPEND values.
objt-form = 'CIRCLE'.
objt-fillclr = 'GREEN'.
objt-textclr = 'BLUE'.
objt-title = 'Sony 1992'.
objt-info = 'Sony UX400/CD, Sales in 1992'.
values-p1 = 87.
values-p2 = 54.
values-p3 = 13500.
values-p4 = 80.
values-p5 = 34.
values-p6 = 90.
values-p7 = 390.
values-p8 = 44.
values-p9 = 150.
APPEND objt.
APPEND values.
objt-form = 'CIRCLE'.
objt-fillclr = 'GREEN'.
objt-textclr = 'BLUE'.
objt-title = 'Sony 1993'.
objt-info = 'Sony UX400/CD, Sales in 1993'.
values-p1 = 80.
values-p2 = 34.
values-p3 = 23000.
values-p4 = 80. "// Line to itself
values-p5 = 34.
values-p6 = 90.
values-p7 = 370.
values-p8 = 47.
values-p9 = 165.
APPEND objt.
APPEND values.
area_tab-form = 'RECTANGLE'.
area_tab-fillclr = 'RED'.
area_tab-xfrom = '10'.
area_tab-yfrom = '70'.
area_tab-xto = '40'.
area_tab-yto = '90'.
area_tab-title = 'Winner takes all'.
APPEND area_tab.
LOOP AT objt.
WRITE: / objt-title(20).
save = sy-tabix.
READ TABLE values INDEX save.
WRITE 25 values-p3.
ENDLOOP.
AT PF11.
CALL FUNCTION 'GRAPH_PORT'
EXPORTING
title_title = 'Trend-Portfolio for Sony and Clarion Radio'
title_info = 'The two objects over several years'
title_textclr = 'YELLOW'
title_backclr = 'DARKGRAY'
title_size = '2'
frm_backclr = 'GRAY'
frm_cordclr = 'WHITE'
frm_scalclr = 'WHITE'
frm_scalmod = 'LONGDASH'
frm_gridx = '10'
frm_gridy = '10'
frm_shadow = 'X'
obj_xval = '0'
obj_yval = '1'
obj_sval = '2'
obj_xarr = '3'
obj_yarr = '4'
TABLES
axis = axis
col_text = col_text
objt = objt
values = values
area_tab = area_tab.[/code]
Reward if usefull -
Problem with checkboxes in IR report mainly for update process please help
Hello,
Can anyone please help me out with this issue.
I have an interactive report with 3 checkbox item for a single column named status. Based on the value of the column status the check box should be checked. For example:
DECODE(status,'DEV',1,0) as DEV,
DECODE(status,'RVW',1,0) as RVW,
DECODE(status,'PRD',1,0) as PROD,
So for this I have used the apex_item.checkbox item. Below is my report query
SELECT APEX_ITEM.HIDDEN(30,0,'','f30_' || ROWNUM)
|| APEX_ITEM.HIDDEN(31,0,'','f31_' || ROWNUM)
|| APEX_ITEM.HIDDEN(01,ROWNUM,'','f01_' || ROWNUM)
|| APEX_ITEM.HIDDEN(04,CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN,'','f04_' || ROWNUM)
|| APEX_ITEM.HIDDEN(05,CHF_STATUS,'','f05_' || ROWNUM)
|| APEX_ITEM.HIDDEN(06,CHF_STATUS,'','f06_' || ROWNUM)
|| APEX_ITEM.HIDDEN(08,CHF_STATUS,'','f08_' || ROWNUM)
|| APEX_ITEM.HIDDEN(09,CHF_STATUS,'','f09_' || ROWNUM)
|| APEX_ITEM.HIDDEN(11,CHF_STATUS,'','f11_' || ROWNUM)
|| APEX_ITEM.HIDDEN(12,CHF_STATUS,'','f12_' || ROWNUM)
|| APEX_ITEM.CHECKBOX (32,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f30'');"'
,DECODE (0,1, ROWNUM),':','f32_' || ROWNUM) DELETE
,CHF_COLUMN
,CHF_STATUS
,APEX_ITEM.CHECKBOX (07,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f05'');"',DECODE (CHF_STATUS,'DEV',ROWNUM),':','f07_' || ROWNUM)
DEV_EDIT
,APEX_ITEM.CHECKBOX (10,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f08'');"',DECODE (CHF_STATUS,'RVW',ROWNUM),':','f10_' || ROWNUM)
RVW_EDIT
,APEX_ITEM.CHECKBOX (13,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f11'');"',DECODE (CHF_STATUS,'PRD',ROWNUM),':','f13_' || ROWNUM)
PRD_EDIT
FROM CHF_COLUMN WHERE
CHF_DATASTORE = 'DOMAIN_DEV' AND
CHF_SCHEMA = 'SCHEMA_DEV' AND
CHF_TABLE = 'EMPLOYEEE'
ORDER BY 1; And I have a button for the update process so that the users can check the checkboxes option for the status column either 'DEV', 'RVW', 'PRD'. The status of the column can be in either of these states or can be null.
I have a update process, its having some problem - I don't understand whats causing the problem. Below is the error message which I encountered when trying to update.
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
My Update process.
DECLARE
l_cnt BINARY_INTEGER := 0;
l_stepid number := 10;
l_date DATE := SYSDATE;
BEGIN
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
IF APEX_APPLICATION.G_f05 (i) = 1 THEN
UPDATE CHF_COLUMN
SET CHF_STATUS = 'DEV'
WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
l_cnt := l_cnt + SQL%ROWCOUNT;
apex_application.g_print_success_message := apex_application.g_print_success_message ||
'Successfully updated'||l_cnt ||'<br><br>';
END IF;
IF APEX_APPLICATION.G_f08 (i) = 1 THEN
UPDATE CHF_COLUMN
SET CHF_STATUS = 'RVW'
WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
l_cnt := l_cnt + SQL%ROWCOUNT;
apex_application.g_print_success_message := apex_application.g_print_success_message ||
'Successfully updated'||l_cnt ||'<br><br>';
END IF;
IF APEX_APPLICATION.G_f11 (i) = 1 THEN
UPDATE CHF_COLUMN
SET CHF_STATUS = 'PRD'
WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
l_cnt := l_cnt + SQL%ROWCOUNT;
apex_application.g_print_success_message := apex_application.g_print_success_message ||
'Successfully updated'||l_cnt ||'<br><br>';
END IF;
END LOOP;
COMMIT;
END;If you can please have a look at the app, you can get a better understanding of my problem.
Workspace : orton_workspace
username : [email protected]
password : sanadear
Application No: 15089 SAMPLE_CHECKBOX_APP
Thanks,
Orton
Edited by: orton607 on Aug 4, 2010 9:28 AMI could be wrong but maybe change the hidden items to be like:
APEX_ITEM.HIDDEN(05,DECODE(CHF_STATUS,'DEV',1,0),'','f05_' || ROWNUM)
APEX_ITEM.HIDDEN(08,DECODE(CHF_STATUS,'RVW',1,0),,'','f08_' || ROWNUM)
APEX_ITEM.HIDDEN(11,DECODE(CHF_STATUS,'PRD',1,0),,'','f11_' || ROWNUM)so that the values are 0/1?
Also, you have
DECODE (CHF_STATUS,'DEV',ROWNUM)instead of
DECODE (CHF_STATUS,'DEV',0,1)in the checkboxes, as I would expect.
I'm also not sure why you need to duplicate the checkboxes (f07,f10,f13) as hidden items (f05, f08, f11) if they are both 0/1 values. -
Hi,
#1. I have a SQL report with a checkbox . The page has a LOV and based on the selected value, the records show up in the SQL report. If I "check" one or more rows in the report and click Save button, new rows get created in a table against LOV selection+"checked row".
So, upto this point, it is fine that I am able to save data into the database based on which checkbox is "checked".
#2. Then I used following link. Using that , if for a selected LOV value , data exists in the table, then it shows the checkboxes "checked" (when the SQL report first shows up), for all those records.
http://www.inside-oracle-apex.com/checkboxes-in-tabular-forms-the-easy-way/
The problem is that if the SQL report has already some checkboxes checked as per above functionality (#2), and user "checks" more checkboxes and clicks Save, new data does not get saved. Looks like, the check box array does not recognize any new selections or even or "unchecking" o any"checked' checkboxes.
Please help me how I can achieve saving checkboxes values from a report alongwith showing checkboxes checked , when SQL report first loads, based on what db has.
PS: Using Apex 4.0
Thanks,You should check this link:
https://apex.oracle.com/pls/apex/f?p=31517:95
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494 -
hi all,
i am facing one problem regarding checkbox in alv.
i have to buttons on alv report as 'select all' (to select all) and 'send mail'(as i have to send mail to selected record)
wat i have done till now is:
1. when i run the report and cleck on checkboxes the action is reflected in internal table..n i can capture the data.
2.when i click on select all button all the records get selected and i can capture the data again.
now the problem :
when i clcik on "select all" and all the record get selected ..but when i deselect any of those record..the changes in internal table lost i.e. the checkbox field because empty for all the record.....
PLZ GIVE SOLUTION FOR FUNCTION "REUSE_ALV_GRID_DISPLAY" ONLY...
now the code:
************LAYOUT**************
DATA: gd_layout TYPE SLIS_LAYOUT_ALV.
gd_layout-colwidth_optimize = 'X'.
gd_layout-zebra = 'X'.
gd_layout-box_fieldname = 'CHECKBOX'.
gd_layout-box_tabname = 'IT_CONF'.
****alv display*************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_grid_title = 'Detailed List'
it_fieldcat = fieldcat
i_callback_program = sy-repid
i_callback_user_command = 'USER_CMD'
i_callback_pf_status_set = 'EMAILS'
IS_LAYOUT = gd_layout
TABLES
t_outtab = it_conf
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.
endif.
endform. "alv_display
*& Form sush1
text
-->RT_EXTAB text
FORM emails USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'EMAILS'.
ENDFORM. "emails
*& Form user_cmd
text
-->P_UCOMM text
-->LS_SELFIELDtext
FORM user_cmd USING p_ucomm LIKE sy-ucomm ls_selfield type slis_selfield.
IF REF_GRID IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF_GRID.
ENDIF.
IF NOT REF_GRID IS INITIAL.
CALL METHOD REF_GRID->CHECK_CHANGED_DATA.
ENDIF.
IF p_ucomm = 'EMAIL'.
loop at it_conf where checkbox = 'X'.
**[[[[[[[U MAY NOT SEE THIS THIS IS FOR MAIL PUPOSE]]]]]]]]]]]]*********
select single sachn telnr into (tc_name , tc_num ) from t526
where SACHX = it_conf-zztc
and werks = it_conf-werks .
******find the emil of employee.
clear : p_0105,p_0105[].
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = it_conf-pernr
infty = '0105'
BEGDA = pn-begda
ENDDA = pn-endda
TABLES
infty_tab = p_0105
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
if sy-subrc = 0.
read table p_0105 with key subty = 10.
move p_0105-USRID_LONG to email.
endif.
find immediate superior by Z FM.
clear pernr_s.
CALL FUNCTION 'ZHR_GET_IMMMED_SUPERIOR'
EXPORTING
pernr = it_conf-pernr
begda = '18000101'
endda = '99991231'
IMPORTING
v_pernr = pernr_s
EXCEPTIONS
not_found = 1
OTHERS = 2.
if sy-subrc = 0.
find the email of the immed. superiors personal number..
clear : p_0105,p_0105[].
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = pernr_s
infty = '0105'
BEGDA = pn-begda
ENDDA = pn-endda
TABLES
infty_tab = p_0105
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
read table p_0105 with key subty = 10.
move p_0105-USRID_LONG to email_s.
endif.
if email <> ' '.
perform send_mail using it_conf-ename email email_s tc_name tc_num.
endif.
if email_s <> ' '.
perform send_mail using it_conf-ename email email_s tc_name tc_num.
endif.
****MAIL PART IS OVER*******************************************
endloop.
endif.
*****FOR "SELECT ALL " BUTTON**************
IF p_ucomm = 'SELECT'.
flag = 1.
loop at it_conf.
move 'X' to it_conf-checkbox.
MODIFY IT_CONF.
endloop.
ls_selfield-refresh = 'X'.
endif." Please see the code of myin in the 'SELECT' & 'DESELECT'.
case save_ok.
when 'EXIT'.
perform exit_program.
when 'SELECT'.
perform select_all_entries changing gt_outtab[].
when 'DESELECT'.
perform deselect_all_entries changing gt_outtab[].
when 'RESET'.
perform reset_selected_entries changing gt_outtab[].
when 'SWITCH'.
perform switch_activation changing gt_outtab[].
endcase.
form select_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
* you must check the input cells.
* If all entries are ok, ALV transferes new values to the output
* table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = 'X'.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
endform.
form check_lock using ps_outtab type gs_outtab
changing p_locked.
data ls_celltab type lvc_s_styl.
loop at ps_outtab-celltab into ls_celltab.
if ls_celltab-fieldname = 'CHECKBOX'.
if ls_celltab-style eq cl_gui_alv_grid=>mc_style_disabled.
p_locked = 'X'.
else.
p_locked = space.
endif.
endif.
endloop.
endform.
form deselect_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
* you must check the input cells.
* If all entries are ok, ALV transferes new values to the output
* table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = ' '.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
reward points if it is usefull ......
Girish -
Selecting the Checkboxes on Interactive Report
Hello
I have two checkboxes on a Interactive Report:
My query is as follows:
select
apex_item.checkbox(1, empno, 'ENABLED'),
apex_item.checkbox(2, deptno, 'ENABLED'),
ename,
sal
from emp;
I have a conditional button 'Check N Update' which will invoke the Pl/SQL process:
FOR i in 1..APEX_APPLICATION.G_F01.count
LOOP
l_empno := APEX_APPLICATION.G_F01(i);
UPDATE XXX ....;
END LOOP;
FOR i in 1..APEX_APPLICATION.G_F02.count
LOOP
l_empno := APEX_APPLICATION.G_F02(i);
UPDATE XXX ....;
END LOOP;
What I need is I need to check a CONDITION, if BOTH the checkbox's are selected then I need to throw an ERROR saying.
YOU CANNOT SELECT BOTH the boxes.
Please let me know how can I get this.
Appreciate your help.
thanksHi
Using a RadioGroup would actually create one radio button for each line and mean that you could only select one line.
As the submit process will only return the boxes that have been checked, you only have access to the ticked items and as these contain just the EMPNO and DEPTNO values, you have no way to check if any two are from the same row.
This means that you will have to rethink your report slightly. You will need to have two checkboxes with ROWNUM as the value (if the report is sorted somehow, this may make this more awkward as ROWNUM is from the unsorted data) and make your EMPNO and DEPTNO hidden fields. The when the user submits the page, you will have to compare the ROWNUM values for the first column with all the ROWNUM values for the second column to see if there's a match.
As an alternative, you could have a select list for the first item and give the user options for EMPNO, DEPTNO, Both, Neither?
Andy -
Dynamic Checkboxes on Interactive Report
I have an interactive report that currently lists a row of values:
Field1
Val1
Val2
Val3
I would like to place a text-field at the top of this interactive report with a submit button:
[textbox] [submit button]
Field 1
Val1
Val2
Va3
Then I would like to have checkboxes [] appear in each row:
[textbox] [submit button]
Field1 | Checkbox
Val1 | []
Val2 | []
Val3 | []
Then I would like to make it so that the user enters some text into the textbox and selects any number of the row checkboxes. Upon hitting submit, a procedure will run that accepts each Field1 value and inserts a record into a table containing 2 fields: the Field1 value and the textbox text.
So the following user input:
[Test text in the textbox.] [submit button]
Field1 | Checkbox
Val1 | []
Val2 | [x]
Va3 | [x]
After hitting the submit button, a procedure would be called that would insert 2 records into a table:
Field1 | Field2
Val2 | Test text in the textbox.
Val3 | Test text in the textbox.
Note that there is no entry for Val1 because its checkbox was not checked when the user pressed submit.
What can I do to make this happen? I appreciate any help you can offer.Thanks for sharing
I am having exactly the same problem.
I have an interactive report with the following SQL.
select RSN_CD,
DESC,
APEX_ITEM.CHECKBOX(1,RSN_CD) "Select"
from CAN_RSN
I've set the 'Select' column's type to 'Standard Report Column'. But the checkbox does not appear on the report.
Apex Version: 4.0.1.00.03
Thanks. -
Setting Value of apex_item.checkbox in interactive report
Forum
We need a "select all" and "unselect all" functionality in an interactive report ...
The IR Query currently goes something like this :
select
OBJ_LABEL",
"DATA_START_DATE",
"S_ROWSTATE",
"S_ROWVERSION",
APEX_ITEM.CHECKBOX(1,item_id, 'Checked') "Select"
from some_table;
We have the checkbox selected by default .... the question now is how to have an "unselect all" and "select all" function or heading in the Interactive Report that would unset or set the checkboxes for all rows in the report.
Any advice will be helpful ....
Thanks
PierreAnswering our own question :-)
1) Add an unselect and select button and a hidden field
2) modify the query to use the value of the hidden field to determine whether the checkbox is set or not.
3) set the value of the hidden field as appropriate with for the select or unselect event when the button is selected.
P. -
How to put checkbox into classical report header row?
Hi,
I have a classical report that has a check item as a first column. I would like to put a check box item into the header row too, When checked it is supposed to set the check box item in all report rows. Something like in APEX Shared components / Links / Grid Edit.
Is this possible to do? TIA.
TamasHi,
See e.g. this post
Re: Tabular form check all checkbox header
Regards,
Jari -
How to update collection when checkbox changed in report
I have a report based on a collection:
select seq_id
,c001
,c002
,apex_item.checkbox(1,seq_id,decode(c003,'J','CHECKED','UNCHECKED')) selected
from apex_collections
where collection_name='CONCOLLECTION'When the checkbox changes I want to store the new checked/unchecked status in the collection.
Steps towards a solution I've come up with:
1 Create a dynamic action: Change, jquery selector : input[name="f01"]
2 Create javascript to store value (=seq_id) of changed item into a hidden page item.
3 plsql code to update collection member with seq_id that is now in hidden item.
Is this the way to do it?
If so, it's the javascript of step 2 that I can't figure out.
thanks, Renéthanks this works.
Using javascript I store the seq_id and the checked value in 2 page items
$s('P70_SEQ_ID', $(this.triggeringElement).val() );
$s('P70_CHECKED', $(this.triggeringElement.checked).val() );The checked value I get is <empty> when checked and 'undefined' when unchecked. Based on this I can now update the collection.
declare
l_selectie varchar2(1);
begin
if v('P70_CHECKED')='undefined'
then
l_selectie := 'N';
else
l_selectie := 'J';
end if;
apex_collection.update_member_attribute(p_collection_name => 'CONCOLLECTION'
,p_seq => v('P70_SEQ_ID')
,p_attr_number => 3
,p_attr_value => l_selectie);
end;
Maybe you are looking for
-
MacBook Pro Doesn't Always Connect to WI-FI Router at Start-Up
I have an internittant problem with my MacBook Pro (8,3 - 2011/Intel Core i7). It's configured with original Airport Extreme card. For the most part, the wireless system runs without a problem. I've always been able to connect to wireless networks at
-
When I attach files to mails (.pdf, .jpg, .docx etc.), they arrive in Windows Outlook embedded. My mail settings are "Always Send Windows-Friendly Attachments" and "Always Insert Attachments at End of Message". I know how to open these attachments in
-
SD 16:9 video for web? How to have widescreen SD video but not in DV format
I make videos that are intended for web using final cut express. But, my camera shoots in standard definition, and in wide screen. I try the anamorphic codecs, but here is the problem....I don't want to edit in the DV format!!! So, every time i try t
-
Using a Sharp AR-C260M Printer/Scanner in OSX
I have frustrated for some time about using the Sharp AR-C260M we have in our office. I'm the only Mac user and can't get others on board because of troubles like this. Windows users can print in color and use advanced features like the duplexing, bu
-
New Warehouse for selected items
we need create a new warehouse and we need it to be assigned to only some of the items. Can this be done by a DTW import or do I have to go into each and every single item and manually add that warehouse?