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

Prospective RB User Question

edited October 2009 in General
I am considering switching from Crystal Reports to ReportBuilder for my
Delphi applications. I have a question. Let's say I have a system where I
have three tables:

Department Master Table with Department ID and Name
Employee Master Table with Employee ID and Name
Payroll Table with a record for each paycheck for each employee that
contains Employee ID, Department ID and Paycheck amount.

I want a report where I group all paychecks by department with a Group
header of Department Name and a detail line of every Paycheck record linked
to that department by Department ID. I also want in each detail record the
employee name. That is not in the Payroll detail Table so I need to link to
the Employee Master Table for that. The key thing is that I want sort within
each department by Employee Name.

Crystal has a designer where I just link Payroll table to Department Master
Table by Department ID and also links Payroll Table to Employee Table by
Employee ID. It then does an SQL join of all the tables, I drop the fields,
including employee name on the detail line, tell it to sort by employee name
and it does, even thought employee name is not in the detail table itself.
SO Crystal is going off the joined table it creates internally.

It appears that does not happen in reprotBuilder, which is fine with me, as
long as I can understand how to do the above in RB.

Do I have to create my own SQL query to create a Joined query result of
Payroll and Employee tables, ordered by employee name to use as a datasource
for a pipeline in RB in order to sort by employee name? That's fine with me
if that's what I need to do, I just want to make sure I'm not missing
another way to do it.

Comments

  • edited October 2009

    Thanks for your interest in ReportBuilder.

    The Query tools included with RB Professional and Enterprise can be used to
    quickly define SQL join conditions and define linking relaitionship between
    queries (i.e. master/detail or lookups). ReportBuilder will generate the
    required SQL command.

    For this report you could access the ReportDesigner's Data workspace and
    select New... QueryDesigner and then select the 3 tables (Department,
    Emplyee, and Payroll) from the Tables page, select the Fields from the
    Fields Page, and use the Order page to define the sort order.

    For another type of report you might want to create a master query that is
    connected to the main report. Then create a detail query and link it to the
    master by dragging from the detail field to the master field. Then connecct
    the detail query to a subreport placed in the detail band. Now the main
    report will traverse the master data and generate a detail band for each
    record. The subreport in the detailband will traverse the detail query and
    generate a detail band for each record in the detail query.

    For some examples run Demos\EndUser\Report Explorer and see the included
    sample reports. (The demos are installed to your Public Documents or Shared
    Folders directory for Vista or XP.

    Also check out the Learning ReportBuilder tutorials.

    http://www.digital-metaphors.com/download/learning_reportbuilder.html


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2009
    Thanks Nard,

    Can I still get a version of Report Builder that works with Delphi 5 ?

  • edited October 2009

    A license to RB 11 includes RB 7.04 for D5. RB 7.04 was the last produced
    release to support D5. Trial versions are available for download. Note that
    for RB Server Edition, there is no D5 support.

    http://www.digital-metaphors.com/download/

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2009


    Wrong wording. There is no D5 Server Edition, but registered users can
    download RB Enterprise for D5.


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2009
    Sounds good. Thanks Nard

This discussion has been closed.