on 10-18-2013 6:42 PM
I am in the process of upgrading my projects from VS2008 to VS2010. We have a couple of programs that print on preprinted forms. Under VS2008 and crystal 10, these reports print properly on the preprinted forms. Under VS2010 and crystal 13, the fields do not align properly. They seem to be squeezed from the top to bottom and side to side.
I have searched and cannot seem to find a solution that will give me the crystal 10 functionality. I have tried the
DissociatePageSizeAndPrinterPaperSize option and that does not restore the functionality.
I have the latest crystal 13 assemblies installed on my development machine. I also have the latest printer drivers. The issue appears to be with changes in crystal 13. If I remove the references to the version 13 assemblies and add the references to version 10, the report prints properly. (I know this is unsupported, but it does work.)
Has anyone worked through and resolved this issue.
Danny
Hi Danny,
Open up one of your reports and check this option off and then save it and test:
OR in code try setting it:
PrintLayout.Scaling = PrintLayoutSettings.PrintScaling.DoNotScale;
Are you using PrintToPrinter Or PrintOutputController to do the printing?
Try this sample app, rename it to *.zip.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don,
Thank you for replying. I tried the following code with no change in the output.
Dim PrintLayout As New CrystalDecisions.Shared.PrintLayoutSettings
PrintLayout.Scaling = CrystalDecisions.Shared.PrintLayoutSettings.PrintScaling.DoNotScale
Dim printerSettings As New System.Drawing.Printing.PrinterSettings
printerSettings.PrinterName = dlgPrint.PrinterSettings.PrinterName
Dim pSettings As New System.Drawing.Printing.PageSettings(printerSettings)
oRpt.PrintToPrinter(printerSettings, pSettings, False, PrintLayout)
I am using the PrintToPrinter option. I don't see a "Center The Page" option on my print dialog. I also don't see that option in the VS2010 crystal designer.
The report alignment is down one line from the top and squeezed in from the side. When I switch back to the 10.x assemblies, the report prints properly.
I did download your project. This crystal report is using a dataset to supply the data. The crystal report is embedded in the project. I can modify my program to use some of the routines if you think that would be helpful.
Danny
Don,
I tried the following with no change in the report.
Dim oLayout As New CrystalDecisions.Shared.PrintLayoutSettings
oLayout.Centered = False
oLayout.Scaling = CrystalDecisions.Shared.PrintLayoutSettings.PrintScaling.DoNotScale
oRpt.PrintOptions.DissociatePageSizeAndPrinterPaperSize = True
oRpt.PrintToPrinter(dlgPrint.PrinterSettings, dlgPrint.PrinterSettings.DefaultPageSettings, False, oLayout)
If I try to manually set the margins using.
Dim margins As CrystalDecisions.Shared.PageMargins
margins = oRpt.PrintOptions.PageMargins
margins.bottomMargin = 0
margins.leftMargin = 0
margins.rightMargin = 0
margins.topMargin = 0
oRpt.PrintOptions.ApplyPageMargins(margins)
I can see the report move to the left. It does nothing for the top margin, which is down one line.
I am open to suggestions, this worked so well in VS 2008 and crystal 10.
DannyHi Danny,
There is very little difference between CR 2008 and CR for VS so it should work. Only thing that could be different is possible the Framework you are using in the new version.
See if ProcessMonitor logs show any difference in registry keys and printer info, could be the printer driver you are using has issue with the updated framework.
Don
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.