This discussion is archived
4 Replies Latest reply: Dec 6, 2012 11:52 PM by Marwim RSS

Format PDF file

MarioAssis Newbie
Currently Being Moderated
Through SQLDeveloper I am exporting data from a query to a PDF file but data from adjacent columns are appearing on more than one page. Can I format it?
I'm using SDLDeveloper version 3.2.10.09.
Thanks,
  • 1. Re: Format PDF file
    Gary Graham Expert
    Currently Being Moderated
    Hi Mario,

    According to the developer, when exporting a query result as a PDF, the only options currently available are in:
    File > Page Setup
    You can switch the orientation from Portrait to Landscape, and/or adjust the margins.

    You can update the default PDF Preferences by selecting from the menu Tools->Preferences... and from the Preferences tree select Database->Utilities->Export->PDF Format->Table Layout. You can change the default font and font sizes.

    Hope this helps,
    Gary
    SQL Developer Team

    Edited by: Gary Graham on Dec 5, 2012 11:21 AM
    And, if you run the query as a User-Defined Report, there are options in (right-click)
    Edit > Edit Report > Master Report > PDF
    to control the same orientation, margins, plus the font and font size. Those may help more than using landscape and cutting down the margins.

    Edited by: Gary Graham on Dec 5, 2012 5:13 PM
    Added comment on default PDF Preferences
  • 2. Re: Format PDF file
    Marwim Expert
    Currently Being Moderated
    Hello Gary,

    I think the basic problem is, that you cannot format the width of a column. Not only in PDF, but in the reports generally (formatting simply does not work as expected {message:id=3539324}). Whenever you have a column with a lot of text you will get an output that breaks any screen width and you have to scroll horizontally a lot.

    The only workaround I know is to define a HTML Report, but this is a lot more work than just copying an existing statement, a feature thats among my favourites in SQL Developer.

    Regards
    Marcus
  • 3. Re: Format PDF file
    Gary Graham Expert
    Currently Being Moderated
    Marcus,

    From the link you provided, it seems to me the best advice is to export to CSV/Excel. I have always been of the opinion that since PDFs emulate physical books, why implement something that will almost always require scrolling unless the width of a SQL query's output is carefully limited?

    Apparently the ability to generate HTML for an existing report from the reports navigator is on the list of planned future features; however, I have no idea if/when that might come out.

    -Gary
  • 4. Re: Format PDF file
    Marwim Expert
    Currently Being Moderated
    why implement something that will almost always require scrolling unless the width of a SQL query's output is carefully limited?
    I have a report for debug messages.
    batch_id|timestamp                 |message_nr| info                                                                                                                                      |
    --------+--------------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------|
         343|07.12.2012 13:45:34.563482|        27|  This is a very long entry in a VARCHAR2(2000) column that needs a lot of scrolling, because I cannot limit the width of the report column|
    OK, the text will appear in a tooltip box when you hover with the mouse (though not always, but I cannot say when and when not).
    But this does not help, when you have other columns after the wide text. And you have to scroll when you want to see the text with linebreaks, because the button to open the display box is at the end of the column.

    Compare this to
    batch_id|timestamp                 |message_nr| info                               |
    --------+--------------------------+----------+------------------------------------|
         343|07.12.2012 13:45:34.563482|        27|  This is a very long entry in a ...|
    or even better
    batch_id|timestamp                 |message_nr| info                               |
    --------+--------------------------+----------+------------------------------------|
         343|07.12.2012 13:45:34.563482|        27|  This is a very long entry in a    |
            |                          |          |VARCHAR2(2000) column that needs a  |
            |                          |          |lot of scrolling, because I cannot  |
            |                          |          |limit the width of the report column|
    it seems to me the best advice is to export to CSV/Excel
    This is not an option when you simply want to see the report. In the obove example there would be a master report for the batches and a child report with messages for each batch. You would have to export the details for each entry of the master instead of scannig the details immediately.


    Regards
    Marcus

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points