Board index » delphi » Master-Detail in one grid?

Master-Detail in one grid?

Hi,

I have a few questions.
I was wondering if it is possible to display detail-fields in the same
master-grid, by expanding or something. I also have a chapter in my
book, which shipped with delphi, about TDecisionGrid and TDecisionCube.
I cannot find either of these on my component pallet. Should I have
those? (I have Delphi 4 prof.).

Thanks,

Bator.

 

Re:Master-Detail in one grid?


Quote
In article <3758EB58.40E1B...@hvision.nl>, Bator wrote:
> I was wondering if it is possible to display detail-fields in the same
> master-grid, by expanding or something.

Yes, if you create persistent fields via the Fields Editor (double click
on the TTable icon on your form).

After creating all (or some) of the regular fields (right click on Fields
Editor and select "Add Fields" or "Add Field"), you can then add a new
field in a similar fashion and set it as a Lookup field.

Quote
> TDecisionGrid and TDecisionCube.
> I cannot find either of these on my component pallet. Should I have
> those? (I have Delphi 4 prof.).

These are only supplied in the C/S version.

 Mike Orriss (TeamB)
 (No e-mail replies, please, unless explicitly requested!)

Re:Master-Detail in one grid?


Quote
>I was wondering if it is possible to display detail-fields in the same
>master-grid, by expanding or something.

The ClientvServer version of Delphi can do nested Datasets with the
TclientDataset component.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Master-Detail in one grid?


Hi,

I tried to set up a field as a lookup, but cannot seem to get it to work. I
keep getting the message: "field ... cannot be a lookup field". Any hints?

Bator.

Quote
"Mike Orriss (TeamB)" wrote:
> In article <3758EB58.40E1B...@hvision.nl>, Bator wrote:
> > I was wondering if it is possible to display detail-fields in the same
> > master-grid, by expanding or something.

> Yes, if you create persistent fields via the Fields Editor (double click
> on the TTable icon on your form).

> After creating all (or some) of the regular fields (right click on Fields
> Editor and select "Add Fields" or "Add Field"), you can then add a new
> field in a similar fashion and set it as a Lookup field.

> > TDecisionGrid and TDecisionCube.
> > I cannot find either of these on my component pallet. Should I have
> > those? (I have Delphi 4 prof.).

> These are only supplied in the C/S version.

>  Mike Orriss (TeamB)
>  (No e-mail replies, please, unless explicitly requested!)

Re:Master-Detail in one grid?


Quote
In article <375B92D4.3A69E...@wxs.nl>, Lexus wrote:
> I
> keep getting the message: "field ... cannot be a lookup field"

What field type have you chosen for your new field?

 Mike Orriss (TeamB)
 (No e-mail replies, please, unless explicitly requested!)

Re:Master-Detail in one grid?


Hi,

I chose Lookup,

Bator.

Quote
"Mike Orriss (TeamB)" wrote:
> In article <375B92D4.3A69E...@wxs.nl>, Lexus wrote:
> > I
> > keep getting the message: "field ... cannot be a lookup field"

> What field type have you chosen for your new field?

>  Mike Orriss (TeamB)
>  (No e-mail replies, please, unless explicitly requested!)

Re:Master-Detail in one grid?


Quote
In article <375BDD3B.AEAF0...@wxs.nl>, Lexus wrote:
> I chose Lookup,

Sorry, I haven't explained very well.

When you have the Fields Editor window displayed (by double clicking
the TTable icon on the form), you can right click it and select "New
Field". This results in the "New Field" dialog being displayed.

You will now see three group boxes and three buttons.

The first groupbox contains a combobox named "Type" and I was asking
which value you had chosen.

 Mike Orriss (TeamB)
 (No e-mail replies, please, unless explicitly requested!)

Re:Master-Detail in one grid?


I do the following:

add new field.
name:mydetail.
type:Dataset
size:0
Key Fields: ANR
DataSet:MyDetailTable
Lookup Keys: ANR
Result Field: AName

Type is Dataset, and not lookup, as i said before.
I have a referential key ANR, which is primary in the master-table, and
is part of a compound key in the detail table. I thought this would then
collect the dataset that is defined by the keyfield. It gives me a
EDatabaseError: MyDetailTable:Field:MyDetail cannot be a calculated or
lookup field. Hope this gives the whole picture. And btw, thanks for the
trouble.

Bator.

Quote
"Mike Orriss (TeamB)" wrote:
> In article <375BDD3B.AEAF0...@wxs.nl>, Lexus wrote:
> > I chose Lookup,

> Sorry, I haven't explained very well.

> When you have the Fields Editor window displayed (by double clicking
> the TTable icon on the form), you can right click it and select "New
> Field". This results in the "New Field" dialog being displayed.

> You will now see three group boxes and three buttons.

> The first groupbox contains a combobox named "Type" and I was asking
> which value you had chosen.

>  Mike Orriss (TeamB)
>  (No e-mail replies, please, unless explicitly requested!)

Re:Master-Detail in one grid?


Quote
In article <375D6FB7.1A8DD...@hvision.nl>, Bator wrote:
> Type is Dataset, and not lookup, as i said before.

I'm sorry, I have never used Dataset as a field type. Hopefully,
somebody else will step in.

 Mike Orriss (TeamB)
 (No e-mail replies, please, unless explicitly requested!)

Re:Master-Detail in one grid?


Quote
>Type is Dataset, and not lookup, as i said before.
>I have a referential key ANR, which is primary in the master-table, and
>is part of a compound key in the detail table. I thought this would then
>collect the dataset that is defined by the keyfield. It gives me a
>EDatabaseError: MyDetailTable:Field:MyDetail cannot be a calculated or
>lookup field. Hope this gives the whole picture. And btw, thanks for the
>trouble.

You do not have the option of creating fields of the type dataset.
This is a field created when you set up nested datasets.  Currently this is only
possible with Oracle 8 and Tclient datasets.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Master-Detail in one grid?


ok, so it's no go... Thanx anyway.
Bator
Quote
Brian Bushay TeamB wrote:
> >Type is Dataset, and not lookup, as i said before.
> >I have a referential key ANR, which is primary in the master-table, and
> >is part of a compound key in the detail table. I thought this would then
> >collect the dataset that is defined by the keyfield. It gives me a
> >EDatabaseError: MyDetailTable:Field:MyDetail cannot be a calculated or
> >lookup field. Hope this gives the whole picture. And btw, thanks for the
> >trouble.

> You do not have the option of creating fields of the type dataset.
> This is a field created when you set up nested datasets.  Currently this is only
> possible with Oracle 8 and Tclient datasets.

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Other Threads