AddLink Function
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
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
This discussion has been closed.
Comments
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
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
WoMaster where they join with records from WoCompleted.
procedure ReportBeforeOpenDataPipelines;
begin
WoCompleted.AddLink(WoMaster, 'YearMonth', 'YearMonth');
WoMaster.SkipWhenNoRecords :=False;
end;
Thanks,
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks,
Bob
Thanks,
Bob