3 Replies Latest reply on Jan 11, 2019 4:09 PM by Ananda Basak

    Using dynamic name for report PDF output file

    Ananda Basak

      I am using APEX 5.0 ORDS. I need to print a report page as PDF output file. And I have to set the filename which will contain a page item value. Therefore in the report print attribute, under Output section, in the 'File name' field, I have set the value as Report_&P77_NUMBER., where P77_NUMBER is my page item. But as a result of this, I am getting an output pdf file with the name Report_&P77_NUMBER..pdf

      So the value is not replacing the page item name in the output file name. To verify whether the page item P77_NUMBER itself has the right value, I have displayed it on the page and it is showing proper value. But that value is not being used in the pdf file name.

      I have been searching in internet for many days, but not able to get this right yet. Please suggest how to achieve this.

        • 1. Re: Using dynamic name for report PDF output file
          fac586

          Ananda Basak wrote:

           

          I am using APEX 5.0 ORDS. I need to print a report page as PDF output file. And I have to set the filename which will contain a page item value. Therefore in the report print attribute, under Output section, in the 'File name' field, I have set the value as Report_&P77_NUMBER., where P77_NUMBER is my page item. But as a result of this, I am getting an output pdf file with the name Report_&P77_NUMBER..pdf

          So the value is not replacing the page item name in the output file name. To verify whether the page item P77_NUMBER itself has the right value, I have displayed it on the page and it is showing proper value. But that value is not being used in the pdf file name.

          I have been searching in internet for many days, but not able to get this right yet. Please suggest how to achieve this.

          This is not possible. Despite being promised as an enhancement in 2007, substitution strings are not supported in the output Filename property.

           

          Reference to this in the Filename online help is obviously a documentation bug:

          File Name

          Enter a name for the downloaded document. If you leave this blank, the region name is used as the file name.

           

          Additional Information

          Type: Text

          Supported Substitutions: Application, Page Items and System Variables

           

          Support for dynamic filenames in Report Queries shared components has not materialized either. There is an open feature request for this, although it has attracted minimal support.

          • 2. Re: Using dynamic name for report PDF output file
            Miro Masnoglav

            This is possible for MS Word with InteractivePrints plugin. Users can convert Word to PDF with simple "Save As".

            If this is intersesting, check InteractivePrints plugin on APEX.WORLD.

            • 3. Re: Using dynamic name for report PDF output file
              Ananda Basak

              Thanks a lot. I would like to mark both of your answers as correct answer.

              Though I can't apply the MS Word solution, because our requirement is to directly open/save the PDF file. Therefore I will stay with just a static filename for the output  PDF file for now.

               

              Thanks again.