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

Rebuild Ent with Delphi5

edited September 2004 in General
Dear All,

Since I add a function in the TppCustomReport to print the bottom line
at the end of each page, what is the best way to compile it?

I 've tried to compile dpk by dpk. It works prefect.

However, when I try to to compile a RAP project.

I find a version conflict problem on the ppClass.

The reason is on the RAP. However , I can't compile it

What is the suggestion for it?

Comments

  • edited September 2004
    Hi Joe,

    Since we do not provide the source for RAP, if you change any of the
    Interface sections of the ReportBuilder source, you will no longer be able
    to use it. If you would like to add functionality to ReportBuilder and
    still use RAP, you will need to either add an in-line method or create a new
    descendent class that is registered with the RB archetecture.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2004
    Dear All,

    Actually, I want to add a auto border property for the ppReport.

    My design:

    For each page last detail band after print event, I record the position.

    Then I will print a bottom line at the end of each page.

    What is the suggestion on doing this function?

    Any Hints?


  • edited September 2004
    Hi Joe,

    Check out the following example. This shows how you can add a line (for
    instance) to the bottom of the last detail band on a page by creating a draw
    command at runtime. Hope this helps.

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

    --
    Best Regards,

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

    Thanks for your suggestion.

    I've one of the problem. Currently, I need to change the TppPlainTextParser

    class so that I can correct wrap the chinese character into a new line.

    Any other way to avoid rebuilding the source?






  • edited September 2004
    Hi Joe,

    Unfortunately, you are only going to be able to change the Implementation
    section of the TppPlainTextParser class if you would still like to use RAP.
    Depending on what changes you need to make, you may be able to alter the
    existing code only using nested routines and local variables. If this is
    not possible, you will need to retrieve the text object from ReportBuilder
    and run it through your own formatting routines, completely separate of
    ReportBuilder.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2004
    Hi,
    Would you mind to send a example on

    1. Change the Implementation Only
    2. By using nested routines and local variables
    3. Retrieve the text object from ReportBuilder and run it through your own
    formatting routines

    Actually, I've changed the
    function TppPlainTextParser.GetNextWord: String;
    and add One class private variable.

    How can I achieve it and still use the RAP?


  • edited September 2004
    Hi Joe,

    1. A Delphi unit is essentially separated into two parts the Interface, and
    Implementation sections. Since we do not provide the source to RAP, you
    will only be able to change code located in the Implementation section of
    the RB source and still have RAP compile correctly. This means you will not
    be able to add any new routines or properties to any of the classes already
    in RB.

    2. Nested routines are routines located inside or "nested" inside existing
    routines. We try not to use nested routines in ReportBuilder because they
    tend to make the code look messy and hard to follow. In your case, using
    nested routines is preferable because they allow you to add code to the
    existing source without the need to declare them inside the Interface
    section of the unit. Note that a nested routine may only be used in the
    method it is nested in. See the Delphi help on Nested Routines for more
    information.

    3. Depending on what you are trying to accomplish, you could either
    retrieve the draw commands from report builder while it is generating and
    change the text formatting, or you could create new draw commands at runtime
    with your specific formatting. Each component in ReportBuilder creates a
    TppDrawCommand with in turn instructs the Screen or Printer canvas how to
    draw the object. I am unsure exactly what you are trying to do so this may
    or may not be the best solution for your needs. See the example below on
    adding a simple draw command to a page.

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

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.