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

AddLink Function

edited February 2008 in General
In the BeforeOpenDataPipelines event, I have the following. It appears to
me that this creates and inner join only. It works great but how can I make
it an outer join. In other words, I want all records from WoMaster
regardless if there are records from WoCompleted or not. Can this be
accomplished with AddLink function? I need to use AddLink function because
I am actually adding two links.

WoCompleted.AddLink(WoMaster, 'SYear', 'CYear');

Thanks,
Bob

Comments

  • edited February 2008
    Actually I am teaching a seminar of our software including Report Builder.
    In case a group by on calc cannot be done in RB, I would like to explain
    application so you might suggest a work around. So I can show users how to
    accomplish what we need. I hope there is a way to do the group by
    calculated field. It can be done with straight sql.

    Have table with fields: WorkOrderNumber, ScheduledDate, CompletedDate. Need
    to generate a report that list each Month / Year and a count of work orders
    with ScheduledDate in the month and count of work orders with CompletedDate
    in that month. In other words, for each month of the year, how many work
    orders were scheduled and how many work orders were completed.

    Month/Yr Sched Completed
    1/2008 23 33
    2/2008 23 13
    -----------------
    Totals 46 46

    There has to be a way to accomplish this. I understand how to do multiple
    queries and how to get the data but can't seem to group by on
    Month(ScheduledDate) and Year(ScheduledDate).

    Thanks for any help you can give.
    Bob

  • edited February 2008
    Hi Bob,

    Try setting the Detail Pipeline's SkipWhenNoRecords property to False. This
    will ensure all master fields are printed whether there are details or not.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2008
    I created the following but it still only gets displays records from
    WoMaster where they join with records from WoCompleted.

    procedure ReportBeforeOpenDataPipelines;
    begin
    WoCompleted.AddLink(WoMaster, 'YearMonth', 'YearMonth');
    WoMaster.SkipWhenNoRecords :=False;
    end;

    Thanks,
    Bob
  • edited February 2008
    Hi Bob,

    The SkipWhenNoRecords needs to be set on the detail dataset. See my
    previous response :).

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2008
    Ok, I missed that.

    Thanks,
    Bob

  • edited February 2008
    Works perfectly.

    Thanks,
    Bob

This discussion has been closed.