Skip to Content
avatar image
Former Member

Odd behavior of PrintOptions.CopyFrom

Hello, All.

I am currently developing a C# app, framework 3.5, using CR 11 R2.

What is going on is that I am showing the standard windows Print Dialog, and attempting to print a report.

Code snippet:

reportDocument.FileName = Path.Combine(filePath, fileName);

reportDocument.PrintOptions.CopyFrom(printOptions.PrinterSettings, printOptions.PageSettings);

reportDocument.PrintToPrinter(printOptions.PrinterSettings.Copies,

printOptions.PrinterSettings.Collate, printOptions.PrinterSettings.FromPage,

printOptions.PrinterSettings.ToPage);

The odd behavior is in the call to CopyFrom.

It does not pull all of the settings after the first call. Specifically, it is not getting the duplex or printer name. While debugging it, I have dicovered that a second call to CopyFrom with the same parameters will result in it getting the rest of the settings.

So, the standard battery of questions from someone very confused:

Has anyone encountered anything like this before?

Do you have any idea as to why it is doing this?

Can you think of a more elegant solution/workaround than calling to CopyFrom twice?

Thank you in advance!

-Stephen Erickson

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 04, 2008 at 08:26 PM

    Hi, Stephen;

    I haven't heard of any issues with the .CopyFrom. But, there were some other printer issues. Have you installed the lastest service pack for CR XI R2?

    Service Pack 4 is the latest and can be downloaded from:

    http://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm

    Regards,

    Jonathan

    Add comment
    10|10000 characters needed characters exceeded