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

How to move a TppDBText relative to another TppDBText? First Name/Last Name problem

edited June 2006 in General
Hi,

I have a simple report, an invoice. There is the first name of the customer
somewhere in the header (TppDBTExt), and right from that the last name (also
TppDBText). Now, I want

1) that "First Name" and "Last Name" do some kind of AutoSize and

2) "Last Name" moves accordingly to the width change of "First Name"

Means: "Joe Cole" and "Robert Mitchum" will be printed just fine, witht the
same gap between first and last name, and without the need to add a
"FullName" field in the dataset. That would not help, too, some of my
customers want "First Name" "Last Name", some "Last Name", "First Name" etc.
So I need some automatism, something the user can set up. I fiddled with
regions, but they don't know how to autosize with a TppDBText in them.

Oh, and I am using ReportBuilder version 7. Our customers demand Delphi 5.

Ralf

Comments

  • edited June 2006
    Hi Ralf,

    This can be done either using the method shown in demo 33 located in the
    \RBuilder\Demos\1. Reports\... directory, or using a TppVariable and
    manually adding each field in the OnCalc event. For example...

    procedure TForm1.ppVariable1Calc(Sender: TObject; var Value: Variant);
    begin
    Value := Report.DataPipeline['FirstName'] + ' ' +
    Report.DataPipeline['LastName'];
    end;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Nico Cizik (Digital Metaphors) wrote:

    Sorry, but that does not work for me. The application has a central
    reporting form. Pipelines are created on demand when the first report of a
    certain type is loaded (eg. the first report for invoices has all possible
    fields for that). I can't hard code any events for a report or a pipeline. I
    need a solution that works just by changing the content of a RTM file.

  • edited June 2006
    Hi Ralf,

    ReportBuilder Enterprise includes the RAP feature. This allows you to add
    event code native and local to the template file, removing the need to code
    events in Delphi. For more information about RAP, visit the following web
    site.

    http://www.digital-metaphors.com/products/RAP/

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Nico Cizik (Digital Metaphors) wrote:

    Is it possible to buy ReportBuilder Enterprise version 7 for Delphi 5? If
    yes, what's the price for an update? You can email me. Thanks in advance.

    Ralf Mimoun
  • edited June 2006

    You need to purchase a license to ReportBuilder 10 Enterprise. It includes
    a license to the last produced version for Delphi 5, which is RB 7.04.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2006
    In article <449abaea$1@dellsc1420.>, Ralf Mimoun wrote:

    I would use a calculated field for this or as said RAP.

    Gruß aus den Bergen
    Günter
  • edited June 2006
    Günter Kieninger wrote:

    As I wrote, changing the dataset, adding fields etc. is something I really
    want to avoid. I don't know what format the customer want, and I thought
    that something that simple is possible with ReportBuilder. Delphi can do it
    on forms with AutoSize, anchors and the Align property.

    Ralf
  • edited June 2006
    Nard Moseley (Digital Metaphors) wrote:

    Thank you for your fast answer and your support. I visited the Digital
    Metaphors site, and I must admit that the sticker shock is way too much for
    me. I am very sorry, really, because ReportBuilder served me well in the
    last years. But if I have to spend that amount of money just to get one
    feature (which I don't get, I have to write code) which seems to be natural
    for a report generator, then it's time to reach for other shores. I simply
    don't need full scripting support right now, and I don't spend money now for
    something I might or might not need one day.

    Ralf
  • edited June 2006
    In article <449b0c0a$1@dellsc1420.>, Ralf Mimoun wrote:

    Adding a calculated field is easy and you can read the format from a ini-file,
    or you add a additional memory dataset which contains this fields.


    Automatic Shifting is only working vertical and from horizontal. You can do
    this with RAP.

    Gruß aus den Bergen
    Günter
  • edited June 2006
    Günter Kieninger wrote:

    That is not the kind of system where you can simply setup something that
    marginal via INI file. My problem: I have to change the application in some
    way: changing hte SQL statement of the query, add a calculated field or
    something like that, and build a way to configure the result text. Whatever
    I do, it will not be flexible (maybe the customer wants 3 mm between first
    and last name, or maybe he wants "first last street" etc. Of course, I could
    build something that parse a string the user enters in a setup area, but
    don't you think that this is quite some work for a feature that is _very_
    basic from a users point of view? Printing a name nice and clean so that it
    looks as it should, is for a user something he expect.

    ...

    I know. But that translates in "You can do this by writing a script for
    that. And paying $599 extra, btw.". My customer will definitely not pay that
    steep price for a simple feature.

    Please don't get me wrong, ReportBuilder serves me very well. In that
    particulat system, there is a custom made template management, there is an
    archive of everything printed out etc. Easily done with ReportBuilder. But
    after my customers inquiry I believe more and more that the feature he wants
    is really a basic requirement for a general report generator. And this time,
    the way I have to go to get what my customer need is really stony.

    Ralf
  • edited June 2006
    In article <449b9a61@dellsc1420.>, Ralf Mimoun wrote:

    Thats ok. In my case I could not work without RAP so I already paid this long
    time ago :)


    You are right. Some small important features are really missing in RB. And my
    biggest problem is that D5 isn't supported any longer by DM.

    Gruß aus den Bergen
    Günter
  • edited June 2006

    Another option you can try is to use the TppRichText component and its mail
    merge feature. This enables you to embed datafields in formatted text. Then
    at run-time RB replaces the datafield tags with the datafield values. This
    feature was ehanced for RB 9 so that display formats can applied and so that
    datafields from any datapipeline visible to the report can be used.

    Simple example:

    ,



    Thanks for your feedback on this thread.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2006
    Nard,

  • edited June 2006
    Nard,

    first: thank you!

  • edited June 2006

    Excellent - glad you found a solution :)


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.