Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

error in loading crystal report

Posted on 2004-08-05
4
Medium Priority
?
171 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 180 total points
ID: 11733598
0
 
LVL 11

Expert Comment

by:ajaikumarr
ID: 11733609
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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 …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

730 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