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

Report Variable Timings

edited April 2007 in General
I have started a report in which I need a variable to determine the % of
spend that a branch makes.

I.e.

Name Spend % Of Spend

Branch A ?100 10%
Branch B ?500 50%
Branch C ?200 20%
Branch D ?300 30%

Total: ?1000


My report uses a DBCalc in the summary to work out the Total Spend.
My Spend Figures are fields in my database.

My % Of Spend Is a Variable worked out using :
(BranchSpend/DBCalc1.value)*100

However the % of spend figures are being worked out incorrectly, as the
DBCalc1 value is not being worked out until the end of the report.

So I actually always have the first line showing as 100% (As by this point
the DBCalc.value is just the ?100 spend).

I think I have to use the 'timings' option on the variable, but cant quite
figure out what I need.

Basically I want the variable not to be calculated until DBCalc1.value is
finished, then for it to do the variable calculation.


Please can anyone help?

Thanks in advance.


Tim

Comments

  • edited April 2007
    Hi Tim,

    Instead of using DBCalc component, you will need to strictly use TppVariable
    components and make the calculations manually in the OnCalc event. Take a
    look at the following example on calculating a running percentage based on a
    lookahead total.

    http://www.digital-metaphors.com/tips/UseLookAheadValueInCalc.zip

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2007
    I cant open that to use in Report Builder I don't think?

    I'm not a programmer, just a report writer... any other ideas?

    I was sure that the timing on the variable had something to do with it, if I
    made it a 2 pass report?

    :(



  • edited April 2007
    Hi Tim,

    I'm sorry but we are only able to provide support for Delphi developers.
    You will need to contact the person/company that originally wrote your
    application for more help.

    -----------------------------------------
    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
This discussion has been closed.