Solved

error in loading crystal report

Posted on 2004-08-05
4
167 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
ID: 11733598
0
 
LVL 11

Expert Comment

by:ajaikumarr
ID: 11733609
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

776 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