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!

How to Suppress detail section based on Parameter field

Status
Not open for further replies.

KARMENDRA

Programmer
Jan 22, 2004
9
US
Hi!Im using crystal 9.0 with Data Access.How can i suppress detail section based on Parameter.?
Let say my parameter is FROM DATE:02/01/2004
TO DATE:02/10/2004
I Will ignore this parameter & populate all record but then I will suppress detail section ,which will only display 02/01/2004 ~02/10/2004 data.

Any Idea???
Thanks
 
Create your parameter as a date range parameter {?date}. Then go to format->section->details->suppress->x+2 and enter:

not({table.date} in {?date})

-LB
 
Thanks lbass for your prompt response.I did it exactly same way but It prompt me to enter parameter to display report.I want to display report with all data & then suppress detail section.I cannot generate detail section with all record by adding parmeter field.As its already filter out by parameter selection.

Thanks lbass

 
Are you saying that you want a sequential display where the user would first view all records and then could apply a parameter to view a subset of records? Parameter prompts always pop up before the report is run, but you could accomplish something similar by creating a main report with all dates and an on-demand subreport (placed in the report header or footer) that when clicked displays only those records in the parameter period. You would create a date range parameter in the subreport, add it to the subreport record select statement:

{table.date} in {?date}

You could format the subreport (right click on the subreport->format subreport->subreport->on-demand subreport-subreport caption->x+2) to show the parameter dates as the link by using this formula:

totext(minimum({?date}),"MM/dd/yyyy")+ " to "+totext(maximum({?date}),"MM/dd/yyyy")

A different approach, without using subreports, would be to create a formula {@dategrp}:

if {Orders.Order Date} in {?date} then 1 else 2

Group on this and use "customize group name"->use a formula as group name->x+2 and enter:

if {@dategrp} = 1 then
totext(minimum({?date}),"MM/dd/yyyy")+ " to "+totext(maximum({?date}),"MM/dd/yyyy") else
"Other Dates"

Using drilldown on group 1 would provide a separate display of only those dates.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top