anas_zet
Jul 26th, 2008, 01:50 PM
When I am developing a VB6 WinForm applicaion with Crystal Report,I found a problem about custom paper size. And then I look it for the document of Crystal Report and It says:
The reason why a report created using a custom paper size prints differently once it is distributed is that the report’s paper size ID (Form ID) is saved with the report file. It is the ID value that is saved and not the name of the paper size because the Crystal Reports print engine uses the operating system's DEVMODE structure to save the printer information with the report. This is by design, and affects all Crystal Reports development tools.
To pass a custom paper size ID to a report using the Crystal Reports Designer Component, use the following code:
rpt.PaperSize = 133
Even if the custom paper size ID is passed to the report in code, the report may still print differently when distributed.
The DEVMODE structure contains the ID value of the paper size, not the name. Therefore, when the application is deployed to another computer, the custom paper size ID is not the same as it was on the development computer. This custom paper size ID may be a different number on every computer it is deployed to.
To resolve this issue, the application needs to determine the custom paper size ID based on the name of the Form, then pass that Form ID to Crystal Reports.
Help me,please! How can I get the Form ID depends on the Form Name :cry: ...........Thanks!!!!!!!
The reason why a report created using a custom paper size prints differently once it is distributed is that the report’s paper size ID (Form ID) is saved with the report file. It is the ID value that is saved and not the name of the paper size because the Crystal Reports print engine uses the operating system's DEVMODE structure to save the printer information with the report. This is by design, and affects all Crystal Reports development tools.
To pass a custom paper size ID to a report using the Crystal Reports Designer Component, use the following code:
rpt.PaperSize = 133
Even if the custom paper size ID is passed to the report in code, the report may still print differently when distributed.
The DEVMODE structure contains the ID value of the paper size, not the name. Therefore, when the application is deployed to another computer, the custom paper size ID is not the same as it was on the development computer. This custom paper size ID may be a different number on every computer it is deployed to.
To resolve this issue, the application needs to determine the custom paper size ID based on the name of the Form, then pass that Form ID to Crystal Reports.
Help me,please! How can I get the Form ID depends on the Form Name :cry: ...........Thanks!!!!!!!