데이터 세트과 테이블 ("DataTable1")을 만든 다음 해당 데이터 세트를 사용하여 Crystal Report를 만들고 코드 세트의 DataSet 소스를 설정했습니다.인쇄 및 내보내기 버튼이 Crystal Report의 로그인 데이터베이스 서버로 리디렉션됩니다.
Dim dt As DataTable
dt = businessService.GetEmpDetails(SetDBSchema())
dt.TableName = "DataTable1"
Dim Report As ReportDocument = New ReportDocument()
Report.Load(Server.MapPath("EvaluationReport.rpt"))
Report.Database.Tables("DataTable1").SetDataSource(dt)
CrystalReportViewer1.ReportSource = Report
CrystalReportViewer1.RefreshReport()
Report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "Customers")
CrystalReportViewer 도구 모음을 사용하여 보고서를 내보내거나 인쇄하려고하면 데이터베이스 서버에 로그인하도록 리디렉션됩니다.
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" HasExportButton="True" PrintMode="Pdf" AutoDataBind="true" />
ExportToHttpResponse not working.
데이터 세트를 코드에 할당했기 때문에 이러한 문제가 발생한다고 생각합니다. 이러한 문제는 어떻게 해결할 수 있습니까?