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

Top / Bottom End Parameter

Status
Not open for further replies.

kristal9

Programmer
Feb 15, 2007
95
US
Hi, I don't even know if this is possible...
but ... running cr 8.5 & oracle database.

I've got a bunch of reports that will show gainers & losers, per se. .. basic TOP End / Bottom End sort function.... but If i make these accessible to users via the intranet, i essentially need to replicate the report and have report A be top end and report b be bottom end ...
with a hyperlink to each separate report.

is there a way to make that a parameter? so i can only have one report but the users chooses within the report "GAINERS" or "LOSERS" vs him need to report the specific report itself?

Any suggestion would be helpful.

Thanks
Kristal
 
You could always have the hyperlink point to two different reports. I'm sure theres a way to do it using a Select Top statement, how comfurtable are you using commands within Crystal?
 
Set up a parameter {?gainers/losers} and then create a formula {@sort}:

if {?gainers/losers} = "Gainers" then {table.amt} else -{table.amt}

Then place this in the detail section and insert a summary on it. Then go to report->group sort->select {@sort} as your group sort field, descending, but on the report display the summary inserted on {table.amt}, and suppress the summary based on {@sort}.

-LB
 
I like the idea of a sort formula but I'm not sure how it will work as my 'gainers / losers' criteria is based on a sum of formula.

My report has one group by {PARENT.COMPANY} then there column are:

{@cy} where if {schedorder.date} = {?currentmonth} then {schedorder.amt} else 0

{@py} where if {schedorder.date} = {?priormonth} then {schedorder.amt} else 0

then {@variance} where {@cy}-{@py}

again... each of these columns are summed by the {parent.company} and the TOP/Bottom End is based on the sum of the {@variance} formula.

Sorry I wasn't more specific in the earlier post.
 
Change the formula to:

if {?gainers/losers} = "Gainers" then {@variance} else -{@variance}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top