Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

error in loading crystal report

Hi, I need to load my report.  i used crystal report 8.5 and it is embedded in vb.net.  i have some problems with the loading.  its says "failed to open document" and then when i hit enter it says again "invalid file format" . i used the microsoft application block.

here's my code:

Dim crReport As New ReportDocument
Dim AppPath As String = Request.PhysicalApplicationPath
Dim intPONumber As Integer = Request.QueryString("PONumber")
Dim dsReport As DataSet = New DataSet
Dim aSQL As SqlHelper
Dim spName As String = "sp_forreport"

strReportName = Request.QueryString("ReportName")
crReport.Load(AppPath + "Reports\CrystalReport1.rpt")
dsReport = aSQL.ExecuteDataset(CommonConstants.PurchaseOrderConnectionString, CommandType.StoredProcedure, spName, New SqlParameter("@purchaseOrderNumber", intPONumber))

crReport.Database.Tables(0).SetDataSource(dsReport)

CrystalReportViewer1.ReportSource = crReport 'gzi
Response.Redirect(AppPath + "Reports\CrystalReport1.rpt")

what have i done wrong?  please help me!!!
0
zgarcia
Asked:
zgarcia
  • 2
1 Solution
 
ajaikumarrCommented:
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now