オートメイションエラー及びOE プロパティエラーについて
お世話になります。
「Crystal Reports XI + VB6 + MySQL」を使用して帳票出力してます。CrystalActiveXReportViewerコントロールを使って、PrintOutで印刷しています。
set report1 = New CR_XXXXXX
CrystalActiveXReportViewer1.ReportSource = report1
CrystalActiveXReportViewer1.ViewReport
report1.PrintOut False
リリース先で、何回が印刷した後、オートメイションエラーが返されます。帳票は印刷されているようなので無視する様に改修すると、今度はCrystal report側でOE プロパティエラーが出力されました。(それでも一様印刷はされていますが、エラーを消せません。)
何か解決方法はないでしょうか。
説明が足りなくて申し訳けありませんでした。
New CR_XXXXXXはいろんな帳票を出力している為、その仮称です。この現象は複数の帳票にて発生しています。rpt ファイルを作成してVB6に取り込んだものも、VB6のデザイナーで作成したものも両方あります。
印刷指示画面にCrystalActiveXReportViewerコントロールを非表示で貼付け(CRViewer1と名称を変更してます)、ボタンクリックでプレビュー画面を出さずに印刷しています。
以下にもう少し具体的なコードを記述します。
Dim Report As CR_keisansyo2A
Set Report = New CR_keisansyo2A
・ CR_keisansyo2AはVBのデザイナーでの名称
・ ここでパラメータの設定をしています。
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
・ ここで印刷の確認メッセージを表示
Report.PrintOut False
Set Report = Nothing
このあと別の2帳票(別のrptファイル)を同様に続けて出力しています。
3帳票出力後、指示画面から再度印刷ボタンで印刷する行為を何度か繰り返すとオートメイションエラーが発生します。
このケースが一番良く発生しますが、3帳票でなく1帳票だけのケースでも発生することがあります。
u201DOE プロパティーエラーu201Dはu201DQE プロパティーが見つかりませんu201Dの間違えでした。申し訳けありません。
これは上記のエラーがでても、印刷はされているようなので
上記のエラーを無視するようにした時に、Crystal Reportのタイトルで出力されたエラーメッセージで、Crystal Reportが出力しているものと思われます。内容はわかりません。
以下に無視するコードを簡単に記述します。
On Error Resume Next
・省略
ReportB.PrintOut False
Set ReportB = Nothing
If Err.Number <> 0 And Err.Number <> -2147417848 Then
GoTo Errhandler
Else
If Err.Number = -2147417848 Then
Err.Clear
End If
End If
Errhandler:
エラーステータス設定
以上 なるべく詳細に書いたつもりですが、不足の情報についてはどんどんご指摘ください。
よろしくお願いいたします。
Similar Messages
Maybe you are looking for
-
During an app update it froze and has said waiting for 2 days and I am unable to open or delete
During an app update it froze and has said waiting for 2 days and I am unable to open or delete. How do I recover my app?
-
Balance mismatching between FAGLB03 and FAGLL03?
Hello Experts, I found difference in balance in one of my Bank payment clearing GL Account in faglb03 and fagll03 report. But when i double click on "Cumulative balance column for any month the balance is matching with the balance of fagll03 report.
-
Installing PSE 12 on my Mac.
Goodmoring. I just bought the software of PSE 12_NL. But I can not install it on my Mac. Can someone help me? I have to install it on my Imac and then share so I can use it on my MacBook Air.
-
Web pages from one computer to another
Hi, While in Italy for two months I made a large number of web pages on .mac from over 1000 pictures. These pages are on my MacBook. When I returned I successfully transferred the pictures from my MacBook to my iMac. HOWEVER, neither the smart albums
-
I downloaded Asteroids and Froggster Widgets. Both show the Quiktime logo with a question mark? I have Quicktime installed and functioning. Any ideas?