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

Displaying Date Range Parameter in report 1

Status
Not open for further replies.

kutoose

Technical User
Sep 11, 2002
169
0
0
US
I have a report which has date range parameter - Need to display the date range on the report...

Now since this a date range, the report can have 'no upper Value' , 'No Lower Value'. I need to reflect this on the report - How can this be acheived ??

For example if the user select 4/1/2005 and No upper value, the display should be " Date Range from 4/1/2005 - No Upper Limit"

I am using CR xi, CR 10
 
Use a display formula to say:
Code:
WhilePrintingRecords;
StringVar a;
StringVar b;

If minimum({?range}) <> date(2000,1,1) then 
a := ToText(minimum({?range})) else  
a := "No Lower Limit";

If maximum({?range}) <> date(3000,1,1) then 
b := ToText(maximum({?range})) else  
b := "No Upper Limit";

"Date Range from " + a + " to " + b;
Naith
 
The date(xxxx,xx,xx) entries above represent whatever your default lower and upper limits are. Amend these accordingly.
 
Try:

whileprintingrecords;
stringvar MinDT;
stringvar MaxDT;
if minimum({?dt}) = cdate(0,0,0) then
minDT:="No date specified"
else
minDT:=totext(minimum({?dt}));
if maximum({?dt}) = cdate(0,0,0) then
maxDT:="No date specified"
else
maxDT:=totext(maximum({?dt}));
"Dates: " & mindt & " to " & MaxDT
Should get you close

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top