Home Subreports
New Blog Post: Email: Multi-Service

Return Sub-report total back to main report

edited June 2008 in Subreports
Hi,

I have a subreport with total calculate using DBCalc, I want to return this
total back to main report.

Create a global vaiable and assigned value within sub report
SummaryAfterGenerate event.

It shows up properly under preview, however, after I save report back to
database and rerun it, the value is always 0

Anything, I missing?


I am using BDS 2007 and RB 10.08

Jianfei

Comments

  • edited June 2008
    Hi Jianfei,

    Are you able to recreate this using the End User example located in the
    \RBuilder\Demos\End User\... directory? If you save the template to file,
    then reload it, do you get the same behavior?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2008
    Hi, Nico

    It look like something wrong with Report.PrintToDevices.

    I try Report.Print and Report.PrintReport, the value shows up properly.

    How can I hide the Print Preview popup form, if I forced to use Report.Print
    instead of Report.PrintToDevices.

    Thanks

    Jianfei
  • edited June 2008
    Hi Jianfei,

    PrintToDevices does not initialize any parameters and gives you complete
    control over which dialogs are shown. If you would like to print directly
    to the printer or another device, you can simply change the
    Report.DeviceType property. There are also other various properties on the
    TppReport object to control how the report is shown.

    ---------------------------------------------------------------
    Article: Resources for Learning ReportBuilder
    ---------------------------------------------------------------

    1. Learning ReportBuilder is a complete learning system designed to teach
    end users how to build a range of reports, but it is also an excellent
    resource for the developer who is just getting started with RB. Learning RB
    includes a 125-page PDF file, a stand-alone application complete with a
    database, and a help file. The PDF file contains a set of tutorials, which
    can be completed using the provided application. Learning ReportBuilder can
    be downloaded from:

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

    2. Learning to RAP is designed to teach end-users how to use ReportBuilder's
    Calc workspace to perform calculations and control visual aspects of the
    report while it is generating. Learning to RAP includes a 59-page PDF file
    and a stand-alone application complete with a database. The PDF file is
    comprised of a series of tutorials that step end users through the process
    of coding calculations and event-handlers to dynamically control report
    generation. The application is used in conjunction with the tutorials so
    that the learning experience is interactive. Learning ReportBuilder - RAP
    can be downloaded from:

    http://www.digital-metaphors.com/LearnRB/LearnRap.exe

    3. Developer's Guide

    When you install RB, this guide is automatically installed into the
    RBuilder\Developers Guide directory. It contains extensive conceptual
    information and step by step tutorials which show how to construct reports
    and reporting applications within the context of the Delphi IDE.


    4. On-Line Help

    Accessible via a single click of the F1 key from with the Delphi IDE, this
    reference resource explains the classes, methods, properties and events
    which make up the product. It is also an excellent source of information
    regarding installation, troubleshooting and version history.


    5. Examples

    There are a large number of example reports and reporting applications
    included with RB. These show how to accomplish some of the most frequently
    requested types of reports. In total there are probably over 200 different
    examples covering everything from crosstabs to full-blown end-user reporting
    solutions. The RAP functionality included with ReportBuilder Enterprise has
    a separate set of demos, tutorials, and help files.


    6. news.digital-metaphors.com

    The newsgroups are very active with both Digital Metaphors engineers, TeamDM
    members (volunteers specially selected for their knowledge of RB and their
    willingness to help) and RB developers all pitching in to answer questions
    and help each other out. There is also a Tech Tips 'newsgroup' maintained
    by DM Engineers which lists over 100 different articles outlining various
    tips and techniques. Probably the easiest way to connect to the newsgroups
    is to surf the digital metaphors site, go to the support section and click
    the newsgroup of your choice:

    http://www.digital-metaphors.com/Subpages/Support/newsgroups.html


    ReportBuilder newsgroup archives may be searched using a search engine
    hosted by Tamarack Associates. Access the the following URL and then search
    the Borland Newsgroup database. Tamarack has indexed the ReportBuilder
    newsgroup archives in this database.


    http://www.tamaracka.com/




    7. support@digital-metaphors.com

    When you are working on the really advanced stuff, and need an additional
    point of view, we're always glad to help.


    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2008

    1. Using PrintToDevices

    if myReport.InitializeParameters then
    myReport.PrintToDevices


    2. Using Print

    uses
    ppTypes;

    myReport.DeviceType := dtPrinter;
    myReport.ShowPrintDialog := False;
    myReport.ShowCancelDialog := False;

    myReport.Print;


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2008
    "Nard Moseley (Digital Metaphors)" wrote in
This discussion has been closed.