Print Page | Close Window

CR use in VS2008

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11521
Printed Date: 21 Apr 2025 at 5:08am


Topic: CR use in VS2008
Posted By: mcaster2000
Subject: CR use in VS2008
Date Posted: 26 Oct 2010 at 7:13am

We started with CR reports in VS2003 and CR 9.  Everything was great.  Then we upgraded to CR 11.  Everything still good.  Then we upgraded to VS2008.  Went down the tube.  We can't get parameter inputs to work correctly, visually or programatically.  We can't get the programatic logon to the SQLServer DB to work at all.

Any suggestions, places to look, things to read would be greatly appreciated!!



Replies:
Posted By: BrianBischof
Date Posted: 26 Oct 2010 at 7:25am
I have code sample in my CR.NET 2008 book on Amazon, but here are some code snippets that might help:

Use the .SetParameter() method to change the current value of parameters.

myReport.SetParameterValue("Country", "USA")

To set the login credentials, use SetDatabaseLogin()

myReport.SetDatabaseLogin("user1", "1234")

If you're using ASP.NET, don't put your code in the page Load() method. It screws up the viewer control in VS2008. Use the On_Init() method instead. This keeps memory clean.

Here is the link for my book: http://www.amazon.com/exec/obidos/ASIN/097495361X/bischofsystem-20 - Crystal Reports.NET 2008 book



-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: mcaster2000
Date Posted: 26 Oct 2010 at 8:01am
Many thanks.  Your version 9 book CR .NET Programming got us to our first success and I have just ordered the latest/greatest with the assumption it will see us along.  Meanwhile, I will try your suggestions.
 
M.



Print Page | Close Window