Subscriptions - prevent from sending when no data in interactive report?
Hello,
I am wondering if it is possible to prevent a notification from being sent if there is no data in the interactive report on the day specified in the subscription?
eg. I receive a private report Isabelle's Open Issues every Friday, but last Friday there were no open issues.
We have another request for a weekly subscription but the requirement is that the report should only be sent when there are open issues.
Thank you for advising.
Kind regards,
Isabelle Fallon
I think there is no condition like that.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
http://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------
Similar Messages
-
Introduction
There is a scenario that the data in the report changes infrequently, so the users want to be informed and get the most updated data once the data changes. By default, report server always run the report with the most recent data. Is there a way that we
can subscribe the report, so that we can send an email to users when the data in the report has been changed?
Solution
To achieve this requirement, we can create a subscription for the report, then create a trigger in the table which including the report data. When this table has data insert, update or delete, it will be triggered and execute the subscription to send email
to users.
In the Report Manager, create a subscription for the report and make it only execute one time.
When we create a subscription, a corresponding SQL Agent job will be created. Then we can use the query below to find out the job based on ScheduleId:
-- List all SSRS subscriptions
USE [ReportServer]; -- You may change the database name.
GO
SELECT USR.UserName AS SubscriptionOwner
,SUB.ModifiedDate
,SUB.[Description]
,SUB.EventType
,SUB.DeliveryExtension
,SUB.LastStatus
,SUB.LastRunTime
,SCH.NextRunTime
,SCH.Name AS ScheduleName
,RS.ScheduleId
,CAT.[Path] AS ReportPath
,CAT.[Description] AS ReportDescription
FROM dbo.Subscriptions AS SUB
INNER JOIN dbo.Users AS USR
ON SUB.OwnerID = USR.UserID
INNER JOIN dbo.[Catalog] AS CAT
ON SUB.Report_OID = CAT.ItemID
INNER JOIN dbo.ReportSchedule AS RS
ON SUB.Report_OID = RS.ReportID
AND SUB.SubscriptionID = RS.SubscriptionID
INNER JOIN dbo.Schedule AS SCH
ON RS.ScheduleID = SCH.ScheduleID
ORDER BY USR.UserName
,SUB.ModifiedDate ;
Create a trigger in the table which including the report data.
CREATE TRIGGER reminder
ON test.dbo.users
AFTER INSERT, UPDATE, DELETE
AS
exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
Please note that the command ‘exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'’ is coming from the job properties. We can go to SQL Server Agent Jobs, right-click the corresponding job to open
the Steps, copy the step command, and then paste it to the query.
Then when the user table has data insert, update or delete, the trigger will be triggered and execute the subscription to send email to users.
References:
Subscriptions and Delivery (Reporting Services)
Internal Working of SSRS Subscriptions
SQL Server Agent
Applies to:
Reporting Services 2005
Reporting Services 2008
Reporting Services 2008 R2
Reporting Services 2012
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Thanks,
Is this a supported scenario, or does it use unsupported features?
For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
in a supported way?
Thanks! Josh -
Can anyone plz send a simple example of interactive reports
Hi gurus,
Can anyone plz send a simple example of interactive reports using subscreenswhich contains at line-selection, at user-command, pf and other commands.
Thanks in advance.Hi,
* Macro definition
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
ls_fieldcat-cfieldname = &3.
ls_fieldcat-qfieldname = &4.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
TYPE-POOLS: slis. " ALV Global types
TYPES:
BEGIN OF ty_vbak,
vkorg TYPE vbak-vkorg, " Sales organization
kunnr TYPE vbak-kunnr, " Sold-to party
vbeln TYPE vbak-vbeln, " Sales document
netwr TYPE vbak-netwr, " Net Value of the Sales Order
waerk TYPE vbak-waerk, " Currency
END OF ty_vbak,
BEGIN OF ty_vbap,
vbeln TYPE vbap-vbeln, " Sales document
posnr TYPE vbap-posnr, " Sales document item
matnr TYPE vbap-matnr, " Material number
arktx TYPE vbap-arktx, " Short text for sales order item
kwmeng TYPE vbap-kwmeng, " Order quantity
vrkme TYPE vbap-vrkme, " Quantity Unit
netwr TYPE vbap-netwr, " Net value of the order item
waerk TYPE vbap-waerk, " Currency
END OF ty_vbap.
DATA :
gs_vbak TYPE ty_vbak,
* Data displayed in the first list
gt_vbak TYPE TABLE OF ty_vbak,
* Data displayed in the second list
gt_vbap TYPE TABLE OF ty_vbap.
SELECT-OPTIONS :
s_vkorg FOR gs_vbak-vkorg, " Sales organization
s_kunnr FOR gs_vbak-kunnr, " Sold-to party
s_vbeln FOR gs_vbak-vbeln. " Sales document
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data_vbak.
PERFORM f_display_data_vbak.
* Form f_read_data_vbak
FORM f_read_data_vbak.
SELECT vkorg kunnr vbeln netwr waerk
INTO CORRESPONDING FIELDS OF TABLE gt_vbak
UP TO p_max ROWS
FROM vbak
WHERE kunnr IN s_kunnr
AND vbeln IN s_vbeln
AND vkorg IN s_vkorg
and vbtyp = 'C'. " C = Sales Orders.
ENDFORM. " F_READ_DATA_VBAK
* Form f_display_data_vbak
FORM f_display_data_vbak.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
* Build the field catalog
m_fieldcat 'VKORG' 'VBAK' '' ''.
m_fieldcat 'KUNNR' 'VBAK' '' ''.
m_fieldcat 'VBELN' 'VBAK' '' ''.
m_fieldcat 'NETWR' 'VBAK' 'WAERK' ''.
m_fieldcat 'WAERK' 'VBAK' '' ''.
* Display the first list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbak.
ENDFORM. " F_DISPLAY_DATA_VBAK
* FORM USER_COMMAND *
FORM user_command USING u_ucomm TYPE syucomm
us_selfield TYPE slis_selfield. "#EC CALLED
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE gt_vbak INDEX us_selfield-tabindex INTO gs_vbak.
CHECK sy-subrc EQ 0.
PERFORM f_read_data_vbap. " Read data from VBAP
PERFORM f_display_data_vbap.
ENDCASE.
ENDFORM. " USER_COMMAND
* Form f_read_data_vbap
FORM f_read_data_vbap.
SELECT vbeln posnr matnr arktx kwmeng vrkme netwr waerk
INTO CORRESPONDING FIELDS OF TABLE gt_vbap
FROM vbap
WHERE vbeln = gs_vbak-vbeln.
ENDFORM. " F_READ_DATA_VBAP
* Form f_display_data_vbap
FORM f_display_data_vbap.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
* Build the field catalog
m_fieldcat 'VBELN' 'VBAP' '' ''.
m_fieldcat 'POSNR' 'VBAP' '' ''.
m_fieldcat 'MATNR' 'VBAP' '' ''.
m_fieldcat 'ARKTX' 'VBAP' '' ''.
m_fieldcat 'KWMENG' 'VBAP' '' 'VRKME'.
m_fieldcat 'VRKME' 'VBAP' '' ''.
m_fieldcat 'NETWR' 'VBAP' 'WAERK' ''.
m_fieldcat 'WAERK' 'VBAP' '' ''.
* Display the second list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbap.
ENDFORM. " F_DISPLAY_DATA_VBAP
2nd example
* Macro definition
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
TYPE-POOLS: slis. " ALV Global types
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
TYPES:
* Data displayed in the first list
BEGIN OF ty_kna1,
kunnr TYPE kna1-kunnr, " Customer number
name1 TYPE kna1-name1, " Customer name
ort01 TYPE kna1-ort01, " Customer city
END OF ty_kna1,
* Data displayed in the second list
BEGIN OF ty_vbak,
vkorg TYPE vbak-vkorg, " Sales organization
kunnr TYPE vbak-kunnr, " Sold-to party
vbeln TYPE vbak-vbeln, " Sales document
netwr TYPE vbak-netwr, " Net Value of the Sales Order
END OF ty_vbak,
* Data displayed in the third list
BEGIN OF ty_vbap,
vbeln TYPE vbap-vbeln, " Sales document
posnr TYPE vbap-posnr, " Sales document item
matnr TYPE vbap-matnr, " Material number
arktx TYPE vbap-arktx, " Short text for sales order item
kwmeng TYPE vbap-kwmeng, " Order quantity
netwr TYPE vbap-netwr, " Net value of the order item
END OF ty_vbap.
DATA:
gs_kna1 TYPE ty_kna1,
gt_kna1 TYPE TABLE OF ty_kna1,
gs_vbak TYPE ty_vbak,
gt_vbak TYPE TABLE OF ty_vbak,
gt_vbap TYPE TABLE OF ty_vbap.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data_kna1.
END-OF-SELECTION.
PERFORM f_display_data_kna1.
* Form f_read_data_kna1
FORM f_read_data_kna1.
* Read customer data with a least one order
SELECT kunnr name1 ort01 INTO TABLE gt_kna1
FROM kna1 AS k
UP TO p_max ROWS
WHERE EXISTS
( SELECT kunnr FROM vbak WHERE kunnr = k~kunnr ).
ENDFORM. " F_READ_DATA_KNA1
* Form f_display_data_kna1
FORM f_display_data_kna1.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
* Build the field catalog
m_fieldcat 'KUNNR' 'KNA1'.
m_fieldcat 'NAME1' 'KNA1'.
m_fieldcat 'ORT01' 'KNA1'.
* Display the first list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND_KNA1'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_kna1.
ENDFORM. " F_DISPLAY_DATA_KNA1
* FORM USER_COMMAND_KNA1 *
FORM user_command_kna1 USING u_ucomm TYPE sy-ucomm
us_selfield TYPE slis_selfield."#EC CALLED
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE gt_kna1 INDEX us_selfield-tabindex INTO gs_kna1.
CHECK sy-subrc EQ 0.
PERFORM f_read_data_vbak. " Read data from VBAK
PERFORM f_display_data_vbak. " Display orders
ENDCASE.
ENDFORM. " USER_COMMAND_KNA1
* Form f_read_data_vbak
FORM f_read_data_vbak.
SELECT vkorg kunnr vbeln netwr
INTO TABLE gt_vbak
FROM vbak
UP TO p_max ROWS
WHERE kunnr = gs_kna1-kunnr.
ENDFORM. " F_READ_DATA_VBAK
* Form f_display_data_vbak
FORM f_display_data_vbak.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
* Build the field catalog
m_fieldcat 'VKORG' 'VBAK'.
m_fieldcat 'KUNNR' 'VBAK'.
m_fieldcat 'VBELN' 'VBAK'.
m_fieldcat 'NETWR' 'VBAK'.
* Display the second list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND_VBAK'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbak.
ENDFORM. " F_DISPLAY_DATA_VBAK
* FORM USER_COMMAND_VBAK *
FORM user_command_vbak USING u_ucomm TYPE sy-ucomm
us_selfield TYPE slis_selfield."#EC CALLED
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE gt_vbak INDEX us_selfield-tabindex INTO gs_vbak.
CHECK sy-subrc EQ 0.
PERFORM f_read_data_vbap. " Read data from VBAP
PERFORM f_display_data_vbap. " Display items
ENDCASE.
ENDFORM. " USER_COMMAND_VBAK
* Form f_read_data_vbap
FORM f_read_data_vbap.
SELECT vbeln posnr matnr arktx kwmeng netwr
INTO TABLE gt_vbap
FROM vbap
WHERE vbeln = gs_vbak-vbeln.
ENDFORM. " F_READ_DATA_VBAP
* Form f_display_data_vbap
FORM f_display_data_vbap.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
* Build the field catalog
m_fieldcat 'VBELN' 'VBAP'.
m_fieldcat 'POSNR' 'VBAP'.
m_fieldcat 'MATNR' 'VBAP'.
m_fieldcat 'ARKTX' 'VBAP'.
m_fieldcat 'KWMENG' 'VBAP'.
m_fieldcat 'NETWR' 'VBAP'.
* Display the third list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbap.
ENDFORM. " F_DISPLAY_DATA_VBAP
3rd Example
** Macro definition*
*DEFINE m_fieldcat.*
*add 1 to ls_fieldcat-col_pos.*
*ls_fieldcat-fieldname = &1.*
*ls_fieldcat-ref_tabname = &2.*
*append ls_fieldcat to lt_fieldcat.*
*END-OF-DEFINITION.*
*CONSTANTS :*
*c_x VALUE 'X'.*
*TYPE-POOLS: slis. " ALV Global types*
*TYPES:*
** Data displayed in the first list*
*BEGIN OF ty_vbak,*
*vkorg TYPE vbak-vkorg, " Sales organization*
*kunnr TYPE vbak-kunnr, " Sold-to party*
*vbeln TYPE vbak-vbeln, " Sales document*
*netwr TYPE vbak-netwr, " Net Value of the Sales Order*
*END OF ty_vbak,*
** Data displayed in the popup list*
*BEGIN OF ty_vbap,*
*posnr TYPE vbap-posnr, " Sales document item*
*matnr TYPE vbap-matnr, " Material number*
*arktx TYPE vbap-arktx, " Short text for sales order item*
*kwmeng TYPE vbap-kwmeng, " Order quantity*
*netwr TYPE vbap-netwr, " Net value of the order item*
*END OF ty_vbap.*
*DATA :*
*g_vkorg TYPE vbak-vkorg,*
*g_kunnr TYPE vbak-kunnr,*
*g_vbeln TYPE vbak-vbeln,*
*gt_vbak TYPE TABLE OF ty_vbak,*
*gt_vbap TYPE TABLE OF ty_vbap.*
*SELECT-OPTIONS :*
*s_vkorg FOR g_vkorg, " Sales organization*
*s_kunnr FOR g_kunnr, " Sold-to party*
*s_vbeln FOR g_vbeln. " Sales document*
*SELECTION-SCREEN :*
*SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED*
*PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.*
*SELECTION-SCREEN END OF LINE.*
*INITIALIZATION.*
*v_1 = 'Maximum of records to read'.*
*START-OF-SELECTION.*
*PERFORM f_read_data_vbak.*
*PERFORM f_display_data_vbak.*
** Form f_read_data_vbak*
*FORM f_read_data_vbak.*
*SELECT vkorg kunnr vbeln netwr*
*INTO TABLE gt_vbak*
*FROM vbak*
*UP TO p_max ROWS*
*WHERE kunnr IN s_kunnr*
*AND vbeln IN s_vbeln*
*AND vkorg IN s_vkorg.*
*ENDFORM. " F_READ_DATA_VBAK*
** Form f_display_data_vbak*
*FORM f_display_data_vbak.*
*DATA:*
*ls_fieldcat TYPE slis_fieldcat_alv,*
*lt_fieldcat TYPE slis_t_fieldcat_alv.*
** Build the field catalog*
*m_fieldcat 'VKORG' 'VBAK'.*
*m_fieldcat 'KUNNR' 'VBAK'.*
*m_fieldcat 'VBELN' 'VBAK'.*
*m_fieldcat 'NETWR' 'VBAK'.*
** Display the first list*
*CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'*
*EXPORTING*
*i_callback_program = sy-cprog*
*i_callback_user_command = 'USER_COMMAND'*
*it_fieldcat = lt_fieldcat*
*TABLES*
*t_outtab = gt_vbak.*
*ENDFORM. " F_DISPLAY_DATA_VBAK*
** FORM USER_COMMAND **
*FORM user_command USING u_ucomm TYPE sy-ucomm*
*us_selfield TYPE slis_selfield. "#EC CALLED*
*DATA:*
*ls_vbak TYPE ty_vbak.*
*CASE u_ucomm.*
*WHEN '&IC1'.*
*READ TABLE gt_vbak INDEX us_selfield-tabindex INTO ls_vbak.*
*CHECK sy-subrc EQ 0.*
*PERFORM f_read_data_vbap " Read data from VBAP*
*USING ls_vbak-vbeln.*
*PERFORM f_display_data_vbap.*
*ENDCASE.*
*ENDFORM. " USER_COMMAND*
** Form f_read_data_vbap*
*FORM f_read_data_vbap USING u_vbeln TYPE vbeln_va.*
*SELECT posnr matnr arktx kwmeng netwr*
*INTO TABLE gt_vbap*
*FROM vbap*
*WHERE vbeln = u_vbeln.*
*ENDFORM. " F_READ_DATA_VBAP*
** Form f_display_data_vbap*
*FORM f_display_data_vbap.*
*DATA:*
*ls_private TYPE slis_data_caller_exit,*
*ls_fieldcat TYPE slis_fieldcat_alv,*
*lt_fieldcat TYPE slis_t_fieldcat_alv.*
** Build the field catalog*
*m_fieldcat 'POSNR' 'VBAP'.*
*m_fieldcat 'MATNR' 'VBAP'.*
*m_fieldcat 'ARKTX' 'VBAP'.*
*m_fieldcat 'KWMENG' 'VBAP'.*
*m_fieldcat 'NETWR' 'VBAP'.*
*ls_private-columnopt = c_x. " Optimize width*
** Display items in a POPUP*
*CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'*
*EXPORTING*
*i_selection = ' '*
*i_tabname = 'GT_VBAP'*
*it_fieldcat = lt_fieldcat*
*is_private = ls_private*
*TABLES*
*t_outtab = gt_vbap.*
*ENDFORM. " F_DISPLAY_DATA_VBAP*
***************** END OF PROGRAM Z_ALV_GRID_AND_POPUP *******************
reward if helpful
raam -
Automatically delete row data on interactive report
Hi All,
I would like to know it's possible to automatically delete row data on interactive report when the check box is checked.
I'm appreciating if you all can share your opinion or solution.
Thanks a lot in advance!
Best regards,
LizHi,
Why you like have checkbox ?
Is it more clear for user have image/button like my example ?
This is just example you need modify according your needs. Example do not have confirmation dialog.
Page HTML header
<script>
function delIRRow(p_pk_val){
var a = new htmldb_Get(null,null,'APPLICATION_PROCESS=DELETE_ROW');
a.addParam('x01',p_pk_val);
var r=a.get();
if(!r=='1'){alert('Delete operation failed!');}else{gReport.search('SEARCH');}
</script>On Demand process DELETE_ROW
BEGIN
delete from your_table where pk_col = APEX_APPLICATION.G_x01;
htp.p('1');
EXCEPTION WHEN OTHERS THEN
htp.p('0');
END;Change your_table and pk_col according your table name and pk column name.
Call javascript from image/button (IR column link) or checkbox, and send primary key value as parametter
Br,Jari
Edited by: jarola on Jul 5, 2010 11:58 AM -
Pagination error when filtering in an Interactive Report
Hi All,
I'm getting a pagination error, when filtering from the column header in an Interactive Report.
Report error:
Invalid set of rows requested, the source data of the report has been modified.*
Reset Pagination*
The steps to recreate:
1. Run an Interactive Report
2. Click the next button to go to the second page of data.
3. From the column header select a data element that will return less than 15 rows. Note -- if the there are 15 or more rows of data, the error will not occur.
The Report will fail with the error shown above.
It looks like the pagination needs to be reset after the column filter, but how is this done?
I'm using the canned interactive report with no customizations. Is there a fix for this issue?
ThanksThis «bug» is known for a long time unfortunately...
I never find any solution for IR report filtering.
Maybe you can use some JQuery to change the link when clicking a value in the list, (add a code that will update pagination).
Something like :
$('#apexir_rollover_content').load(function() {
$(this).find('a').click(function(){
gReport.search('SEARCH');
});But I don't think it will work, as they already use JQuery to bind that <a> events.
In case you update your report using a button, you can simply use a "reset pagination" process called on button click.
In case you use column link you simply have to tick the «Reset Pagination» checkbox.
I hope Apex team will fix that one day.
Good luck.
Yann. -
JCo getting truncated value from SAP when field data type is RAW
We are trying to fetch data from a SAP-AII table by using JCo using the RFC RFC_READ_TABLE.
We are getting incomplete data when the data type of the column is RAW in a particular table.A typical case is:
Table Name: /AIN/DM_DEVCTR
Field : CLIENT Type: CLNT Length:3 Value: 100 (SAP Generated)
Field: DEVCTR_GUID Type:RAW Length:16 Value: 306F50F53805ED488DE9797AC86B5728 (SAP Generated)
Filed: DEVCTR_ID Type:CHAR Length:128 Value: KDEVICECONTROLLER (User input)
For the fields CLIENT and DEVCTR_ID we get the entire value (including blank spaces) but for DEVCTR_GUID we get only 16 characters whereas SAP-AII stores a value that is 32 characters in length. How do we fetch the actual value instead of the truncated value?
Sample code is attached.
try {
mConnection = JCO.createClient("100", // SAP client
"User", // userid
"Password", // password
"EN", // language
"SAP", // host name
"00"); // system number
mConnection.connect();
if (mConnection == null) {
System.out.println("Connection to SAP Server failed.");
mRepository = new JCO.Repository("User", mConnection);
ftemplate = mRepository.getFunctionTemplate("RFC_READ_TABLE");
} catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
JCO.Function function = ftemplate.getFunction();
JCO.ParameterList importParamList = function.getImportParameterList();
importParamList.setValue("/AIN/DM_DEVCTR", "QUERY_TABLE");
importParamList.setValue(";", "DELIMITER");
JCO.Table tableData = function.getTableParameterList().getTable("DATA");
JCO.Table fields = function.getTableParameterList().getTable("FIELDS");
mConnection.execute(function);
if (tableData.getNumRows() > 0) {
do {
for (JCO.FieldIterator e = tableData.fields(); e
.hasMoreElements();) {
JCO.Field field = e.nextField();
String str = field.getString();
String[] values = str.split(";");
for(int i = 0; i < values.length; i++){
System.out.println(values<i>);
} while (tableData.nextRow());
} else {
System.out.println("No results found");
mConnection.disconnect();Hi Kaanu,
You have to modify your java code.
String val = new String( field.getByteArray());
PS: Please reward points for helpful answer or problem resolved. -
How to stop apps from sending and receiving data?
Or does it even matter because I have cellular data turned off...
If you have cellular data turned off apps can still send and receive data via WiFi. But why do you have apps that send and receive data if you don't want them to send and receive data?
-
How to send a conditional email with interactive report subscription
Hi,
i have an interactive report with subscription.
I would like to send an email with the attachment only when the query returns one or more records.
How to to this?
Apex 4.0.2
Thanks in advance
lukxWell, to understand your requirements can I ask this:
You said earlier you want a report sent whenever records that meet a criteria exist, correct? So you want the application to query for a condition, and when that condition occurs (a row with primary Key = X, a select COUNT(1) for rows with column X returns a result of 1 or more)
Then you would schedule a batch job:
BEGIN
-- Job defined entirely by the CREATE JOB procedure.
DBMS_SCHEDULER.create_job (
job_name => 'Send_Email_Procedure',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN Test_For_COND_SEND(); END;',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=hourly; byminute=0',
end_date => NULL,
enabled => TRUE,
comments => 'Job defined entirely by the CREATE JOB procedure.');
END;
This would in theory run hourly and run your test_for_cond_Send process, in which you would test for the condition and send an e-mail if it was found that would contain the results from your query/report.
Here is a link to generate a PDF report that could be sent via e-mail: Re: how to save pdf in APEX 3.0
Thank you,
Tony Miller
Webster, TX
While it is true that technology waits for no man; stupidity will always stop to take on new passengers. -
Problem with DATE in Interactive Report
Hello,
In Interactive Report when I click on the header of any column with DATE datatype, nothing happens due to Javascript error:
Line: 2
Char: 14838
Error: Expected identifier, string or number
Code: 0
Click on any other column works perfectly as well as sorting by DATE column from Action Menu.
I tried to set different format masks for my DATE column and for Application Date Format, but it didn't help.
Finally I found out that this error disappeared when in properties of my DATE column in "List of Values" section I set "Report Filter Date Ranges" = 'Past' instead of 'All'. In this case I get the list with values "Last 5 Years", "Last 2 Years", etc, but not with "Next Hour", "Next 2 Hours", etc...
Can someone help me on this issue, because this functionality might be usefull and also it's not very convinient to change this property for all date columns in all Interactive Report.
By the way, my database version is 9.2.0.5 - maybe it can cause such problem?
Best regards,
VladimirHi Marco,
1) French Canada (fr-ca)
2) This filter works
More informations about the error when I call the function gReport.controls.widget():
<h;div id="apexir_DT" style="text-align: center;" onclick="gReport.controls.widget(this.id)">h;Date de naissance<h;/div>h;
*************POST*************
flowid 48579
p_flow_step_id 5
p_instance 1412541985987586
p_request APXWGT
p_widget_action SORT_WIDGET
p_widget_mod CONTROL
p_widget_name worksheet
x01 5775894815382747091
x02 5775899227924757464
x03 apexir_DT
*************RESPONSE*************
{"dialog":{"id":"1966481623126322611","hide":["apexir_info","apexir_computation"],"coltype":"DATE","filter"
:false,"uv":true,{"dialog":{"uv":true,"row":[{"V":"Failure<br />ORA-20001: get_dbms_sql_cursor error
ORA-00923: FROM keyword not found where expected"}]}}
Louis-Guillaume
Homepage: http://www.insum.ca
Blog: http://insum-apex.blogspot.com -
How to display data in interactive report column without colons (:)
Dear Apex gurus,
I'm a newbie and have just created an Apex application from a spreadsheet. I've created a named list of values and used it in a checkbox against a field in the default page 3 Create form.
When I've selected multiple values in my check box in the form, the data in the interactive report appears as one line with colons separating the selected values like this: Dog:Cat:Bird
What I would like is to have the data appear in the interactive report column as a multi-line list like this:
Dog
Cat
Bird
I can work around this by modifying the SQL code in the Region Source of the Region Definition of the report (Default Page 1 interactive report) to replace the colons with <br>
SELECT replace("PETS_CHOSEN",':','<br>') "PETS_CHOSEN", FROM "MYAPP" Note: this doesn't format properly in the posting. I replace the colon with a html br
This works, but seems to be a hack to me. I am guessing that I've missed a simple option setting somewhere, but I can't find it.
The other problem with this solution is that when I export the report to Excel, what is exported is Dog<br>Cat<br>Bird, which is seems worse than colons.
Thanks,
- Morgan
Edited by: mnrussel on 16-Feb-2009 04:13Hi Morgan,
I think you have at least two choices:
1 - Replace the colons with ', ' (comma and space) - sort of reasonable on screen and in an export
2 - Create a second page that has the same report but uses the "export: csv" template. Create a manual link to this page to replace the standard Export link. When such report pages are requested, they download immediately instead of displaying. You can, therefore, use commas in this one and <br> tags in the on-screen report version
Andy
ps - To display tags in a post, use &lt; for < and &gt; for > -
I have an interactive report
I want to include
where dte between to_date(:p38_from_date,'mm/dd/yyyy') and to_date(:p38_to_date,'mm/dd/yyyy')
I have 2 date pickers and they both format 'mm/dd/yyyy' I can not get this to work
Above what I am doing here is i want to include a NVL on each date parameter in the SQL statement.
nvl(:p38_from_date, '01/01/2009') and '12/31/2050'
I have looked at this forum extensively and I may be a little thick when it comes to dates in apex.I've had something similar and found it was a problem with the date strings. In my case, I wasn't handling a month that didn't have a leading zero properly, so it was an easy fix.
Another thought is, what if you put a SELECT * FROM () around your UNIONed query and did the field comparison on the outer field? I'm guessing something's messing up in one of the UNIONed SELECTs.
Feuerstein had sample code for taking in a string that supposedly held a date and matching it to multiple possible format strings, returning a date. Maybe you could try that?
Good luck,
Stew -
How to get .oce to talk to DAS & bring back data in Interactive Reporting?
Hi Hyperion Experts,
This is also a fairly basic question, I use Hyperion 9.3.1 and I have Shared Services, Workspace and Interactive Reporting Studio running on our Windows 2003 Server.
My goal is to import a .bqy document I created in Interactive Reporting Studio into workspace, and be able to click on the "refresh" button and see it refreshes the data from the backend Oracle 10g database.
I have completed the following steps so far,
1. I have created a DSN. This DSN, named "Oracle 10g Data Source", when I clicked on "Test Connection" button, It ran successfully.
2. I have created a new Datasource entry in the DAS service. If I double click on the newly created Datasource entry, the screen would display the following details.
Connectivity Type = Oracle Net
Database Type = Oracle
Enter the name of the Data source = Oracle 10g Data Source
Select the name of the Data source (it is grayed out, nothing selected)
Server/File (it is grayed out, nothing entered)
then, followed by some default connection parameters.
3. I have created a "Oracle 10g Data Source.oce" file using the Interactive Reporting Studio. I saved the .oce file at
C:\Hyperion\BIPlus\data\Open Catalog Extensions\Oracle 10g Data Source.oce
4. I created a new constrProj_Oracle10gOCE.bqy, during the creation, I chose
"Create a new document with Recent Database Connection File" option, then I chose the Oracle 10g Data Source.oce that I have created in step 3. After I log in with host user/password, I have created a data model and I see that it brings back a data set when I clicked on the "process" button. I saved this .bqy document.
5.
I imported the Oracle 10g Data Source.oce and constrProj_Oracle10gOCE.bqy into the workspace under a folder called
Root/MYBI/Test
6. I right click on the constrProj_Oracle10gOCE.bqy document, and chose "Open". It opened with Results section highlighted on the left hand side, and with data showing on the right hand side. However, when I clicked on the "refresh" button, I'd get a message box with a red X. It says,
An Interactive Reporting Service error has occurred -
Failed to acquire requested service.
(2001)
I guess the data I see in this constrProj_Oracle10gOCE.bqy was just the cached data that was brought back when I hit the process button of this .bqy when it was first created in the Studio, and that it never established any connection via the DAS service to the backend.
Could someone please show me what I have done wrong here?
thanks,
hypuser1010EricaHarris,
Yes, the issue is still open. Obviously, I have gone down the path of "Scenario One".
Based on your reply, I have done the following.
There are three things I am configuring here: DSN, DAS and OCE.
1) When I created the DSN,
I started the ODBC Data Source Administrator, Click on second tab "System DSN". I added a new ODBC Data Source.
Data Source Name = Oracle 10g Data Source
TNS Service Name = //146-abc.xyz.com:1521/MYORCL0617
2) I re-created the DAS entry, per your suggestion, I made sure that "the name of the data source will be the host name you specified in your OCE".
Connectivity Type = Oracle Net
Database Type = Oracle
Enter the name of the data source= //146-abc.xyz.com:1521/MYORCL0617
3) for my OCE, I specified
Connection Software = Oracle Net
type of Database = Oracle
on the first screen.
then, on the next screen, I specified
Host = //146-abc.xyz.com:1521/MYORCL0617
I reployed the OCE, the .bqy document and restarted DAS. Yes, my .bqy document does refresh its data successfully from the backend.
However, I am not 100% convinced that the .bqy uses the OCE which talks to the DAS, which talks to the DSN entry and brings data back to the .bqy document.
Here is what I did,
I opened up the DSN entry, changed the TNS Service Name from //146-abc.xyz.com:1521/MYORCL0617 to
//146-abc.xyz.com:1521/NONSENSE. I then restarted DAS and redeployed the .bqy document. the .bqy document is still able to refresh its data. So, I have just proven that the .bqy document does not need a valid DSN entry to work, how come??
Can you (or anyone) please explain the phenomenon that I see?
Also, a very basic question. you know that when you create a .bqy in the Studio, you "import" an OCE into the .bqy document so that the .bqy knows that it should use this OCE to talk to the backend data source. but, when you deploy this .bqy in workspace, how does the .bqy know that it is supposed to go through DAS (and DSN) to interact with the database, rather than the "internal" OCE that was pre-built with this .bqy?
thanks,
hypuser1010 -
Internal error when try to display Interactive Report
Hello Gurus
I'm facing problem with displaying Interactive Reports in Web GUI (CRM 2007). When I try to open existing report or new created one, I see on the display area error "Load failed, Internal error" (no other system errors)
I think all configuration is done well, I have checked it by reports: Z_OLTP_CONFIG_CHECK and Z_OLTP_CONFIG_CHECK_BI, and except error DataSource /CRMBW/BOOL_TEXT is not active, everything is ok.
By the way - how can active this data source, while I can't find it anywhere, even in repository (RSA5)?
I thought maybe problem is with my browser or Flash player, but other functionalities uses flash work good (ie. key figures).
Any hints?
Best regards
LukaszHi Łukasz ,
the answer: CRM Interactive Reporting- "Load failed, Internal error"
Pzdr,
Mateusz -
Chart got hidden when section activates. Interactive Reporting
Hello there.
There's some configuration in my dashboard that maybe has got corrupted, because when I try to open a section previously created with the dashboard studio. The section doesn't displays the chart within it. That's happening to several of my dashboards in my BQY.
Would be really helpful any kind of advice.
Really Thanks in advance.
alesDo you use the catalog manager to put content on your dashboard? This because you have to edit the dashboard layout file manually
And is the chart in the compound layout when you look at the report? This because OBIEE put the compount layout as a default on your dashboard
Is this when you copy the webcat from 1 envorinment to another? Because if you don't zip the webcat on unix (when you are using unix offcourse) then the pathlengths can get to long for windows and then you have a corrupt-ish webcat.
Hope this will help you.. otherwise give us some more info on how and when it happens...
Edited by: Remc0 on 26-feb-2009 22:16 -
How to load a data from XML when a data is clicked in a datagrid
Hi,
I have populated a datagrid with XML data. My requirement is like, whenever a user clicks on a particular data i need to load a popup based on the data that he has selected.
I'm using advanced datagrid in this process and i'm not able to trace the element that the user has selected in the datagrid.
It would be great if someone could help me on how to trace this particular element and how to load the corresponding xml values. It really a burning issue in my project.Will this work for you:
dataGrid.selectedItem.@yourfieldname
with popup:
var popupWindow:TitleWindow = new TitleWindow;
popupWindow = showPopupWindow(DisplayObject(FlexGlobals.topLevelApplication), yourclassname);
popupWindow.someproperty = dataGrid.selectedItem.@yourfieldname
public function showPopupWindow(parent:DisplayObject, WhatToShow:Class):TitleWindow
var popupWindow:TitleWindow =
TitleWindow(PopUpManager.createPopUp(parent, WhatToShow, true));
PopUpManager.centerPopUp(popupWindow);
return popupWindow;
Nothing to write home about, but hope it helps a bit.
Maybe you are looking for
-
Cant open mp4 video, bluetoothed from mobile.
Hi, I am trying to get a video i took on my mobile to work on my mac but it wont open it. when i click to open it says: "Movie could not be opened: Invalid sample description was found in the movie" Its from a samsung mobile and mp4 format - i wonder
-
Too many arguments for stored procedure call
I have a stored procedure with 34 arguments, including the return value. I am trying to call it from java using JDBC thin drivers (jdk11, oracle815), but I get the "wrong number or types of arguments" error message. JDBC-OCI fails also. I saw a refer
-
When i try to run a simple query like select i got the below error ORA-01219: database not open: queries allowed on fixed tables/views only Plz give me sol for this issue thanks in advace
-
I know there is an internal mic but i need to switch the head phone to mic. but in system preference then sound folder it does not give me the option to make the mic an imput. but when i goto about this computer it says it is compatable how do i ma
-
Hi, this is probably a pretty basic problem but it's confusing me... I have an Edirol PCR800 and Mainstage....that's it. When I attach a sustain pedal (and Ive tried 4 now), Mainstage sees the pedal as moving upwards when I press down on it. The resu