.NET Framework Developer Center > Visual Studio Forums > Crystal Reports for Visual Studio > Alignment problem while crystal report exporting to PDF
Ask a questionAsk a question
 

AnswerAlignment problem while crystal report exporting to PDF

  • Friday, November 06, 2009 3:47 PMHemangiK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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 byeryangMSFTMonday, November 09, 2009 3:30 AMwrong forum (From:.NET Base Class Library)
    •  

Answers

  • Monday, November 09, 2009 2:52 PMRupert Davis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    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

All Replies

  • Monday, November 09, 2009 2:52 PMRupert Davis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    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
  • Friday, November 13, 2009 5:25 AMHemangiK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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