|
| No Value in Grid |
 |
Sat, 22 Mar 2008 06:20:43 -050 |
|
| Post Reply
|
| Re: No Value in Grid |
 |
Sun, 23 Mar 2008 04:10:12 -040 |
In article <II4YE7AjIHA.524@news-server>, bmckinney721@bellsouth.net
says...
> Using dB+ 2.6 w/XP pro. I have a dmd (invoices.dmd) that contains
Customer(table) index=Customer, Invoice-index=Custno linked to customer via
Custno,LineItem-index=InvoiceNo linked to invoice via
InvoiceNo,Inventry-index=PartNo
linked to LineItem via Partno. Form.lineItem calls form.InvLookup which
contains a grid w/seeker control. The lookup was working as expected except
form.lineItem was displaying some data from an Inv rowset as though the Inv
table
was indexed on Vendno rather than Partno, however the grid displayed correct
partno indexed rowsets. I opened the dmd and made sure the Inventry table order
was set to PartNo. When I tried to run the forms I had lost the rowset
display in the inventry grid w/ the seeker. The properties of the Inventry
table in the dmd - IndexName = PartNo, masterField = PartNumber, masterRowset =
lineitem1.rowset. I hope all the above mumbo jumbo makes sense as to why I
lost the inventry grid data display. I see the column headings just no data.
..Bob
>
Bob,
Can you show us the code for the DMD and the grid? There is no way to
tell from your description exactly what would have been changed.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
| Re: No Value in Grid |
 |
Tue, 25 Mar 2008 12:03:52 -050 |
> In article <II4YE7AjIHA.524@news-server>, bmckinney721@bellsouth.net
> says...
> > Using dB+ 2.6 w/XP pro. I have a dmd (invoices.dmd) that contains
Customer(table) index=Customer, Invoice-index=Custno linked to customer via
Custno,LineItem-index=InvoiceNo linked to invoice via
InvoiceNo,Inventry-index=PartNo
> linked to LineItem via Partno. Form.lineItem calls form.InvLookup which
contains a grid w/seeker control. The lookup was working as expected except
form.lineItem was displaying some data from an Inv rowset as though the Inv
table
> was indexed on Vendno rather than Partno, however the grid displayed
correct partno indexed rowsets. I opened the dmd and made sure the Inventry
table order was set to PartNo. When I tried to run the forms I had lost the
rowset
> display in the inventry grid w/ the seeker. The properties of the Inventry
table in the dmd - IndexName = PartNo, masterField = PartNumber, masterRowset =
lineitem1.rowset. I hope all the above mumbo jumbo makes sense as to why I
> lost the inventry grid data display. I see the column headings just no
data. ..Bob
> >
>
> Geoff wrote;
> Can you show us the code for the DMD and the grid? There is no way to
> tell from your description exactly what would have been changed.
>
> --
Geoff: Below is snippet of code from invoices.dmd.
this.INVENTRY1 = new QUERY()
this.INVENTRY1.parent = this
with (this.INVENTRY1)
left = 528.0
top = 14.0
width = 114.0
height = 282.0
database = form.bobsbiz1
sql = 'Select * from "inventry"'
active = true
endwith
with (this.INVENTRY1.rowset)
fields["PartNumber"].lookupSQL = 'select * from
"inventry"'
autoEdit = false
indexName = "PARTNO"
masterRowset = form.lineitem1.rowset
masterFields = "PartNumber"
endwith
Below is code for the grid
this.MYGRID2 = new MYGRID(this)
with (this.MYGRID2)
dataLink = form.invoicesdatamodule1.inventry1.rowset
columns["COLUMN1"] = new GRIDCOLUMN(form.MYGRID2)
columns["COLUMN1"].dataLink =
form.invoicesdatamodule1.inventry1.rowset.fields["partnumber"]
columns["COLUMN1"].editorType = 1 // EntryField
columns["COLUMN1"].width = 150.0
columns["COLUMN2"] = new GRIDCOLUMN(form.MYGRID2)
columns["COLUMN2"].dataLink =
form.invoicesdatamodule1.inventry1.rowset.fields["description"]
columns["COLUMN2"].editorType = 1 // EntryField
columns["COLUMN2"].width = 300.0
columns["COLUMN3"] = new GRIDCOLUMN(form.MYGRID2)
columns["COLUMN3"].dataLink =
form.invoicesdatamodule1.inventry1.rowset.fields["price"]
columns["COLUMN3"].editorType = 3 // SpinBox
columns["COLUMN3"].width = 120.0
columns["COLUMN4"] = new GRIDCOLUMN(form.MYGRID2)
columns["COLUMN4"].dataLink =
form.invoicesdatamodule1.inventry1.rowset.fields["onhand"]
columns["COLUMN4"].editorType = 3 // SpinBox
columns["COLUMN4"].width = 70.0
columns["COLUMN5"] = new GRIDCOLUMN(form.MYGRID2)
columns["COLUMN5"].dataLink =
form.invoicesdatamodule1.inventry1.rowset.fields["units id"]
columns["COLUMN5"].editorType = 1 // EntryField
columns["COLUMN5"].width = 80.0
with (columns["COLUMN1"].headingControl)
value = "PartNumber"
endwith
with (columns["COLUMN2"].headingControl)
value = "Description"
endwith
with (columns["COLUMN3"].editorControl)
rangeMax = 100
rangeMin = 1
endwith
with (columns["COLUMN3"].headingControl)
value = "PRICE"
endwith
with (columns["COLUMN4"].editorControl)
rangeMax = 100
rangeMin = 1
endwith
with (columns["COLUMN4"].headingControl)
value = "ONHAND"
endwith
with (columns["COLUMN5"].headingControl)
value = "Units ID"
endwith
height = 322.0
left = 2.0
top = 70.0
width = 632.0
endwith
this.SEEKER2 = new SEEKER(this)
with (this.SEEKER2)
height = 32.0
left = 158.0
top = 35.0
width = 290.0
endwith
If you would like something different, let me know. Bob
> Geoff Wass [dBVIPS]
>
|
| Post Reply
|
| Re: No Value in Grid |
 |
