Home » Developer & Programmer » Forms » Forms & Reports 6i
Forms & Reports 6i [message #188961] Tue, 22 August 2006 10:29 Go to next message
Prince
Messages: 32
Registered: December 2001
Member
I have a form and several reports (6i) running on an 9i database. The form calls several reports and writes the output of those reports to a directory on our server in .pdf format. For some odd reason, it doesn't work anylonger after we added 2 more reports and tried to test the process in the our test environment even though all parameters are passed successfully. Here is a sample of the code:
PROCEDURE Proc_Run_Report
     (v_Report_Id   IN VARCHAR2,
      v_Start_Date  IN DATE,
      v_End_Date    IN DATE,
      v_freq        IN VARCHAR2)
IS
  v_Destination_Directory   VARCHAR2(2000);
  v_Destination_Directory2  VARCHAR2(2000);
BEGIN
  IF Upper(v_Report_Id) = 'MX0810R' THEN
    IF :PARAMETER.prm_Destination_Directory IS NULL 
       AND :PARAMETER.prm_Report_Id IS NULL  THEN
      IF v_freq = 'D' THEN
        v_Destination_Directory := '"\\testapp\c$\bsreport\Productivity\Corp Service Production by Percent\day\MX0810R'
                                   ||To_Char(v_End_Date,'RRRRmmdd')
                                   ||'.PDF"';
      ELSIF v_freq = 'M' THEN
        v_Destination_Directory := '"\\testapp\c$\bsreport\Productivity\Corp Service Production by Percent\Month\MX0810R'
                                   ||To_Char(v_End_Date,'RRRRmmdd')
                                   ||'.PDF"';
      ELSIF v_freq = 'Q' THEN
        v_Destination_Directory := '"\\testapp\c$\bsreport\Productivity\Corp Service Production by Percent\Quarter\MX0810R'
                                   ||To_Char(v_End_Date,'RRRRmmdd')
                                   ||'.PDF"';
      ELSE
        v_Destination_Directory := '"\\testapp\c$\bsreport\Library Reports\Corp Service Production by Percent\Cyear\MX0810R'
                                   ||To_Char(v_End_Date,'RRRRmmdd')
                                   ||'.PDF"';
      END IF;
      
      :PARAMETER.prm_Type := 'PDF';
    ELSIF :PARAMETER.prm_Destination_Directory IS NOT NULL  THEN
      v_Destination_Directory := :PARAMETER.prm_Destination_Directory
                                 ||'MX0810R'
                                 ||To_Char(v_End_Date,'RRRRmmdd')
                                 ||'.' ||:Parameter.prm_Type;
    END IF;
    
    Proc_Run_Non_Standard_Report('MX0810R',v_Start_Date,v_End_Date,v_Destination_Directory,
                                 'P_1','P_2',:PARAMETER.prm_Type);
    
    IF (v_freq = 'M')
       AND (:PARAMETER.prm_Destination_Directory IS NULL )
       AND (:PARAMETER.prm_Report_Id IS NULL ) THEN
      v_Destination_Directory := '"\\testapp\c$\bsreport\Library Reports\Corp Service Production by Percent\Month\MX0810R'
                                 ||To_Char(v_End_Date,'RRRRmmdd')
                                 ||'.PDF"';
      
      Proc_Run_Rpt('MX0810R',v_Start_Date,v_End_Date,v_Destination_Directory,
                                   'P_1','P_2',:PARAMETER.prm_Type);
    END IF;
  END IF;
END;


While Proc_Run_Rpt IS ....
PROCEDURE Proc_Run_Rpt
     (p_Report_Id           IN VARCHAR2,
      p_Start_Date          IN DATE,
      p_End_Date            IN DATE,
      p_Report_Destination  IN VARCHAR2,
      p_Type                IN VARCHAR2)
IS
  v_rep_tx     VARCHAR2(200);
  v_Pl_Id      PARAMLIST;
  v_Report_Id  VARCHAR2(200);
BEGIN
  :dsp_report_name := p_Report_Id;
  
  Synchronize;
  
  v_Report_Id := p_Report_Id
                 ||'.REP';
  
  Set_Report_Object_Property('REP_OBJECT',Report_FileName,v_Report_Id);
  
  IF p_Report_Destination IS NOT NULL  THEN
    Set_Report_Object_Property('REP_OBJECT',Report_deStype,FILE);
    
    Set_Report_Object_Property('REP_OBJECT',Report_desName,p_Report_Destination);
    
    Set_Report_Object_Property('REP_OBJECT',Report_desFormat,p_Type);
  ELSE
    Set_Report_Object_Property('REP_OBJECT',Report_deStype,Printer);
    
    Set_Report_Object_Property('REP_OBJECT',Report_desName,'');
    
    Set_Report_Object_Property('REP_OBJECT',Report_desFormat,'');
  END IF;
  
  v_Pl_Id := Create_Parameter_List('T1');
  
  Add_Parameter(v_Pl_Id,'START_DATE',Text_Parameter,To_Char(p_Start_Date,'MM/DD/RRRR'));
  
  Add_Parameter(v_Pl_Id,'END_DATE',Text_Parameter,To_Char(p_End_Date,'MM/DD/RRRR'));
  
  v_rep_tx := Run_Report_Object('REP_OBJECT',v_Pl_Id);
  
  Destroy_Parameter_List('T1');
END;


Does anything look out of place here? If not, then is there another reason why I am getting a syntax error.

Thanks.

[Updated on: Tue, 22 August 2006 10:40]

Report message to a moderator

Re: Forms & Reports 6i [message #191576 is a reply to message #188961] Thu, 07 September 2006 03:06 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: Forms & Reports 6i [message #191695 is a reply to message #188961] Thu, 07 September 2006 15:39 Go to previous message
Prince
Messages: 32
Registered: December 2001
Member
Yes I was able to get the problem resolved. Thanks!!!
Previous Topic: ORA-29278:SMTP transient error
Next Topic: How to Invoke crystal reports from forms 10g? & Calling crystal report viewer from oracle forms
Goto Forum:
  


Current Time: Sat Dec 10 06:55:37 CST 2016

Total time taken to generate the page: 0.05550 seconds