Solved

error in loading crystal report

Posted on 2004-08-05
4
166 Views
Last Modified: 2010-04-23
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
Comment
Question by:zgarcia
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
ajaikumarr earned 45 total points
Comment Utility
0
 
LVL 11

Expert Comment

by:ajaikumarr
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now