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

Grouping on formula in header

Status
Not open for further replies.

vblack7770

Programmer
Apr 11, 2005
26
US
I have a report that I have put whileprinting formulas in to get the last two net worth reports for each company.

Group = Company and is returning company name and last net worth $ by company
Details = last 2 net worth by company, but only previous to last $ is displaying.

In the group = company, I have a % NetDifference that returns the difference between the last $ by company (in Group header) and the previous to last $ (in details).

The report works great, however, I can't get the report to sort by %NetDifference formula. I have even tried if-the-else to convert to 1's and 2's. Can't sort by that either. ??
 
If this refers to your previous thread, then you used the "next" function in your formula, and you won't be able to do a sort of any kind on that formula.

What version of CR are you using? Do you have the option of using SQL expressions? If so, please provide the formula that you used, and also explain what determines what is the "previous to last" record--is there a date range that each record refers to?

-LB
 
8.5 and yes.

If Count ({LTP_3PARTY_FIN.TANG_NET_WORTH}, {LTP_3PARTY_CMPY.COMPANY}) >1 then
{LTP_3PARTY_FIN.TANG_NET_WORTH} - next({LTP_3PARTY_FIN.TANG_NET_WORTH})
else 0

There is a date field that is tied to the net worth field in this formula. I sort by the date field and then take the last two net worth's matching those dates and subtract them. The count reference is so the formula won't grab the NEXT as the next net worth from the next group if there is only one net worth in the group previous.
 
Is the date assigned to the date field systematic, e.g., is it once per month or could it be any date? In other words, is the comparison between this week and last or this month and last?

-LB
 
I found the issue. I am looking at summary tables and detail tables in the same report. I just had our Oracle build a view so I could pull the info into Crystal. Crystal can't do all the grouping and calc'g I needed. Thanks for your replies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top