Subject | Re: [IBO] MasterParamLinks? |
---|---|
Author | Rick Roen |
Post date | 2005-05-27T12:58:59Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
and :EndDate.
You are correct, I had the master/detail reversed - mental block I
guess. It makes more sence with TOTAL feeding the LIST params and is
much easier to setup with the MasterParamLinks.
Thanks
> At 06:05 PM 26/05/2005 +0000, you wrote:Sorry, typo. I am using IB_Query
> >Hi All,
> >
> >Delphi 7.0, FB 1.5
> >
> >I have two IBO_Queries.
>
> Do you mean IBOQueries or IB_Queries? <--- ANSWER THIS
>set.
> >One gets the items sold to a customer for a
> >date range and the other gets the total of these sales amounts for
> >the same range.
> >
> >I get the user input for the customer number, begin and end dates
> >with and IB_Edit and two IB_DateTimePickers with their ParamName
> >tables.
> >The SQL is like this
> >
> >ITEMS LIST TABLE
> >Select.... from Table where Custnum = :Custnum and Date_Invoice
> >between :Begin and :End
> >
> >ITEMS TOTAL TABLE
> >Select Sum(TOTAL) from Table where Custnum = :Custnum and
> >Date_Invoice between :Begin and :End
> >
> >I have the edit and datetimepickers feeding one table with no
> >problem, but I would like it to supply the parameters to BOTH
> >param
> >I thought I could do this with the MasterParamLinks in the TOTAL
> >table, but it will only relate a field in the LIST table to a
> >in the TOTAL table.once?
> >
> >Is there some way to feed these same params into two tables at
>Surely, one
> You seem to have the master-detail relationship upside-down.
> total (aggregated) record refers to many details, right?Actually I don't. This was only psudo code; I use :BeginDate
>
> Also, don't use keywords as parameter names!!
and :EndDate.
>apply
> Nil out the Mastersource and MasterParamLinks in the TOTAL set and
> them to the LIST set instead.to the
>
> In the LIST set, Mastersource should be the datasource that points
> TOTAL set. MasterParamLinks should bethe TOTAL
> LISTset.Custnum=TOTALset.Custnum
> LISTset.BeginDate=TOTALset.BeginDate
> LISTsetEndDate=TOTALset.EndDate
>
> The data-aware DateTimePickers should be linked only to dates in
> set. If you want datetimepickers that work with anything, don'tuse bound
> ones.detail
>
>
> The user input controls should be bound to the TOTAL set, not the
> set. Tip: leave the Datafield nil and use ParamName instead.ib_
>
> All this assumes you ARE using ib_queries, not iboqueries. The
> controls don't work with iboqueries.Hello Helen,
>
> Helen
You are correct, I had the master/detail reversed - mental block I
guess. It makes more sence with TOTAL feeding the LIST params and is
much easier to setup with the MasterParamLinks.
Thanks