cancel
Showing results for 
Search instead for 
Did you mean: 

CrystalReports バージョン2020とCrystalReports バージョン6.0.1のエラー情報、プリンタ名

0 Kudos

元々「CrystalReports バージョン6.0.1」で動作しているアプリケーション資産を次期のバージョン「CrystalReports バージョン2020」で動作できるように帳票の動作検証をしておりますが、いくつか不明点があります

詳細はまとめましたが、ご存知であれば下記の質問内容をご教授いただければと思います。

1)エラー情報について

VB6.0版では、出力の際に発生したエラーは、【.LastErrorString】にエラー情報を取得していましたが、

VB.Net 版では、プリンタ出力【.PrintToPrinter()】や、ファイル出力【.SaveAs()】の場合は、

いずれも【err.description】で取得する事になりますか?

(ビューワ表示の場合は、エラーイベントの第2引数【e.Exception.Message】で取得出来るという認識でいます)

2)プリンタ名についてVB6.0版では、プリンタを指定する際にプリンタ名以外にも、プリンタドライバ名【.プリンタドライバ】や、プリンタポート名【.PrinterPort】を指定していましたが、VB.Net 版には、これらを設定する箇所がない様に見受けられるのですが、VB.Net では、プリンタ名のみでプリンタを指定する事になるのでしょうか?

0 Kudos

使用している環境情報は環境情報.txtにまとめております

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

1. You'll get the error information the same way you would for any other VB.NET Exception - there's nothing special about the errors thrown by the SDK.

2. The latest versions of the SDK depend on having the printer configured in the Devices and Printers settings in Windows. This is because there are changes in the newer versions of Windows that do not allow access to printers that are not configured there. So, you no longer need to set the port and driver information - you just reference the printer by name.

Also, the .NET SDK no longer comes packaged with Crystal Reports. Instead, you have to download it through the links in the wiki at https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads. You'll download a .exe to install the integration with Visual Studio - right click on the .exe and select "Run as Administrator" to install it. The other downloads are the various types of runtime installs that you use only when deploying your application. NOTE: You cannot just copy the SDK assemblies over with your application. Instead, you MUST use one of the runtime installers so that all of the necessary registry entries are set.

This page also has links to license information and sample code, including a sample application that demonstrates how to print from the SDK.

-Dell

Answers (0)