0

バージョン v4.0.30319 でコンパイルされた参照バージョン 13.0.4000.0 を使用して、Crystal Report で生成されたレポートを印刷するためのこの単純なコードがあります。すべてが特定のポイントまで機能し、その後、不可解に機能しなくなりました。myReportDocument.Load 行を実行すると、アプリケーションはエラー メッセージを表示せずに停止します。vb.net を使用して別のプロジェクトを生成しようとしましたが、内部には同じデータ ソースを指すレポートがあり、すべてが機能します。手を貸してください。ありがとうございました

Dim id_sped As Int32
        id_sped = 1000050
        Me.LetteraVetturaTableAdapter.Fill(Me.DataSet1.LetteraVettura, id_sped)
        Dim myReportDocument As ReportDocument
        myReportDocument = New ReportDocument()
        myReportDocument.Load(My.Application.Info.DirectoryPath.ToString + "\CrystalReport1.rpt")
        Dim ds As New DataSet()
        Dim dt As New DataSet1.LetteraVetturaDataTable
        Dim ta As New DataSet1TableAdapters.LetteraVetturaTableAdapter
        ta.Fill(dt, id_sped)
        ds.Tables.Add(dt)
        myReportDocument.SetDataSource(ds)
        myReportDocument.PrintOptions.PrinterName = My.Settings.stampante_lettere
        myReportDocument.PrintToPrinter(1, False, 0, 0)
4

0 に答える 0