Skip to content

How To Set Paper Layout in Crystal Report

Munish

Asked May 15, 2007, 4:39 AM EDT1 answer
Share
LinkedInX
Hi Everyone!

I have a problem regarding Paper Layout Setup option using crystal report tool. Whenever I deploy My Project In another Web Server i have to set paper layout i.e. Fanfold 15 X 12 in manually for each report I have in my project.

Plz help to set this property becoz it is not possible to set it on web server every time i deploy my Web Solution.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi Guys!

    I Found Some Sort of solution of Above Problem. if anybody find better then tell me. The Solution i Find Out is.
    I write Code for find out RawKind Number i.e. Paper Size Number.

    Finding Of RawKind Property Of Any Paper Size.

    System.Drawing.Printing.PrintDocument PrintDoc=new System.Drawing.Printing.PrintDocument();

    PrintDoc.PrinterSettings.PrinterName="Wipro LQ 1050+DX";

    System.Drawing.Printing.PaperSize PkSize=new System.Drawing.Printing.PaperSize();

    for (int i = 0; i <= PrintDoc.PrinterSettings.PaperSizes.Count - 1; i++)

    {

     if (PrintDoc.PrinterSettings.PaperSizes[i].PaperName == "Fanfold 15 x 12 in")

     {

     PkSize = PrintDoc.PrinterSettings.PaperSizes[i];

     }

    After that when i fin the size of given paper i.e. 124

    i embedd following line in my program.

    myReportDocument.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)124;

    myReportDocument.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait;

    Hope it may works for others too.

    0