2 Replies Latest reply on Nov 27, 2012 9:31 PM by tony.g

    Reports generated to the wrong output type

      Dear All,

      I'm looking for a bit of help with a strange situation calling reports from Forms. I did post this in the forms section yesterday, but with no replies yet, I thought I might put it in the reports section as well. It is primarily a reporting problem, but might have to do with the forms/reports interface.

      This problem I'm getting in both 11.1.1 and 11.1.2 of Forms/Reports. Client is WinXP/7, Weblogic server is Linux (SLES11 and Red Hat - issue on both)

      So the issue is

      1. calling a report with output as RTF (this works fine and we use OLE2 to open the report in Word)
      2. Next call the same report though change the output selector to Previewer which causes the report to be created as PDF in the cache and then opens it in IE (this too works fine)
      3. Now if we try and do number 1 again and run the same report again and choose to generate as RTF and open in word, it erroneously generates the report in PDF format but with an .RTF extension.

      Of course most of the time people would not want to do this, but the client has identified this issue and classified it ias a bug, so we need to fix it (and it doesn't happen in the Forms6i version it is migrated from).

      I have tried to ensure that the parameter list is correctly deleted and re-created, which appears to be the case. I also tried to generate a new unique parameter list for every run, which made not difference to the problem.
      If I choose to run a completely different report, the problem has reset itself. So the problem exists only when I've chosen the PDF output and then run the same report thereafter as RTF output to a file.

      Code to prepare for the RTF option is:
      Add_Parameter(pl_id,'desname',TEXT_PARAMETER,l_temp_env||'/'|| p_report || '.rtf');
      l_report_desname := l_temp_env||'/'|| p_report || '.rtf';
      l_report := p_report;

      Code used to prepare for PDF option is:
      l_report := p_report;

      Any ideas gratefully received.

        • 1. Re: Reports generated to the wrong output type
          Hi Tony,

          Make sure to clear your parameter list every time.

          Use :- Destroy_parameter_list('Parameter list name')

          Also 2nd thing l_report_desname set properly in both the case.
          • 2. Re: Reports generated to the wrong output type

            Thanks for your response.

            I have worked on this for a little time and have not resolved the problem.

            I think that the parameter list i snot getting destroyed.

            I have this code:
                 pl_id := Get_Parameter_List('MYREPORT'); --||TO_CHAR(SYSDATE,'HHSS'));
                 IF NOT Id_Null(pl_id)
                 lib_soft_message('I',FALSE, 'Deleting parameter list');
                 IF NOT Id_Null(pl_id)
                 lib_soft_message('I',FALSE, 'It still exists');
                 lib_soft_message('I',FALSE, 'definately gone');      
                 end if;     
                 END IF;
                 pl_id := Create_Parameter_List('MYREPORT');

            I see the following messages (the second time through):
            1. Deleteing parameter list
            2. It still exists

            So this seems to be the problem.


            Edited by: tony.g on Nov 27, 2012 9:29 PM