p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Including a variable or total within a group eg Profit & Loss Report


Message #1 by "Jess Buckley" <jess_buckley@h...> on Sat, 5 May 2001 13:33:07
Is it possible to add a variable to a report for example:



I am trying to report on a profit & loss acount from a Sage database but 

need to include the Net profit within a group.  The problem is that the 

net profit is not a group, but a total of this group! I do however need to 

include it within this group.



Profit & Loss Accounts   Cat Code(which is how I have grouped the fields)

income accounts          100-200

expense accounts         200-300

net profit               (sum of these)



total                  sub total 





Is there a way to do this?  Has anybody out there ever encountered such a 

problem?  Please Please Please if anybody knows how to do this please

reply.  As I am in deep doo doo if I dont find a way to resolve this!
Message #2 by "Levine, Lloyd" <LEVINLL@m...> on Mon, 7 May 2001 08:47:46 -0400
Have you tried using DSUM and putting the value received from this function

in a text box ?



-----Original Message-----

From: Jess Buckley [mailto:jess_buckley@h...]

Sent: Saturday, May 05, 2001 9:33 AM

To: crystal_reports

Subject: [crystal_reports] Including a variable or total within a group

eg Profit & Loss Report





Is it possible to add a variable to a report for example:



I am trying to report on a profit & loss acount from a Sage database but 

need to include the Net profit within a group.  The problem is that the 

net profit is not a group, but a total of this group! I do however need to 

include it within this group.



Profit & Loss Accounts   Cat Code(which is how I have grouped the fields)

income accounts          100-200

expense accounts         200-300

net profit               (sum of these)



total                  sub total 





Is there a way to do this?  Has anybody out there ever encountered such a 

problem?  Please Please Please if anybody knows how to do this please

reply.  As I am in deep doo doo if I dont find a way to resolve this!



levinll@m...


$subst('Email.Unsub')

Message #3 by Gurpreet Singh <gsingh@m...> on Tue, 8 May 2001 12:05:32 -0400
Hi Jess,

There are two ways you can go about solving it: 

1. The first one is a bit tedious one, involving the use of  variables for

your totals and calculations and controlling the execution with the use of

the EVALUATION TIME functions (like While Printing, etc). It's is not a very

sure method of doing it either, unless you are able to manipulate the

functions in the order crystal will let you.  

2. Use a subreport to get the total. Only downside to this approach is the

report takes a longer time to load, but then that would depend on where you

place your subreport, and how big the table is.



cheers,

Gurpreet Singh.



Subject: Including a variable or total within a group eg Profit & Loss

Report

From: "Jess Buckley" <jess_buckley@h...>

Date: Sat, 5 May 2001 13:33:07

X-Message-Number: 1



Is it possible to add a variable to a report for example:



I am trying to report on a profit & loss acount from a Sage database but 

need to include the Net profit within a group.  The problem is that the 

net profit is not a group, but a total of this group! I do however need to 

include it within this group.



Profit & Loss Accounts   Cat Code(which is how I have grouped the fields)

income accounts          100-200

expense accounts         200-300

net profit               (sum of these)



total                  sub total 





Is there a way to do this?  Has anybody out there ever encountered such a 

problem?  Please Please Please if anybody knows how to do this please

reply.  As I am in deep doo doo if I dont find a way to resolve this!




  Return to Index