Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report between two dates 1

Status
Not open for further replies.

germanrc

Programmer
Mar 9, 1999
7
0
0
US
I hope that someone gives me an answers. I have a simple database and one field is date type. All I need is show a report between to dates. This dates are collected from the user in two text box<br>I been trying with cr4.5, DRD and I use VB6<br>Thank you
 
You do this by creating a parameter field (name it report dates or something else appropriate).&nbsp;&nbsp;For the prompt, put something like &quot;Enter Date Range&quot;.&nbsp;&nbsp;After creating the parameter field, insert it into the report, and then when the report runs, you will be prompted to put in the start and end date.
 
Because you are getting the dates in string format (not the easiest way to do it, but reliable), you will also have to convert the strings to dates.<br>The format for dates in Crystal is DATE(YYYY,MM,DD) where YYYY, MM, DD are integers.&nbsp;&nbsp;So if your parameter is a string in the format &quot;2000/02/24&quot;, you would convert this to a date in a Crystal formula by extracting the integer values for the date from the string.<br>DATE(ToNumber(?FromDate[1 to 4],0), ToNumber(?FromDate[6 to 7],0), ToNumber(?FromDate[9 to 10],0))<br><br>&nbsp;<br> <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
 
Thank you to both of you, I'll go play with it and let you know the results.<br>germanrc
 
Following up on this....How can I print the start and end values of a date range? I tried the 'special field' and inserted the 'record selection' one but this just prints the formula, if you will, rather than the values. Can someone help?
 
3 ways, depending on your situation:
Maximum([{fromdatevalue} to {todatevalue}])
Maximum(daterange)
{todatevalue}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top