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

please help -

Status
Not open for further replies.
Mar 28, 2007
66
GB
I am trying to make a p&l in crystal reports but am stuck at one point

I have suppressed details column and in my group header#1 I am showing the details grouped by type of account (revenue, office exps, etc)

The report in preview looks like this
Comm received xx
interest received xx
office exps xx
staff salaries xx

What I need to do is break comm and interest received and group them as "REVENUE" and have a total for that section.
Similiarly I need to have a total for expenses.
And at the end have a net profit or a loss.

Any help to direct me in the right direction would be appreciated. What am I doing wrong. Is it that I need to get the revenue section of data into one "Details a" and the cost section of data into "Details b" ??

thanks
 
For future reference, you are in the wrong forum. You should be in forum767 or forum149.

Create a formula like this:

if {table.accttype} in ["Comm Received","interest received"] then "Revenue" else
if {table.accttype} in ["Office exp","staff salaries"] then "Expenses" else
"Other"

My guess is you have codes for these account types, and it would be better to use these in the formula. Anyway, insert a group on the formula and make sure that it is group #1. For group totals, right click on {table.amt} and insert summaries at the group level.

Then you can add two running totals, one for revenue and one for expenses, where you sum {table.amt}, evaluate using a formula:

{@accttype} = "Revenue" //or "Expense

Reset never. Then create a formula to place in the report footer that references the two running totals.

{#Revenue}-{#Expense}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top