Q: How to include multiple email addresses in Bursting the report?
Created a new custom
lookup “Venkat_EMAIL_IDS” to maintain email ids. As length of email id can be more than 30
characters, we maintained them in Description field.
1.
Create a new data model.
2.
Create a LOV for email ids
using SQL Query.
NOTE: Please note that
we could not find any solution if we use static list of email ids in the data
model LOV. Hence, email ids should come
from a SQL query.
3.
Create a menu type parameter as
shown below. Please make a note of
highlighted fields.
4.
Create a sample data model as below. For demo purpose, I used below sample
query.
5.
Add bursting query as shown
below.
Here is full bursting
query:
SELECT
1
as "KEY",
'Test Template' TEMPLATE,
'RTF' TEMPLATE_FORMAT,
'pdf' OUTPUT_FORMAT,
'SampleReport' output_name,
'EMAIL' DEL_CHANNEL,
(select LISTAGG(description, ',')
WITHIN GROUP (ORDER BY description)
AS email_ids
from fnd_lookup_values
where lookup_type =
'UMA_EMAIL_IDS'
and enabled_flag = 'Y'
AND LANGUAGE = 'US'
and description in
(:P_EMAIL_IDS)) PARAMETER1,
null
PARAMETER2,
'No-reply@xxxx.com' PARAMETER3,
'SampleReport' PARAMETER4,
null
PARAMETER5,
null PARAMETER6,
null
PARAMETER7
FROM dual
6.
Create a Report with Bursting
option enabled.
Development is
completed.
Now you can run this
report and select one or more email ids in the Email Ids parameter. Report will be sent to ALL the email ids
selected.
We tested this
successfully. Hope it helps.
You may enhance it
further as per your requirement.
Comments
Post a Comment