Print Page | Close Window

Problem since VS2010 upgrade

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18412
Printed Date: 02 May 2025 at 12:20pm


Topic: Problem since VS2010 upgrade
Posted By: jayroyall
Subject: Problem since VS2010 upgrade
Date 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



Replies:
Posted By: hilfy
Date Posted: 10 Jan 2013 at 7:05am

Which object model are you using - CrystalViewer or ReportDocument?

 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: jayroyall
Date 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


Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: jayroyall
Date 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?


Posted By: jayroyall
Date Posted: 14 Jan 2013 at 12:03am
Hi,

I found the solution to my problem here http://search.sap.com/notes?id=0001204895&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735F6E756D6265723D30303031323034383935 - http://search.sap.com/notes?id=0001204895&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735F6E756D6265723D30303031323034383935

Thanks anyway for your time :)

Jay



Print Page | Close Window