Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Conditional Sum

edited October 2006 in General
I've seen this thread before and can't find it again but;

I have a variable in the summary band that I want do so a sum
conditionally based on one field, i.e.

if pipeline['Field']='XXX' then

Value:=

How would I go about this?



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited October 2006
    Look in "tech-tips" - "Calculations" - "Tech Tip: Calculating a Summary
    based on Group Totals"

    Might be the one you saw before...

    EdB

  • edited October 2006
    The variable is in the summary band of the report. While there are two
    groups in the report, I need to do the calculation for the entire
    report, it's already been done for the groups (Note: This is RB 5
    Enterprise built into a third party application, and I cannot change the
    pipeline/paramters/create or edit global variables).

    if (plCustomer['Amountpaid'] > 100.00) then
    begin
    {sum detail}
    Value := Value + plCustomer['Amountpaid'];

    {accumulate summary}
    vCustomerSummary.Value := vCustomerSummary.Value +
    plCustomer['Amountpaid'];
    end;

    end;

    When I try to run the report with this, the application RB is built into
    throws and exception (Cannot run because of variable) which I'm assuming
    is because I have the var in the summary? Everything compiles correctly.




    --- posted by geoForum on http://delphi.newswhat.com
  • edited October 2006
    Hello,

    -----------------------------------------
    Article: End-User Tech Support
    -----------------------------------------

    Please understand that Digital Metaphors can only provide tech support to
    the Delphi developers that purchase ReportBuilder. Digital Metaphors
    receives no distribution royalties from Delphi developers that embed
    end-user reporting solutions in their applications. It is the responsibility
    of the software publishers that sold you the product to provide you with
    tech support.

    There is an end-user tutorial called Learning ReportBuilder that can be
    downloaded from our web site for free. See the following article for more
    infomation.

    --------------------------------
    Article: Learning ReportBuilder
    --------------------------------

    Learning ReportBuilder is a complete learning system designed to teach end
    users how to build a range of reports. This system includes a 125-page PDF
    file, a stand-alone application complete with a database, and a help file.
    The PDF file is comprised of a series of tutorials that step end users
    through the process of building reports as simple as a table listing and as
    complex as crosstabs. The tutorials also introduce conceptual aspects of
    report building along the way. The application is used in conjunction with
    the tutorials so that the learning experience is interactive. The end user
    just prints out the PDF file, runs the application, and learns
    ReportBuilder. The help file is accessible from the application, so all
    three tools work together to provide a seamless learning environment.

    Learning ReportBuilder installs into C:\Program Files\LearnReportBuilder.
    When the system has successfully installed, a complete set of instructions
    appears in the form of a 'ReadMe' doc, so the end user knows just what to do
    upon installation.

    - Download Learning ReportBuilder

    http://www.digital-metaphors.com/LearnRB/LearnRB.exe
    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2006
    I guess I'm glad I solved it myself then.



    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.