Solved

error in loading crystal report

Posted on 2004-08-05
4
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 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