Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Crystal Report Viewer Post Reply Post New Topic
Author Message
Tanya51
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Online Status: Offline
Posts: 4
Quote Tanya51 Replybullet Topic: Crystal Report Viewer
    Posted: 19 Jul 2007 at 9:12am
Confused  When I try to run my report I get an error message "cast from type crystal report viewer to type string is not valid.  Can anyone tell me how to correct this error.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 19 Jul 2007 at 11:55am
I haven't seen this error, so I don't know if I can help. But if you could post some code then that would help. I think you just have some variable declarations being confused and you're trying to assign a viewer object to a string variable. You should let the mouse hover over the variables and see what their variable declaration is.
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>
IP IP Logged
Tanya51
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Online Status: Offline
Posts: 4
Quote Tanya51 Replybullet Posted: 20 Jul 2007 at 6:06am
Brian,  thank you for getting back to me.  As it turns out I had some connection code in the wrong area of the form, when I moved it the error went away.  Being new to programming it's hard to know where to place code sometimes.  I 've never had to do a crystal report until now, so  I purchased a copy of your book for guidance, so hopefully I will be able to complete my report.  Thanks again for your willingness to help me.  I may need assistance at some point, but for now I think I'm ok.
 
Tanya


Edited by Tanya51 - 20 Jul 2007 at 6:10am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Jul 2007 at 8:08am
Glad to hear that it works. The only problem with my book was that it was written for .NET 2003. The biggest changes for 2005 are that ASP.NET doesn't allow embedded reports within a project. Thus, if you want to load a report with ASP.NET then you have to use the Load() method of the ReportObject class. The rest of the book should be about 90%+ accurate. I'll have the .NET 2005 book out at the end of this year.
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>
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.032 seconds.