Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Problem since VS2010 upgrade Post Reply Post New Topic
Author Message
jayroyall
Newbie
Newbie


Joined: 10 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote jayroyall Replybullet Topic: Problem since VS2010 upgrade
    Posted: 10 Jan 2013 at 12:28am
Hi,

I recently upgraded VS from 2005 to 2010 and now I am experiencing problems with all reports in my project.  I installed Crystal Reports for Visual Studio 2010 which broke all reports on client machines.  I then upgraded the Crystal Reports runtime on the client machines which fixed the problem.  However, when my .net application tries to print a report the crystal reports seems to ignore the parameter I am passing in and returns all records from the database table the report is bound to, rather than selecting a single record based on the parameter.

has anyone else experienced anything similar or do you have any suggestions on how I can fix this?  I have tried running the report in the VS designer and it works fine, it's only when my .net application tries to create the report.

If you need any further information from me then please let me know.

Thanks

Jay
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 10 Jan 2013 at 7:05am

Which object model are you using - CrystalViewer or ReportDocument?

 
-Dell
IP IP Logged
jayroyall
Newbie
Newbie


Joined: 10 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote jayroyall Replybullet Posted: 10 Jan 2013 at 10:03pm
Hey, thanks for the response.

You will have to excuse me as I'm fairly new to Crystal Reports, but in answer to your question I believe its' the ReportDocument object model.

I instantiate a new report like so:

Dim crReport as new ReportDocument

However, the report is then bound to a CrystalReportViewer like so:

crvReportViewer.ReportSource = crReport

I hope this answers your question but if you need any further info then please let me know.

Thanks again

Jay
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 11 Jan 2013 at 7:04am
Do you get the parameter values from your application?  If so, are you setting the parameters anywhere in your code?  If not, have you used the parameter in the Selection criteria for your report?
 
-Dell
IP IP Logged
jayroyall
Newbie
Newbie


Joined: 10 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote jayroyall Replybullet Posted: 11 Jan 2013 at 11:24pm
Yes, my application is setting the parameters in code.  I don't have the actual code to hand at the moment but I can post it Monday it will help?

Also, I think it's worth mentioning that the code hasn't changed since the VS upgrade and it worked fine before.  It's only since I've upgraded the Crystal Reports runtime that the problem occurred.

I have tested my reports in the Visual Studio Crystal Reports designer and they work fine there; I preview the report, copy and paste the parameter when prompted and the correct data is returned from the database, i.e. the single record based on the parameter value.

The parameter type in Crystal Reports is a a string but the column type in the database is a uniqueidentifier (GUID).  Could this have something to do with it?
IP IP Logged
jayroyall
Newbie
Newbie


Joined: 10 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote jayroyall Replybullet Posted: 14 Jan 2013 at 12:03am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.029 seconds.