Page 1 of 1

Generate PDF report with user define Name

Posted: Sun Feb 11, 2007 4:11 am
by cshekhar.patil
Hi All,

I am trying to generate a PDF report and mailing the same through my application using reports 6i. But the generated report has the name "Report.PDF" and the sent mail has the subject "Report.PDF", i want either to change the name of generated report or the subject line anything will do for me. Can anyone out there can help me ?

[:)]

Posted: Fri Feb 16, 2007 4:57 am
by ahmadbilal
Use This Script to generate file with your specif(in this case user id ) filename at runtime


Declare
mUnt VarChar2(50);
PL_ID ParamList;
RG_ID RecordGroup;
Fil_Na VarChar2(70);

Begin
Select U_Name, Descr InTo mUnt, Fil_Na From users Where Uid= :Global.Uid;
<b> Fil_Na := '\'||Fil_Na||'_'||SubStr(:Prd,1,3)||'_'||SubStr(:Prd,6,4)||'_Salalry.txt';</b> PL_ID := Get_Parameter_List('TmpData');
IF Not ID_Null(PL_ID) Then
Destroy_Parameter_List( PL_ID );
End IF;
PL_ID := Create_Parameter_List('TmpData');
-- Add_Parameter(PL_ID,'Voucher_Qry',Data_Parameter,'Voucher_Query');
Add_Parameter(PL_ID,'Unt', Text_Parameter, :Global.Uid);
Add_Parameter(PL_ID,'Unt_Name', Text_Parameter, mUnt);
Add_Parameter(PL_ID,'Prd', Text_Parameter, :Prd);
Add_Parameter(PL_ID,'ParamForm', Text_Parameter, 'NO');
<b>Add_Parameter(PL_ID,'DesName', Text_Parameter, Fil_Na);</b>
Run_Product(REPORTS,'VHR_SALARY.rep', SYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, Null);
End;