Wed, 26 Mar 2008 01:57:00 -040 |
Bob,
I think your problem is in this line:
fields["PartNumber"].lookupSQL = 'select * from "inventry"'
You are PartNumber is in the Inventry table and you are looking up the
value in the same table. The idea of the lookupSQL is to lookup a code
in _different_ table. So, if you had a PARTS table, you could have a
line like this:
fields["PartNumber"].lookupSQL = 'select partCode, partName from
"PARTS"'
This will display partName in the comboBox, but store partCode in the
partNumber field of INVENTRY.
Likely your PARTS table will have the same field name as INVENTRY, so
really it would look like this:
fields["PartNumber"].lookupSQL = 'select partNumber, partName from
"PARTS"'
Be sure partNUmber is a simple index in the PARTS table.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
| Re: No Value in Grid |
 |
Wed, 26 Mar 2008 12:32:31 -050 |
Geoff Wass [dBVIPS] Wrote:
> Bob,
>
> I think your problem is in this line:
>
> fields["PartNumber"].lookupSQL = 'select * from
"inventry"'
>
>
> You are PartNumber is in the Inventry table and you are looking up the
> value in the same table. The idea of the lookupSQL is to lookup a code
> in _different_ table. So, if you had a PARTS table, you could have a
> line like this:
>
> fields["PartNumber"].lookupSQL = 'select partCode, partName from
> "PARTS"'
>
> This will display partName in the comboBox, but store partCode in the
> partNumber field of INVENTRY.
>
> Likely your PARTS table will have the same field name as INVENTRY, so
> really it would look like this:
>
> fields["PartNumber"].lookupSQL = 'select partNumber, partName
from
> "PARTS"'
>
> Be sure partNUmber is a simple index in the PARTS table.
>
> --
> Geoff Wass [dBVIPS]
> Montréal, Québec, Canada
>>>
Geoff: I don't quite understand what you are saying above since it would
require another table. I have done some experminting and eliminated lines in
the .dmd code as show below. The resuts brought the data back to the grid, but
it leaves incorrect data in the lineitem.wfm description and cat-description
fields during the edit mode and when the lineitemedit.wfm is opened. The append
mode has incorrect data in those fields until a partno is selected from the
grid. The correct data is then displayed as well as other data, such as
partnumber, price, etc.
with (this.INVENTRY1.rowset)
// fields["PartNumber"].lookupSQL = 'select * from
"inventry"'
autoEdit = false
indexName = "PARTNO"
// masterRowset = form.lineitem1.rowset
// masterFields = "PartNumber"
endwith
The only thing that bothers me now is the incorrect data. Thanks for your
interest...Bob
|
| Post Reply
|
|
|
|
|
|
|
|
|
|