Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: convert from vs2005 to vs2010 Post Reply Post New Topic
Author Message
billev
Newbie
Newbie
Avatar

Joined: 19 May 2007
Location: United States
Online Status: Offline
Posts: 9
Quote billev Replybullet Topic: convert from vs2005 to vs2010
     Posted: 15 Mar 2011 at 2:56pm
I run a crystal report from a windows form by selecting an employee from a list and click the [run report] button.  I can select different employees and rerun the report.  The folowing code is used for the record selection:
 
myreport.DataDefinition.RecordSelectionFormula = "{EmployeeTable.IDNum} = " & intID & " and {EmplHourTable.HourType} = " & "'D'"

This record selection formula works perfectly in VS 2005 with Crystal.

When converted to VS 2010, the program works every time except the 1st time where all records are selected.  Each subsequent click of the [run report] button works great

I'm stumped. HOw could it not work the first time I hit the run report button, but work all subsequent times?

I cannot convert to 2010 until I resolve this simple thing.

Help.
Thanks,

Bill V
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Mar 2011 at 3:36am
all that comes to mind is, what is intID, and does the report handle that correctly?
IP IP Logged
billev
Newbie
Newbie
Avatar

Joined: 19 May 2007
Location: United States
Online Status: Offline
Posts: 9
Quote billev Replybullet Posted: 16 Mar 2011 at 4:16pm
intID is an integer and is the employee ID number.  The odd thing is that the crystal report runs flawlessly in VB.net 2005 and for every employee selected after the 1st employee selected in VB.net 2010.
Thanks,

Bill V
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 17 Mar 2011 at 3:12am
hmm....If intID is null or 0, how does the report react?  Since it works fine when an intID is selected, how does it respond when none is selected would be the question.  The rest of the time it works fine, so I would try to make it work for the first time....I know, that's the plan
 
HTH
IP IP Logged
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