Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: RecordSelectionFormula Post Reply Post New Topic
Author Message
calvinkwoo3000
Newbie
Newbie
Avatar

Joined: 09 Jan 2007
Location: Malaysia
Online Status: Offline
Posts: 4
Quote calvinkwoo3000 Replybullet Topic: RecordSelectionFormula
    Posted: 20 Aug 2007 at 7:38pm
hi , i am newbie in crstal report,
I had face a problem when i try to set the formula for selection.

I hope to query record that inv_date and c_date bigger that certain date.
so i set the formula like below:

r.RecordSelectionFormula =
"{ViewReportTraking.inv_date} >= DateValue('" & datefrom.ToString() & "') or {ViewReportTraking.c_date} >= DateValue('" & datefrom.ToString() & "')"

What happen is the query only select the record inv_date >= certainDate,
but not the c_date >=certainDate.


when i try to set it to opposite
r.RecordSelectionFormula =
"{ViewReportTraking.c_date} >= DateValue('" & datefrom.ToString() & "') or {ViewReportTraking.inv_date} >= DateValue('" & datefrom.ToString() & "')"

It only query the record c_date >= certainDate but now both inv_date >= certainDate and c_date >= certaindate
 
I want query data either c_date >= certainDate or inv_date >= certainDate
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Aug 2007 at 11:17pm
I don't see where the problem could be. I suggest creating the same record selection formula in CR only. Get it working there to make sure that the logic is correct. Once you have it working in CR, copy the record selection formula into your .NET app and swap out the datefrom.ToString() functions. This might help you catch what is going wrong (but it looks fine to me - there must be something small causing the problem).
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.012 seconds.