cancel
Showing results for 
Search instead for 
Did you mean: 

Odd behavior of PrintOptions.CopyFrom

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)