locked
Alignment problem while crystal report exporting to PDF

    Question

  • I am using crystal report in asp.net 2.0.
    I got proper alignment in crystal report but when i export report to PDF, the alignement get disturbed.

    Please help me ASAP.
    • Moved by eryang Monday, November 09, 2009 3:30 AM wrong forum (From:.NET Base Class Library)
    Friday, November 06, 2009 3:47 PM

Answers

  • HemangiK

    this is almost 100% to do with the size and placement of your fields and headers in the report.
    If fields overlap in the report or they stray outside of the header boundaries you want them under, then it messes the format of the columns in the export.

    What I do when I'm generating reports for export is to undersize the fields in the columns to ensure there is no overlap of formatted data.
    Then when the export is done the whole of the field gets exported but the columns get identified correctly and all the data is aligned properly.

    Regards

    Rupert
    the problem is not what you don't know it's what you think you know that's wrong
    • Marked as answer by Harry Zhu Friday, November 13, 2009 2:02 AM
    Monday, November 09, 2009 2:52 PM

All replies

  • HemangiK

    this is almost 100% to do with the size and placement of your fields and headers in the report.
    If fields overlap in the report or they stray outside of the header boundaries you want them under, then it messes the format of the columns in the export.

    What I do when I'm generating reports for export is to undersize the fields in the columns to ensure there is no overlap of formatted data.
    Then when the export is done the whole of the field gets exported but the columns get identified correctly and all the data is aligned properly.

    Regards

    Rupert
    the problem is not what you don't know it's what you think you know that's wrong
    • Marked as answer by Harry Zhu Friday, November 13, 2009 2:02 AM
    Monday, November 09, 2009 2:52 PM
  • Hi Rupert,

    Thanks for your reply.
    I have two field from which i want one field to be bold and other one with normal font.
    So i use formula field and concatenate these two field.

    Below is my formula field,
    ( 'Rating : ' + '<b>' +{myfield name} + '</b>') and then i go in Format editor and change 'text interpretation' from 'none' to 'HTML text'. and make Horizontal alignment to 'right'.
    When i run crystal report (.NET 2.0), formatting is OK but when i export to PDF, this field not align to right.

    When i use HTML tags in crystal report then only this formatting get disturbed after exporting to PDF else not.

    Please help me.

    Regards,
    Hemangi

    Friday, November 13, 2009 5:25 AM
  •  

    Hi,

     

    I am using Crystal Report 2008.

    I had the same problem when I export Crystal Report to PDF only on a production machine at run-time.

    The testing report was pretty simple - header and 3 fields, one page.

    But as soon as I export to PDF, the PDF version had been broken into 7 pages and zoom was about 500% .

    I found solution.

     

    There were no printers defined on server. So when you design  your report make sure go to File -> Page Setup and

    check No Printer(optimize for screen display).

     

    This should fix your problem and may be help someone else.

     

     

     

    • Proposed as answer by varunbhagia Thursday, January 27, 2011 5:32 PM
    Friday, July 23, 2010 6:38 PM
  • @SergoT: Your suggestion fixed my problem. Thanks.
    Thursday, January 27, 2011 5:33 PM