I have a problem in the reports.
I have created a report which involves a 'Form_Letter' & 'Tabular' Styles.
In the Subject line of the form_letter_text there is a field selected from database-table-column that is as below:
Sub: Issue of Interest certification against ACCT No.:&<ACCT_NO>.
The above &<ACCT_NO> populates the 'Acct No', when enter the Customer_ID in the report parameter:
This works fine if a customer has only one Acct_No.
The problem arises when a customer has more than one Acct_No.
If a Customer has more than 1 account number; say 3 Accounts;
then in the Subject line, 3 Acct_No's should be displayed.
But I'm getting different letter for different 'Acct_No' in 3 different pages.
I want it to display only 1 page instead of 3pages.
All the Acct_Nos of that particular Customer_ID must be displayed in the Subject_Line when i run the report.
Can anybody help me with this?
You can use LISTAGG in Oracle 11g:
with accounts as (
select 'acct1' acct_no from dual
union all select 'acct2' acct_no from dual
union all select 'acct3' acct_no from dual)
select listagg(acct_no, ', ') within group (order by acct_no)
acct1, acct2, acct3
function accFormula return Char is
declare cursor c1 is
select rownum,acct_no from accounts where customer_id=:cust_id;
for i in c1 loop
if c1%notfound then
I think its helpful to you.