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

parameter options (v10)

Status
Not open for further replies.

pamgdevlin

Programmer
Nov 24, 2003
14
US
I have a daily report that shows quantity of part codes shipped each day in the month (please see below)

8/1 8/2 8/3 8/4
xx5502 5 7 9 2
xx4473 0 0 12 8
xx1700 1 2 3 4

Because I have "{DESPATCH_NOTES.DESPATCH_DATE} in MonthToDate" in the selection expert, the report starts over for the next month. Sometimes the user wants to see the entire last month of data. How do I give them the option to see either the current month or the last full month without them having to enter a start date and an end date? I what them to be able to choose between "month to date" OR "last full month." I know I can use "{DESPATCH_NOTES.DESPATCH_DATE} in LastFullMonth" to get the last months data, but how do I get both options into a parameter formula and then how do I get that into the selection expert?

I'm probably missing something simple, but I really have brain block right now. Any help would be greatly appreciated.

thanks
pamgdevlin
 
Create a parameter of type string and place default values of:

Month to Date
Last Month
All

Then in the record selection formula use:

(
if {?MyParm} <> "All" then
(
if {?MyParm} = "Month to Date" then
{table.date} in monthtodate
else
if {?MyParm} ="Last Month" then
{table.date} in lastfullmonth
)
else
if {?MyParm} = "All" then
true
)

This adds the option to return all rows, and of course you could expand this to include quarters, years. etc.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top