Own function in computation (Interactive Report)
Hello,
I have checked package WWV_FLOW_WORKSHEET_DIALOGUE (it's wrapped, so I've checked it only slightly) and table WWV_FLOW_WORKSHEET_COMPUTATION and found that those two objects are responsible for functions we can see/use at Compute panel of Interactive Report. I need to add my own function to computation but it's not possible. When I write MY_FUNCTION(A) in text box and try to apply then I receive message: "Invalid computation expression. MY_FUNCTION".
Is any way to add own function to be seen by Compute option in Interactive Report?
It's important that I don't want to use MY_FUNCTION in query defined in Region Source!
Thanks in advance,
Regards
Hi, just stumbled over your question and I happened to have the same problem.
It appears not to be possible to use your own functions although it would definitely be very nice.
However, I found a solution, but given that I already had my knuckles rapped once for mentioning them-who-must-not-be-named (anything starting with "WWV..." really), I am not going to post it here.
If you are still interested (and if you didn't fix it already for yourself), drop me a personal mail and I'll get back to you.
Needless to say, you should think long and hard before you make any modification in any WWV_ object and then decide that you shouldn't.
Regards,
Iulian
Similar Messages
-
Function module for interactive reporting in alv
hi,
any one knows about f.m used in interactive reporting .
plz forward pseudo code .
praveenhi,
check my example:
REPORT ZSR_ALV_INTERACTIVE.
TABLES : LFA1,EKKO,EKPO.
SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.
DATA : BEGIN OF ITAB OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
END OF ITAB.
DATA : BEGIN OF JTAB OCCURS 0,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
END OF JTAB.
DATA : BEGIN OF KTAB OCCURS 0,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
END OF KTAB.
TYPE-POOLS : SLIS.
DATA : REPID LIKE SY-REPID.
DATA :LFA1_B TYPE SLIS_T_FIELDCAT_ALV,
LFA1_W TYPE SLIS_FIELDCAT_ALV,
EKKO_B TYPE SLIS_T_FIELDCAT_ALV,
EKKO_W TYPE SLIS_FIELDCAT_ALV,
EKPO_B TYPE SLIS_T_FIELDCAT_ALV,
EKPO_W TYPE SLIS_FIELDCAT_ALV,
EVENTS_B TYPE SLIS_T_EVENT,
EVENTS_W TYPE SLIS_ALV_EVENT.
PERFORM GET_VAL.
REPID = SY-REPID.
SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN VENDOR.
*perform val USING USER_COMMAND sel.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPID
IT_FIELDCAT = LFA1_B
IT_EVENTS = EVENTS_B
TABLES
T_OUTTAB = ITAB.
*& Form GET_VAL
text this is to put column headings
FORM GET_VAL.
LFA1_W-FIELDNAME = 'LIFNR'.
LFA1_W-REF_TABNAME = 'LFA1'.
LFA1_W-REF_FIELDNAME = 'LIFNR'.
APPEND LFA1_W TO LFA1_B.
LFA1_W-FIELDNAME = 'NAME1'.
LFA1_W-REF_TABNAME = 'LFA1'.
LFA1_W-REF_FIELDNAME = 'NAME1'.
APPEND LFA1_W TO LFA1_B.
EKKO_W-FIELDNAME = 'EBELN'.
EKKO_W-REF_TABNAME = 'EKKO'.
EKKO_W-REF_FIELDNAME = 'EBELN'.
APPEND EKKO_W TO EKKO_B.
EKKO_W-FIELDNAME = 'AEDAT'.
EKKO_W-REF_TABNAME = 'EKKO'.
EKKO_W-REF_FIELDNAME = 'AEDAT'.
APPEND EKKO_W TO EKKO_B.
EKPO_W-FIELDNAME = 'EBELP'.
EKPO_W-REF_TABNAME = 'EKPO'.
EKPO_W-REF_FIELDNAME = 'EBELP'.
APPEND EKPO_W TO EKPO_B.
EKPO_W-FIELDNAME = 'MATNR'.
EKPO_W-REF_TABNAME = 'EKPO'.
EKPO_W-REF_FIELDNAME = 'MATNR'.
APPEND EKPO_W TO EKPO_B.
EVENTS_W-NAME = 'USER_COMMAND'.
EVENTS_W-FORM = 'VAL'.
APPEND EVENTS_W TO EVENTS_B.
ENDFORM. "GET_VAL
*& Form VAL
text
-->USER_COMMANtext
-->SEL text for retrieving data
FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.
DATA : VEN(10) TYPE N,
PO(10) TYPE N.
DATA : MAT(10) TYPE C.
IF SEL-FIELDNAME = 'LIFNR'.
VEN = SEL-VALUE.
SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = VEN.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPID
I_STRUCTURE_NAME = EKKO_B
IT_FIELDCAT = EKKO_B
IT_EVENTS = EVENTS_B
TABLES
T_OUTTAB = JTAB.
ENDIF.
IF SEL-FIELDNAME = 'EBELN'.
PO = SEL-VALUE.
SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = PO.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'ITEM DETAILS'
I_TABNAME = 'EKPO'
IT_FIELDCAT = EKPO_B
I_CALLBACK_PROGRAM = REPID
IMPORTING
ES_SELFIELD = SEL
TABLES
T_OUTTAB = KTAB.
ENDIF.
logic to select a record
IF SEL-FIELDNAME = 'MATNR'.
MAT = SEL-VALUE.
SET PARAMETER ID 'MAT' FIELD MAT.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
ENDIF.
ENDFORM. "VAL -
Aggregate function usage in interactive reports
Dear All,
I am trying to use the aggregate option in interactive reports , i am not getting any outputs. Can any one please show any examples from your reports ? or give me some idea to get the functionality work done for my reports.
Thanks in advance.
Regards
Dhanush.RDear All,
I am trying to use the aggregate option in interactive reports , i am not getting any outputs. Can any one please show any examples from your reports ? or give me some idea to get the functionality work done for my reports.
Thanks in advance.
Regards
Dhanush.R -
Satndard AVL function code in interactive reports
hai
can any one give some frequently used alv function codes for interctie display
thanking u
regards
muraliHi Murali,
please find the attached code. hope it helps you....
report zptest_alv1.
**TABLES DECLN
tables: vbrk,vbrp,t001.
type-pools: slis.
type-pools: icon.
***DATA DECLN.
data: v_vbeln like vbrk-vbeln,
v_matnr like vbrp-matnr.
constants: c_user_command type slis_formname value 'F_USER_COMMAND',
c_pf_status type slis_formname value 'F_SET_PF_STATUS'.
**ALV RELATED TABLES.
*--Field Catalog
data: it_fieldcat type standard table of
slis_fieldcat_alv with header line,
it_fieldcat1 type standard table of
slis_fieldcat_alv with header line ,
wa_fieldcat type slis_fieldcat_alv,
*--Layout
wa_layout type slis_layout_alv,
*--Sort
it_sort type slis_t_sortinfo_alv,
wa_sort type slis_sortinfo_alv ,
**-Structure for excluding function codes
wa_extab type slis_extab,
**-To hold function codes to be excluded in ALV toolbar
it_extab type slis_t_extab.
***INTERNAL TABLE DECLN.
data: begin of it_vbrk occurs 0,
vbeln like vbrk-vbeln,
waerk like vbrk-waerk,
vkorg like vbrk-vkorg,
fkdat like vbrk-fkdat,
bukrs like vbrk-bukrs,
netwr like vbrk-netwr,
end of it_vbrk.
data: begin of itab occurs 0,
vbeln like vbrp-vbeln,
posnr like vbrp-posnr,
fkimg like vbrp-fkimg,
vrkme like vbrp-vrkme,
netwr like vbrp-netwr,
matnr like vbrp-matnr,
arktx like vbrp-arktx,
end of itab.
data: it_vbrp like itab occurs 0 with header line.
***selection screen.
selection-screen: begin of block b1 with frame title text-001.
select-options: s_vbeln for vbrk-vbeln,
s_fkdat for vbrk-fkdat obligatory,
s_matnr for vbrp-matnr.
selection-screen: end of block b1.
**INITIALIZATION.
initialization.
s_fkdat-low = sy-datum - 200.
s_fkdat-high = sy-datum.
append s_fkdat.
***AT SELECTION-SCREEN.
at selection-screen.
if not s_vbeln is initial.
select single vbeln from vbrk
into v_vbeln
where vbeln in s_vbeln.
if sy-subrc <> 0.
message e001(zz2).
endif.
endif.
if not s_matnr is initial.
select single matnr from mara
into v_matnr
where matnr in s_matnr.
if sy-subrc <> 0.
message e001(zz2).
endif.
endif.
***START-OF-SELECTION.
start-of-selection.
perform get_data_vbrk.
perform get_data_vbrp.
***END-OF-SELECTION.
end-of-selection.
*--Sort the Output Fields
perform sort_fields.
*--Build Field catalog for the Output fields
perform get_field_catalog.
***MODIFY LAYOUT.
perform modify_layout.
*--Display ALV output
perform list_disp tables it_vbrk
using c_user_command.
*& Form GET_DATA_VBRK
text
--> p1 text
<-- p2 text
form get_data_vbrk.
select vbeln
waerk
vkorg
fkdat
bukrs
netwr
into table it_vbrk
from vbrk
where vbeln in s_vbeln
and fkdat in s_fkdat.
endform. " GET_DATA
*& Form GET_DATA_VBRP
text
--> p1 text
<-- p2 text
form get_data_vbrp .
SELECT VBELN
POSNR
FKIMG
VRKME
NETWR
MATNR
ARKTX
FROM VBRP
INTO TABLE IT_VBRP
FOR ALL ENTRIES IN IT_VBRK
WHERE VBELN = IT_VBRK-VBELN.
select vbeln
posnr
fkimg
vrkme
netwr
matnr
arktx
from vbrp
into table itab
for all entries in it_vbrk
where vbeln = it_vbrk-vbeln.
endform. " GET_DATA_VBRP
*& Form GET_FIELD_CATALOG
text
--> p1 text
<-- p2 text
form get_field_catalog .
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = sy-repid
i_internal_tabname = 'IT_VBRK'
i_inclname = sy-repid
changing
ct_fieldcat = it_fieldcat[]
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.
endform. " GET_FIELD_CATALOG
*& Form SORT_FIELDS
text
--> p1 text
<-- p2 text
form sort_fields .
clear wa_sort.
wa_sort-spos = '01'.
wa_sort-fieldname = 'VBELN' .
wa_sort-tabname = 'IT_VBRK'.
wa_sort-up = 'X'.
append wa_sort to it_sort.
clear wa_sort.
wa_sort-spos = '02'.
wa_sort-fieldname = 'POSNR' .
wa_sort-tabname = 'IT_VBRP'.
wa_sort-up = 'X'.
append wa_sort to it_sort.
endform. " SORT_FIELDS
*& Form MODIFY_LAYOUT
text
--> p1 text
<-- p2 text
form modify_layout .
wa_layout-default_item = 'X'.
wa_layout-zebra = 'X'.
wa_layout-expand_fieldname = 'EXPAND'.
wa_layout-colwidth_optimize = 'X'.
endform. " MODIFY_LAYOUT
*& Form LIST_DISP
text
--> p1 text
<-- p2 text
form list_disp tables p_it_vbrk
using p_user_command type slis_formname.
*CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'POPUP'
I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
IT_EXCLUDING = IT_EXTAB[]
TABLES
T_OUTTAB = IT_VBRK
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 function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_pf_status_set = 'POPUP'
i_callback_user_command = 'HANDLE_USER_COMMAND'
is_layout = wa_layout
it_fieldcat = it_fieldcat[]
tables
t_outtab = p_it_vbrk
exceptions
program_error = 1
others = 2.
endform. " LIST_DISP
*& Form POPUP
text
-->P_EXTAB text
form popup using it_extab type slis_t_extab.
*- Pf status
set pf-status 'POPUP'.
endform. " POPUP
*& Form F_USER_COMMAND
form handle_user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&IC1'.
clear it_fieldcat1[].
clear it_vbrp[].
if rs_selfield-fieldname = 'VBELN'.
read table it_vbrk index rs_selfield-tabindex.
loop at itab where vbeln = it_vbrk-vbeln.
move-corresponding itab to it_vbrp.
append it_vbrp.
endloop.
perform interactive_report.
endif.
endcase.
endform. "HANDLE_USER_COMMAND
*& Form INTERACTIVE_REPORT
text
--> p1 text
<-- p2 text
form interactive_report .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = IT_FIELDCAT1[]
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.
wa_fieldcat-fieldname = 'VBELN'.
wa_fieldcat-seltext_l = 'BILLING DOC'.
wa_fieldcat-tabname = 'IT_VBRP'.
wa_fieldcat-col_pos = 1.
append wa_fieldcat to it_fieldcat1.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'POSNR'.
wa_fieldcat-seltext_l = 'ITEM'.
wa_fieldcat-tabname = 'IT_VBRP'.
wa_fieldcat-col_pos = 2.
append wa_fieldcat to it_fieldcat1.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'FKIMG'.
wa_fieldcat-seltext_m = 'INV QTY'.
wa_fieldcat-tabname = 'IT_VBRP'.
wa_fieldcat-col_pos = 3.
append wa_fieldcat to it_fieldcat1.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'VRKME'.
wa_fieldcat-seltext_m = 'SALES UNIT'.
wa_fieldcat-tabname = 'IT_VBRP'.
wa_fieldcat-col_pos = 4.
append wa_fieldcat to it_fieldcat1.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'NETWR'.
wa_fieldcat-seltext_m = 'NET PRICE'.
wa_fieldcat-tabname = 'IT_VBRP'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-col_pos = 5.
append wa_fieldcat to it_fieldcat1.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-seltext_m = 'MATERIAL'.
wa_fieldcat-tabname = 'IT_VBRP'.
wa_fieldcat-col_pos = 6.
append wa_fieldcat to it_fieldcat1.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ARKTX'.
wa_fieldcat-seltext_m = 'SALES ORDER'.
wa_fieldcat-tabname = 'IT_VBRP'.
wa_fieldcat-col_pos = 7.
append wa_fieldcat to it_fieldcat1.
clear wa_fieldcat.
*CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT1[]
IT_SORT = IT_SORT
TABLES
T_OUTTAB = IT_VBRP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
is_layout = wa_layout
it_fieldcat = it_fieldcat1[]
tables
t_outtab = it_vbrp
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.
endform. " INTERACTIVE_REPORT
Madhavi -
Compute function on interactive report
Hi Every 1,
I need some help with an interactive report i am trying to produce. What i am trying to do is use to compute function of an interactive report and add the actual count from a week (e.g. week 26) and add it to the forecast count of that week
The problem that i have is that they are on different rows
The table below shows that i am working with.
Week No|Forecast Count|Actual Count*
____26__|_______0______|___128231____
____26__|____180916____|______0______
____27__|_______0______|___164666____
____27__|____180916____|______0______
____28__|_______0______|___169302____
____28__|____180916____|______0______
____29__|_______0______|___159857____
____29__|____180916____|______0______
____30__|_______0______|___162210____
____30__|____180916____|______0______
____31__|_______0______|___152471____
____31__|____180916____|______0______
Any help would be welcome :)
Thanks in advance
-N.S.N.O.Is that the only way that this could be done?
I have tried to get the values on the same row but it has proved very very difficult.
The query i use to get the data is this:
select ROUND(TO_NUMBER(TO_CHAR(TO_DATE(rpad(con_add_td_hr, 10),'yyyy-mm-dd'),'ddd')-2)/7)+1 "Week No", 0, sum(cons_total) "Actual Count"
from corcon01_hour_totals
where db_name='CSAHEPA' and substr(con_add_td_hr,1,4)='2008' and CON_ADD_USER_ID not like '%LDL%'
group by ROUND(TO_NUMBER(TO_CHAR(TO_DATE(rpad(con_add_td_hr, 10),'yyyy-mm-dd'),'ddd')-2)/7)+1
UNION
select week_no, sum(manual_entry_cons)+sum(citedi_cons)"Forecast Data", 0
from concount_forecast_data
where db_name ='CSAHEPA' and year ='2008'
group by week_no
The problem that i have is that the 2 tables are not relate and do not have a matching table structure. For the actual count table i have to generate the week number using a data/hour column.
If you have any suggestions i would be very grateful.
Thanks
-N.S.N.O.
Edited by: N.S.N.O. on Sep 16, 2008 2:21 AM -
Interactive report from PL/SQL function
Hello All,
i have a pl/sql function that dynamically builds up a sql query and returns it as a varchar2.
when i create a new report then i can use this function in the report like
return f_function(param1,param2,v('APP_ID'), v('APP_SESSION'));
and this works fine.
Except i cannot create an interactive report for this function, because it is not allowed !!!!
So how can i use the function in an interactive report ?
Thanks in advance,
MarcoMarco,
Another rather extreme approach would be to go all the way and make your function pipelined (that is not only build but also execute the query) and then select from it in your interactive report.
The disadvantage here would be that any supplementary filtering would act on the result set of the function (not as an addition to the where clause of the original query). But if you can live with that...
The advantage would be that there's less fiddling with column headers.
Regards,
Iulian -
Interactive report on view based on pipelined table function.
Hi,
I want to build an Interactive Report on a view.
The view definition contains a select on a pipelined table function. I use context functionality to pass paramaters to the pipelined table function.
A plain select * from #my_view# in SqlPlus results in 121 different rows.
However, If I base my Interactive report on this view, I get 15 repeated rows (all the same).
Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working.
If I use the following approach (http://rakeshjsr.blogspot.nl/2010/10/oracle-apex-interactive-report-based-on.html) I do get results, but I can't use this solution for a reason that's not relevant.Hello,
Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working. I have used it in one instance and it works fine. However I was passing the values to pipe-lined function directly.
IR Query..
SELECT * FROM TABLE(fn_pipeline(:P1_ITEM_NAME))Call pipe-lined function from IR query directly (instead of using view)
Try sending values to Pipe-lined function directly. In-case if the problem is with setting and getting values from the context?
Regards,
Hari -
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. -
Check all checkbox in an interactive report
Hi,
I would like to add a "check all" functionality in an interactive report. I've done that by adding a javascript function to the header, but when I click the column header to check all the page first executes the javascript that is used by the interactive report (sorting etc). Is there a way to disable this javascript for just the checkbox clolumn, so that my own javascript code is executed?
Or is there another way to add this functionality to the IR?
ThanksThat works great! Thanks jarola
The complete answer in case anyone needs it is to first include the checkbox column in your IRR query
APEX_ITEM.checkbox (1, ca.id) del
Then include this as the column heading
<input type="Checkbox" onclick="$f_CheckFirstColumn(this)">
Then include the code as identified by jarola in the page HTML Header
<script type="text/javascript">
addLoadEvent(RemoveChkOnclick)
function RemoveChkOnclick(){
$x('apexir_DEL').onclick='';
</script>
Edited by: Bill Wheeling on Aug 1, 2010 4:12 AM
Edited by: Bill Wheeling on Aug 1, 2010 4:36 AM -
Interactive Report Download and Session State Protection
I have created an Interactive Report in an APEX application that I have enabled
session state protection for. The issue I am having is with the "Download"
functionality of the interactive report to a .csv file.
The URL created by selecting Download from the drop down (javascript:gReport.controls.download();)
is built or constructed without a checksum thus causing the error below.
Error
No checksum was provided to show processing for a page that
requires a checksum when one or more request, clear cache, or argument
values are passed as parameters.
The anchor tag containing the URL (/f?p=app_id:page:session_id:CSV:) is contained within
<div id="apexir_CONTROL_PANEL_DROP" class="drop_panel
clearfix" style="">
Running the following: Application Express 3.1.0.00.32 on Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
Is there a way to add a checksum to this? OR does anyone have any ideas on how to work around this?
Edited by: Bryce Tuohy on Feb 26, 2009 10:08 AMWORKAROUND:
1.) Create hidden ITEM on page (I named it P23_PREPARED_CSV_DOWNLOAD_URL).
Enter the following for the ITEM
as the SOURCE_TYPE : PL/SQL Function Body
as the SOURCE: return apex_util.prepare_url('f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:CSV:')
2.) Create BUTTON that executes javascript to open POPUP window with this url.
a.) Create Button and enter
<a href="javascript:popupURL('&P23_PREPARED_CSV_DOWNLOAD_URL.')">Download and Save to CSV file</a>as the "Text Label/Alt"
Originally had custom code for javascript POPUP and this is not needed .... just use the APEX javascript function.
Edited by: Bryce Tuohy on Mar 5, 2009 10:47 AM -
Interactive report: Can I exclude a particular column from single row view?
Hi -- I posted on this yesterday (Possible to exclude interactive report column from single row display?
a bit anxious for suggestions, I guess!
I've added a column with edit-link functionality to my interactive report query (that is, the link
is not attached to the database data... it's an additional column and shows an icon). It's also
in addition to the default single row view link. (We need both.)
Unfortunately, the Edit link column shows up in the single row view. I've pared it down as much
as I can: the label is empty, and the null value shows as "-". But an extra row with "-" is pretty
ugly. Is there a way to always, completely exclude this column from the single row view?
I know I could put the edit link on a data column, but:
1) I want the link to always be to the left of the data (and the user can re-order columns)
2) when the user doesn't have edit privileges, the link will need to be disabled or just not
be displayed, and I think that would be a problem if the link were on the data. (true?)
Thanks,
CarolPlease disregard this thread, and the one it refers back to. I see a flaw in the design of what I was attempting to do! Creating the link for Editing as a column means the user could inadvertently not display it, or move it, or... any number of problematic scenarios.
Thanks,
Carol -
Interactive report – column heading in multiple rows
I am using interactive report. My question to the expert/guru’s is: - How do I change column heading into multiple row with text wrap.
For example:- My column heading is
Is Employee Trained ? -------> (single row display)
I want to make it display like
Is Employee
Trained ? ------> (Multi row display)
SagarHi,
What you could do is, disable the download csv function from IR (Interactive Report Attributes--> Search Bar-- Uncheck Download) and in the region header create a link and redirect it to another page which will have the csv report output.
e.g. <a href="#" onclick="javascript:redirect('f?p=&APP_ID.:3:&SESSION.::&DEBUG.:3::');"" >Download Report </a>
Here I am redirecting the link to Page 3. On Page 3 create a sql report with the same query and make report template to csv. Thanks,
Manish -
How to apply an accent-insensitive search to an interactive report?
Hello all!
I'm trying to put an accent-insensitive search on an interactive report here. For example, if I'm on the page that has the interactive report and if I click the column header of the interactive report, I get to see a search bar that dynamically shows the results that match your input. Now, when I enter "jager", I want to see *"Jägermeister"* as a search result. The search must be accent-insensitive, so that I don't have to enter the ä every time.
My code is as follows:
SELECT name
FROM food_1
WHERE name LIKE 'Jagerme%'
AND NLSSORT(name) IS NOT NULL
ORDER BY NLSSORT(name, 'NLS_SORT=GENERIC_M_AI');As you can see, I first tried getting a result through the SQL Command. It should return the row that has "Jägermeister" as name. However, it doesn't. It tells me "No data found". So, how do I alter my NLSSORT to search accent-insensitive?
Some extra information, I edited the interactive report source to the following:
SELECT DISTINCT a.name, a.foodid
FROM food_1 a INNER JOIN foodunit_1 c
ON a.foodid = c.foodid
WHERE a.foodlanguageid = :P17_SET_LANGUAGE
AND NLSSORT(a.name) IS NOT NULL
ORDER BY NLSSORT(a.name, 'NLS_SORT=GENERIC_M_AI');I also tried doing ALTER SESSION before the SQL code, but it still gives me the same result: No data found.
I'm using APEX version 4.1.1.00.23.
Help and suggestions are more than welcome. ;)
Thanks in advance,
MagaliI found it out!
It's really ridiculous, actually.
Remember this code?
execute immediate ('ALTER session SET NLS_COMP=LINGUISTIC');
execute immediate ('ALTER session SET NLS_SORT=BINARY_AI');Well, this code is perfectly fine. Only, it doesn't execute. This is because it was misplaced...This process is not executed when you place it in the current authentication scheme, under the "Post-Authenticatoin Process" part.
You might wonder why this is, but I have the explanation to that.
You see, when you use an interactive report, the page processing isn't executed when you use the search function of that interactive report... Because it's an interactive report, I guess.
BUT.
An ALTER SESSION from the security attributes, that will execute.
So, the solution to my problem was, in this case:
Go to "Application" --> "Shared Objects" --> "Security Attributes" --> "Database Session" --> "Initialization PL/SQL code". In there, you need to put:
BEGIN
EXECUTE IMMEDIATE 'ALTER session SET NLS_COMP=LINGUISTIC';
EXECUTE IMMEDIATE 'ALTER session SET NLS_SORT=BINARY_AI';
END;By doing this, there's no longer any need to edit the source code of the report!
So, that's the solution. I can finally enter text without special characters in it, and get the corresponding data, with special characters... Ahh. :)
I hope this is helpful to others as well now. ;) -
Interactive Report - Download as csv
Hi,
I am using apex 4.0.2.00.07 on IE8 with theme Traditional Blue. I have a problem with the inbuild download functionality of an interactive report. One field is of type varchar2 and I allow line breaks in the underlying edit screen.
I simply do not find a way to handle this formatting in the export to csv. The data is always completely shredded. An example:
Input form:
Name (text field):
Bob
Address (text area):
Street(<linebreak>)
City
IReport SQL: select NAME, ADDRESS from USERS
In the IR form it will show as
Name || Address
Bob || Street City
An export to csv will make this to
Name,"Address"
Bob,"Street
City"
I have tried all settings of the report attribute 'Display Type' for field Address, but it will always be the same in the IR and always the same in the export. How do I ensure that the whole content of a table field is displayed as one value in the csv, with no regards to potentially present field formatting, e.g. in my case:
Name,"Address"
Bob,"Street City"
And if we are already at it: I have seen that some plugins for an export to excel exist. Would that recognise the formatted text and place it in one cell or would I face the same issue here, i.e. the field value being split over several cells?
Thanks a lot,
MartinWell, found some answers after some more trial and error.
1.) Country settings messed up my csv format. After changing the default column separator in the report attributes, things now look as expected.
2.) One can rather easily suppress the format signs by using the sql replace functionality, e.g.
SELECT REPLACE (my_column, CHR(10),' ') FROM my_table
And it is actually quite a difference if you use text area or rich text fields when it comes to the usage of the breaks.
Cheers,
Martin -
Interactive report - conditional where clause
Hello,
i have an interactive report like
SELECT a.id, a.my_column
FROM my_table a
WHERE a.id = 12
Now, when the user select a assigned value, the where clause don't be execute, also like this (without where)
SELECT a.id, a.my_column
FROM my_table a
The User is not allowed to see this column, also i can not use the filter-function of the interactive report.
Any Idea how did i make?
thank's, Daniel
Message was edited by:
DaKaHi Andy, this functionalitiy is clear.
I will manipulate the region source in fact of an interaction of a user.
Now, my select shows like:
SELECT a.* FROM v_test a
WHERE (:P40_ID = -1 OR a.id = :P40_ID)
:P40_ID is a select box with return-null-value of "-1".
This is not very fast. Therefore i search a method, when user select the null-value, then the select like:
SELECT a.* FROM v_test a;
and when user select another value then:
SELECT a.* FROM v_test a
WHERE a.id = :P40_ID;
All this without the "filter"-functionality of the IR!
Any idea?
Sorry for this misunderstood.
Daniel.
Maybe you are looking for
-
ServletContainerAdapter manager not initialized correctly wls11g
Hi, I am using the weblogic 11g(10.3.1 version) to connect with LDAP server. I created the new authenticatior provider.in provider specific tab of this Authenticator Provider, i gave the settings for LDap server. then,i restarted the weblogic server.
-
Text concatenation to the container element
HI All, I need to concatinate a container element with a hardcoded text and assign it to a different container element. exm : Set the WF container Workitem text to : u201C<Ledger number>: Waiting for site action u201C could you please sug
-
How can you publish an article in SharePoint and also have it push to Facebook and Twitter?
I've been scouring the internet for this answer. I've found how to add Facebook "Like" boxes, even post to a wall from a SharePoint web part, but what I need is something similar to what other CMS's have to offer such as WordPress, where I publish an
-
I was wondering if anybody could tell me an easy way to back my Mac Book Pro up to a Linux server I have? I have thought of rsync but have read of some issues that arise with using it. Does anyone have any ideas?
-
I just downloaded the Findmyiphone app. I have icloud5 enabled and have both my iphone and ipod touch set up. I am unable to find either of my devices. Help, please?