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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Expert Period last 12 months 2

Status
Not open for further replies.

smibarb

Technical User
Jun 24, 2005
40
CA
How can I request that a report always pulls data for the past 12 months from the data generated? I would like the report to tabulate data on the previous 365 days, or last full year each time the report is called but cannot find a function that seems to do this.

I am using version 10.0.0.533

Thanks in advance.
 
Report menu, Selection Formulas, Record:

{table.date} in dateadd("yyyy",-1,currentdate} to currentdate

You may need to alter this by a day or so depending on your exact needs.


~Brian
 
This may be a silly question, but does this function work in 8.5? Or is there a limit of select statements:

My select statements as follows worked just fine:

IsNull ({TRANSACTIONS.CANCELLED_DATE}) and
IsNull ({TRANSACTIONS.DISB_DATE}) and
{@App_Status} <> '2' and
{@App_Status} <> '3' and
{@App_Status}<> '4'

When I added the statement below, the first statement above regarding cancelled date was then ignored:

and
({TRANSACTIONS.REG_DATE} in dateadd("yyyy",-1,currentdate) to currentdate or {TRANSACTIONS.CPERM_LOAN} = 'y')

I'm using a SQL server database. I am trying to pull records where the disb date and cancelled date are null; the app status is anything except for 2, 3, or 4; and the reg date is within the last year OR the c perm field is y.

When I added the last section, in the reverse order,
({TRANSACTIONS.CPERM_LOAN} = 'y' or {TRANSACTIONS.REG_DATE} in dateadd("yyyy",-1,currentdate) to currentdate )
it ignored the reg date field selection and pulled only records where the disb date and cancelled date are null; the app status is anything except for 2, 3, or 4; and the cperm field was y. When I swapped the arguments, it then began ignoring the cancelled date argument.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top