Two questions on .net Printing with PrintSheet

Posted by: duncan on 8 September 2017, 12:45 pm EST

  • Posted 8 September 2017, 12:45 pm EST

    Hi  I have two questions about getting PrintSheet to work in the 1.1  .Net print environment.


     


    Q10 Basically, I would like


     


    printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs ev) event to do what the far out demo does, But using PrintSheet  instead of all those loops?


     


    In affect I would like PrintSheet to print using the ev parameters passed in  (see Boilerplate code below)


     


    Q2  Also I would like to concatenate two sheets together in one print run – one after the other.  A previous post suggested using OwnerDraw,  how would I get spread to expose an OwnerDraw function?.


     


    Much appreciate you help


     


    Many thanks indeed Duncan



     


    private System.Drawing.Printing.PrintDocument printDocument1;


    private System.Windows.Forms.PageSetupDialog pageSetupDialog1;


    private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;


    private System.Windows.Forms.PrintDialog printDialog1;


    private FpSpread quoteSpread1;


    private FpSpread quoteSpread2;


    //


    // Business logic that set up the quoteSpread1& quoteSpread2


    //


    public void Print()


    {


    DialogResult aResults;


    printDialog1.Document = printDocument1;


    aResults = printDialog1.ShowDialog();


    if (aResults == DialogResult.OK)


    {


    printDialog1.Document.Print();


    }


    }


    public void PrintPreview()


    {


    printPreviewDialog1.Document = printDocument1;


    printPreviewDialog1.ShowDialog();


    }


    public void PrintPageSetUp()


    {


    pageSetupDialog1.Document = printDocument1;


    pageSetupDialog1.ShowDialog();


    }


     


    private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs ev)


    {


    quoteSpread1.PrintSheet(0); // my first spread screen


    // quoteSpread2.PrintSheet(0); // my second spread screen


    }

  • Replied 8 September 2017, 12:45 pm EST

    I think I have work it out,  Thanks Kevin for you post 29835,   I am just converting to c#


     


    thanks

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels