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!

Grouping on server for formulas

Status
Not open for further replies.

crystaldev1

Programmer
Nov 6, 2003
232
US
I'm using CR2008 and Oracle database. I have a report using 3 linked tables in the dtabase expert (tableA, tableB, tableC). I have a formula as follows: if {tableA.value} > 5 then "Over 5" else "Under 5". I also would like to add a count summary in the group (e.g. Count of tableA.value).

I would like to know if there are options to perform grouping on server. I am aware of this option in the report which does not work if database fields are used in the report. Also, ideally, I would like to use cross-table if possible to do it with server-side processing. Thanks.
 
I know this is possible with the use of sql command but I would like to avoid that option. Thanks.
 
You could always add a SQL Expression for the field. It would look something like this:

Case
when "TableA"."Value" > 5 then 'Over 5'
else 'Under 5'
end

When building the SQL Expression, select the field into the expression editor like you would in the formula editor. That way you'll get the format that Crystal is looking for.

This SQL Expression will then be included in the query that pulls the data for the report and you can treat it as if it were any field on the report.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top