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

Change Group Option - (printing value) by parameter value 1

Status
Not open for further replies.

wld1957

Technical User
Feb 3, 2006
68
US
CRXI - DATE FIELD {cpmain.disbursdt} in group header.
Report uses a Detail-Summary parameter value. When selected I can get the group to display all of the records along with the dates.
Example:
12-01-08
details here
12-05-08
details here
What I want to do is when the user selects detail from the parameter value it shows the date and details of the report. I have been able to do this. I also wanted to have the report display only the month "March, April etc..." when summary is selected. I would like it to change the print value of the group according to the parameter value selected. (detail or summary)

I can get it right only if I change the print option under change group options. I do not know how to combine them in a formula. Any ideas would be appreciated.

print for each day - this is for detail
print for each month - this is for summary

Bill

 
Insert your group on a formula like this:

if {?ReportLevel} = "Detail" then
{table.date} else
if {?ReportLevel} = "Summary" then
{table.date}-day({table.date})+1

At the summary level, this would return the first of the month as the groupname. To display the monthname instead, create a formula and use it instead of the groupname:

if {?ReportLevel} = "Detail" then
totext({table.date},"MM/dd/yyyy") else
if {?ReportLevel} = "Summary" then
monthname(month({table.date}-day({table.date})+1))

-LB
 
Thanks for the help. That worked great.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top