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

Date Range display

Status
Not open for further replies.

dev1212

Programmer
May 11, 2010
117
US
Hi,

I need help in displaying the date range for this report.

Formulas used in selection criteria:

@LastMonthBeginDate
--------------------
DateAdd('m',-1,CurrentDate-Day(CurrentDate)+1)

@LastMonthEndDate
--------------------
CurrentDate-Day(CurrentDate)

{?Criteria}
--------------------
Coming from application that may or may not have post date range.


I have condition like " if no post date from application then use last cycle dates else use last months begin and date else use date from application "

I have a selection criteria on my report as follows:


If
InStr(Uppercase({?Criteria}),'POST DATE')=0
Then
{ACCT.POSTING_DATE} IN
(If
DateAdd("d",1,{ACCT.PRD_END_DT})={ACCT.PRD_BEG_DT}
Then
{ACCT.PRD_BEG_DT} To {ACCT.PRD_END_DT}
Else
{@LastMonthBeginDate} To {@LastMonthEndDate}
)
Else
True




Now i want to display the range the report is filtered on i.e., the dates used for record selection.

like

@RangeUsed
------------
Date1 to Date2


Please reply to this forum..

Thanks

 
If InStr(Uppercase({?Criteria}),'POST DATE')=0 Then
(
If DateAdd("d",1,{ACCT.PRD_END_DT})={ACCT.PRD_BEG_DT} Then
totext({ACCT.PRD_BEG_DT},"MM/dd/yyyy")+" To "+ totext({ACCT.PRD_END_DT},"MM/dd/yyyy") Else
totext({@LastMonthBeginDate},"MM/dd/yyyy")+" To "+totext({@LastMonthEndDate},"MM/dd/yyyy")
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top