p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Help with extracting a previous day data in Crystal Reports 8.5


Message #1 by "Farooqui, Kahki - Lake Forest" <KFarooqui@i...> on Wed, 28 Nov 2001 10:45:33 -0600
Hi,

 

Please, Please, needs immediate help with the syntax to extract previous day

ONLY data when doing a report in 8.5.

The built-in functions such as CurrentDate, or AllDatestoYesterday chosen

as:

Date({table.createdate}) =  CurrentDate - 1 gives no error but compiles

wrong data.

or

Date({table.createtime}) = Date(CurrentDate - Date(1))) or day(1) gives no

error but won't compile the right data either?

or

AllDatetoYesterday gives up to previous all dates but not just a previous

day data alone.

 

How can i write codes to only get previous day data? there aren't a single

function as previous day or yesterdayDate?

 

thanks,



KF





 

Message #2 by Walt Morgan <wmorgan@s...> on Wed, 28 Nov 2001 11:49:25 -0600
I do not CR 8.5 (just 8.0) but I would suggest creating a date parameter

that the user enters for a specific date or range of dates.



Walt





Message #3 by "Farooqui, Kahki - Lake Forest" <KFarooqui@i...> on Wed, 28 Nov 2001 15:17:44 -0600
Thanks for replyin...but these will be daily reports for a previous day

data? and should be automatically refreshed daily without a parameter

prompt!

the syntax i described in my previous email was fed into the formula! how do

ppl set a previous day date range?



Kakhi Farooqui 

*  xxx-xxx-xxxx  







-----Original Message-----

From: Walt Morgan [mailto:wmorgan@s...]

Sent: Wednesday, November 28, 2001 11:49 AM

To: crystal_reports

Subject: [crystal_reports] Re: Help with extracting a previous day data

in Crystal Reports 8.5





I do not CR 8.5 (just 8.0) but I would suggest creating a date parameter

that the user enters for a specific date or range of dates.



Walt










$subst('Email.Unsub')



Read the future with ebooks at B&N

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks

Message #4 by Walt Morgan <wmorgan@s...> on Wed, 28 Nov 2001 15:58:06 -0600
Another potential problem could be the format of the date field, if I

remember correctly it defaults to date/time, rather than just date. Change

the format of your query field to strictly date format, e.g., mm/dd/yyyy.



I'm speaking of the design phase of the .RPT file.



Just another idea.



Walt





Message #5 by Angelo_PARDINAS@e... on Thu, 29 Nov 2001 09:12:42 +0800

  Use the "DateAdd" function : to subtract one day just add a negative

number like this :



DateAdd ('d', -1, CurrentDate)





Regards,

Angelo Pardinas









                                                                                                

                    "Farooqui,                                                                  

                    Kahki - Lake           To:     "crystal_reports"                            

                    Forest"                <crystal_reports@p...>                       

                    <KFarooqui@i...        cc:                                                  

                    lobal.com>             Subject:     [crystal_reports] Help with extracting  

                                           a previous day data in Crystal Reports 8.5           

                    29/11/2001                                                                  

                    12:45 AM                                                                    

                    Please respond                                                              

                    to                                                                          

                    "crystal_report                                                             

                    s"                                                                          

                                                                                                

                                                                                                







Hi,



Please, Please, needs immediate help with the syntax to extract previous

day

ONLY data when doing a report in 8.5.

The built-in functions such as CurrentDate, or AllDatestoYesterday chosen

as:

Date({table.createdate}) =  CurrentDate - 1 gives no error but compiles

wrong data.

or

Date({table.createtime}) = Date(CurrentDate - Date(1))) or day(1) gives no

error but won't compile the right data either?

or

AllDatetoYesterday gives up to previous all dates but not just a previous

day data alone.



How can i write codes to only get previous day data? there aren't a single

function as previous day or yesterdayDate?



thanks,



KF











angelo_PARDINAS@e...


$subst('Email.Unsub')



Read the future with ebooks at B&N

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid=rn_ebooks











Message #6 by "Farooqui, Kahki - Lake Forest" <KFarooqui@i...> on Thu, 29 Nov 2001 08:18:23 -0600
Thanks for sticking to it but this is the only data field I have to use? and

yeah in CurrentTime rather than CurrentDate! any more ideas?



KF

 







-----Original Message-----

From: Walt Morgan [mailto:wmorgan@s...]

Sent: Wednesday, November 28, 2001 3:58 PM

To: crystal_reports

Subject: [crystal_reports] Re: Help with extracting a previous day dat a

in Crystal Reports 8.5





Another potential problem could be the format of the date field, if I

remember correctly it defaults to date/time, rather than just date. Change

the format of your query field to strictly date format, e.g., mm/dd/yyyy.



I'm speaking of the design phase of the .RPT file.



Just another idea.



Walt










$subst('Email.Unsub')



Read the future with ebooks at B&N

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks

Message #7 by Walt Morgan <wmorgan@s...> on Thu, 29 Nov 2001 08:21:23 -0600
Farooqui Khaki,



At this point, my suggestion is to read up on calculated fields and the

formulas available in CR, there you have the option of using Crystal syntax

or VB syntax.



Parameter fields are also very helpful for inserting variable data elements

at runtime.



Again, I state that I use Version 8 and not 8.5 so I'm unsure as to how much

difference there is between the two. I'd suspect that basically they're much

the same at this level of discourse.



Walt








  Return to Index