473,385 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Crystal Reports in VS 2005

The following code is what I have been using in .net 1.1 for years.
Now upgrading to .net2.0 and Crystal reports for vs2005, it no longer
works, although as far as i can tell it is still supported. The error
I receive tells me that I did not provide @Location parameter with a
value. Also to note is the database changes at runtime.

'This report uses the PULL method.
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo

Dim rpt As New
CrystalDecisions.CrystalReports.Engine.ReportDocum ent
With rpt
.Load(strReportPath & "Schedule.rpt")

.SetParameterValue("@LocationID",
CurrentLocation.LocationID.ToString)
.SetParameterValue("@WorkCenter", WorkCenter)
.SetParameterValue("@StartDate",
StartDate.ToShortDateString)
.SetParameterValue("@EndDate", EndDate.ToShortDateString)
.SetParameterValue("@LocationName", CurrentLocation.Name)
End With

'Set the db logon info
With crConnectionInfo
.ServerName = servername
.DatabaseName = databasename
.UserID = username
.Password = password
End With

'Loop through each table in the report and apply the LogonInfo
information
Dim CrTables As Tables = rpt.Database.Tables

For Each CrTable As Table In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next

'Set the viewer to the report object to be previewed.
CV2.ReportSource = rpt

Nov 22 '06 #1
2 1230
Also need to add that if I change the datasource at runtime to the same
one I used to create the report everything runs fine, but when I change
the datasource to point to the production server, i get the error.

Nov 22 '06 #2
I have confimed that this must be a bug in the Crystal Reports for
VS2005. I have reproduced the following several times.

1. Created a report that gets data from a stored procedure having
parameters on sql server

2. create a vb.net project with a crystalreportviewer control

3. bind the report to the control at runtime

4. at runtime, the viewer control will ask the user to input values for
the params

5. report loads as expected

During step 3, if the database location is changed to a different
server than the one used when developing the Crystal Report, the
following will occur.

-->4. at runtime, the viewer control will ask the user to input values
for the params

-->5. report loading fails with an ADO error stating the stored
procedure expected parameters that were not supplied.

Nov 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: LP | last post by:
Hi, I will be taking on a new project developing a web-based "reporting system". The first requirement I got from BI group is "we just want to look at the data". Basically, there is a huge...
0
by: Robert Warnestam | last post by:
Hello, I have some problems deploying Crystal Reports. I'm using Visual Studio 2005 Beta 1. In this version Crystal Reports (9.7.3500.0) is included. I created a small test application...
5
by: Jay | last post by:
I am getting mixed messages from the asp.net website hosting providers - some say they do not support Crystal Reports due to a $25,000 per cpu licensing fee, others say all I need to do is install...
4
by: Mike | last post by:
Hi We are developing an ASP.NET 2.0 application and using the in built Crystal report system that it comes with. We have everything running fine on our development server but when we publish...
9
by: Altman | last post by:
I am currently using ASP.Net 2003 and will be upgrading to 2005 sometime in the near future. I have been having issues with using Crystal Reports that were included with .Net to handle my...
0
by: Gilberto Avila | last post by:
I'm currently developing a web application with ASP .NET 1.1. I'm using the bundled Crystal Reports in Visual Studio 2003 to create reports for this application. The system specification requires...
1
by: Kannan | last post by:
Hi, I have noticed that Visual studio 2005 coming along with Crystal report. I have few crystal reports which is developed in 6.0 in my existing VB project and currently we are migrating m y VB...
1
by: foocc | last post by:
Hi, im trying to convert data reports (.dsr) in vb6 to crystal reports in vb.net. However, I cant seems to find it in my Microsoft Visual Studio 2005 Tools for Office. I've tried going to...
0
by: =?Utf-8?B?S2FybCBQb3RoYXN0?= | last post by:
According to this page Crystal Reports for Visual Studio 2005 Service Pack 1 should be released soon. Does anyone know the exact release date for this? ...
3
by: Miro | last post by:
Hi, Just wondering what a good book is on visual studios 2008 ( or 2005 if no 2008 ) that teaches you how to properly use crystal reports with it. Or im assuming that as long as I can create a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.