- PR -

CrystalReport Export時のログオン失敗

1
投稿者投稿内容
たい
会議室デビュー日: 2005/02/28
投稿数: 1
投稿日時: 2005-02-28 17:30
初めまして「たい」と申します。

以前からこちらの掲示板で勉強させて頂いています。
掲示板の情報より解決策を見出せなかったので投稿させて頂きます。
(見落としていたならば、申し訳ありません)

<現象>
CrystalReportでPDF形式でExportした際、「ログオンに失敗」というエラーが出ます。

<開発環境>
・サーバ:WindowsServer2003、クライアント:Windows2000Pro
・開発言語:Visual Studio .NET 2003 (ASP.NET)

こちらの掲示板を参考にさせて頂くと、この問題の原因として、DB接続パスワードを設定する方法が記載されていますが、このパスワードはSQLServer認証の場合のみ必要なのでしょうか。
(Windows認証でDBに接続している為、パスワードを設定しておりません。)
また、Export先のフォルダに「NETWORK SERVICE」権限も設定しています。

<ソース>
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim Fname As String

crReportDocument = New ReportDocument
'レポートのLoad
crReportDocument.Load(Request.PhysicalApplicationPath & "Report.rpt")
'出力先
Fname = Request.PhysicalApplicationPath & "Exp\" & Session.SessionID.ToString & ".pdf"
crDiskFileDestinationOptions = New DiskFileDestinationOptions
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
'出力先
.ExportDestinationType = ExportDestinationType.DiskFile
'エクスポート形式
.ExportFormatType = ExportFormatType.PortableDocFormat
End With

'レポートのエクスポート
crReportDocument.Export()  ←ここでエラーになります

些細な事が原因なのかもしれませんが、行き詰っている状態です。
以上、よろしくお願い致します。
1

スキルアップ/キャリアアップ(JOB@IT)