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!

Pulling up by todays date

Status
Not open for further replies.

auburnfan

Technical User
Jan 4, 2006
22
0
0
US
I am a new user to CR and I have been trying to figure this out without much luck. I need to run a report that automatically pulls the information up by todays date. I would like to do this wihtout having to manually type in the date each time I run the report...is this possible?
Thanks in advance.
 
In thre Report->Edit Selection Formula->Record place something like:

{table.datefield} = currentdate

Or if you want it up and including todays date, try:

{table.datefield} <= currentdate

Please remember to post your software version.

-k
 
Version is 8.5.0.217
Alright, I entered that in but did not really do anything. It set up as "is equal to - currentdat" in the select expert, but nothing.
 
<laffin>

What does it did nothing mean? It does do something, and you can check the Database->Show SQL Query to see what's being passed to the database.

I suggested that you place {table.datefield} = currentdate, and instead you used to select expert to enter what appears to be an invalid statement.

currendat isn't proper syntax, nor would it work without stating what field it is to use.

Follow the syntax specified, and don't use the select expert.

-k
 
WHERE
CallLog."RecvdDate" = 'CurrentDat'

That is what appeared in Show SQL Query.....now I went back several times and made sure that I was entering currentdatE and when it shows up here the E is missing.
What I ment by it did nothing is it did not give me an error saying the string was incorrect or anything, just did not work. When I refreshed the data nothing happend.
Please forgive my ineptness at this.
thanks
 
I actually have a similar problem. I'm running CR9, CE9 and DB2.

In my report I have a formula @Monthly_Heading in the report header that looks like this:

"FOR THE MONTH ENDING: " + totext(currentdate - 1, "MMMM dd, yyyy")

The report is a month end report scheduled to run on the first day of each month and is cumulative up to the end of the month. The problem is that the current date minus 1 is displayed in my formula above no matter what month the report was run. That is, previous instances of the report will still display current date minus 1 (January 4, 2006).

Is it not supposed to be that if a report was run on July 1, 2005 that the @Monthly_Heading would display June 30, 2005?

Please advise, thanks.

 
stormtrooper--this isn't really a related issue, but anyway, if you are limiting the report in your selection criteria to those dates that fall within a specific month, you could then use a formula like the following instead:

"FOR THE MONTH ENDING: " + totext({table.date} - day({table.date}), "MMMM dd, yyyy")

auburnfan,

It looks like your date might be a stringfield. If so, go to report->selection formula->RECORD and enter:

cdate({CallLog.RecvdDate}) = currentdate

If this doesn't work, you should report back with the datatype and show some samples of the field, along with an explanation of what dates they represent.

-LB
 
lbass,

That's the thing, my report does not require any date limitations. Therefore there are no date fields in my table. The @Monthly_Heading is only an indication as to when the report was run/scheduled.

Could I maybe use the printdate?
 
Then try using "datadate" which will show the last time the report was run. This, however, will change if you refresh the report. PrintDate will always show the currentdate.

-LB
 
I'm pretty sure that will work. Now the question is do the end users have the ability to refresh?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top