on 05-30-2006 9:42 AM
Hi,
i am trying to convert an addon from sbo 2004 to 2005.
In 2004 eveything works fine but in 2005 i have the problem that the matrix on my form doesn't show a row. The columns of the matrix are binded to a datasource. I have done this by using an .srf file (see below).
I use this code to add an empty row:
Dim LastRow As Integer
LastRow = m_dbdsPROJLINE.Size
m_dbdsPROJLINE.InsertRecord(LastRow)
With m_dbdsPROJLINE
.SetValue("U_DOCNUM", LastRow, m_intCurrentDocNum.ToString)
.SetValue("U_LINENUM", LastRow, m_intCurrentLineNum.ToString)
.SetValue("U_PROCESS", LastRow, "00")
.SetValue("U_HOURS", LastRow, 0)
.SetValue("U_EMPLCOST", LastRow, 0)
.SetValue("U_REMARKS", LastRow, "")
.SetValue("U_MACHINID", LastRow, 0)
.SetValue("U_MACHHOUR", LastRow, 0)
End With
m_udsChanged.Value = "N"
m_dbdsPROJLINE.Offset = LastRow
m_udsNUM.Value = m_dbdsPROJLINE.Size
'add empty row in every case
m_mtxPROJLN.AddRow()
'increase line number
m_intCurrentLineNum += 1
The .srf file:
<?xml version="1.0" encoding="UTF-16"?>
<Application>
<forms>
<action
type="add">
<form
appformnumber="2000009400"
client_height="376"
client_width="715"
color="0"
default_button=""
height="410"
left="277"
pane="0"
title="Projektzeiterfassung"
top="39"
type="0"
uid=""
visible="0"
width="720">
<datasources>
<dbdatasources>
<action
type="add">
<datasource
tablename="@PROJHEAD"></datasource>
<datasource
tablename="@PROJLINE"></datasource>
</action>
</dbdatasources>
<userdatasources>
<action
type="add">
<datasource
size="4"
type="0"
uid="SY_NUM"></datasource>
<datasource
size="1"
type="9"
uid="SY_CHANGE"></datasource>
<datasource
size="8"
type="12"
uid="SY_DATE2"></datasource>
</action>
</userdatasources>
</datasources>
<menus></menus>
<items>
<action
type="add">
<Item
description=""
disp_desc="1"
enabled="1"
from_pane="0"
height="14"
left="105"
linkto=""
right_just="0"
tab_order="1"
to_pane="0"
top="2"
type="113"
uid="cmbPROJECT"
visible="1"
width="150">
<Specific
AffectsFormMode="1"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<ValidValues>
<action
type="add"></action>
</ValidValues>
<databind
alias="U_PRJCODE"
databound="1"
table="@PROJHEAD"></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="7"
linkto="cmbPROJECT"
right_just="0"
tab_order="0"
to_pane="0"
top="1"
type="8"
uid="lblPROJECT"
visible="1"
width="80">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Projekt"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="0"
from_pane="0"
height="14"
left="553"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="2"
type="16"
uid="txtDOCNUM"
visible="1"
width="130">
<Specific
AffectsFormMode="1"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<databind
alias="U_DOCNUM"
databound="1"
table="@PROJHEAD"></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="444"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="2"
type="8"
uid="lblDOCNUM"
visible="1"
width="80">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Buchungsnr."
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="1"
enabled="1"
from_pane="0"
height="14"
left="105"
linkto=""
right_just="0"
tab_order="2"
to_pane="0"
top="20"
type="113"
uid="cmbEMPLOY"
visible="1"
width="150">
<Specific
AffectsFormMode="1"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<ValidValues>
<action
type="add"></action>
</ValidValues>
<databind
alias="U_EMPID"
databound="1"
table="@PROJHEAD"></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="7"
linkto="cmbEMPLOY"
right_just="0"
tab_order="0"
to_pane="0"
top="19"
type="8"
uid="lblEMPLOY"
visible="1"
width="66">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Mitarbeiter"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="553"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="20"
type="16"
uid="txtDATE2"
visible="0"
width="130">
<Specific
AffectsFormMode="0"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<databind
alias="SY_DATE2"
databound="1"
table=""></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="553"
linkto=""
right_just="0"
tab_order="4"
to_pane="0"
top="20"
type="16"
uid="txtDATE"
visible="1"
width="130">
<Specific
AffectsFormMode="1"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<databind
alias="U_DOCDATE"
databound="1"
table="@PROJHEAD"></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="444"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="20"
type="8"
uid="lblDATE"
visible="1"
width="79">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Datum"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="1"
enabled="1"
from_pane="0"
height="14"
left="105"
linkto=""
right_just="0"
tab_order="3"
to_pane="0"
top="38"
type="113"
uid="cmbITMCODE"
visible="1"
width="150">
<Specific
AffectsFormMode="1"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<ValidValues>
<action
type="add"></action>
</ValidValues>
<databind
alias="U_ITEMCODE"
databound="1"
table="@PROJHEAD"></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="7"
linkto="cmbITMCODE"
right_just="0"
tab_order="0"
to_pane="0"
top="37"
type="8"
uid="lblITMCODE"
visible="1"
width="80">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Artikelnr."
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="510"
linkto=""
right_just="0"
tab_order="5"
to_pane="0"
top="38"
type="16"
uid="txtPCSOK"
visible="1"
width="40">
<Specific
AffectsFormMode="1"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<databind
alias="U_PCSOK"
databound="1"
table="@PROJHEAD"></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="444"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="38"
type="8"
uid="lblPCSOK"
visible="1"
width="60">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Stückzahl i.O."
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="643"
linkto=""
right_just="0"
tab_order="6"
to_pane="0"
top="38"
type="16"
uid="txtPCSNOK"
visible="1"
width="40">
<Specific
AffectsFormMode="1"
backcolor="-1"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1">
<databind
alias="U_PCSNOK"
databound="1"
table="@PROJHEAD"></databind>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="14"
left="553"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="38"
type="8"
uid="lblPCSNOK"
visible="1"
width="51">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="nicht i.O."
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="281"
left="7"
linkto=""
right_just="0"
tab_order="7"
to_pane="0"
top="66"
type="127"
uid="mtxPROJLN"
visible="1"
width="700">
<Specific
AffectsFormMode="1"
SelectionMode="2"
backcolor="-1"
font_size="-1"
forecolor="-1"
layout="0"
supp_zeros="0"
text_style="-1">
<columns>
<action
type="add">
<column
AffectsFormMode="1"
backcolor="-1"
description=""
disp_desc="0"
editable="0"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="#"
type="16"
uid="Col0"
val_off="N"
val_on="SY_NUM"
visible="1"
width="20">
<databind
alias="SY_NUM"
databound="1"
table=""></databind>
</column>
<column
AffectsFormMode="0"
backcolor="-1"
description=""
disp_desc="0"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="LINENUM"
type="16"
uid="Col7"
val_off=""
val_on=""
visible="0"
width="20">
<databind
alias="U_LINENUM"
databound="1"
table="@PROJLINE"></databind>
</column>
<column
AffectsFormMode="0"
backcolor="-1"
description=""
disp_desc="0"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="CHANGED"
type="16"
uid="colCHANGE"
val_off="N"
val_on="Y"
visible="0"
width="30">
<databind
alias="SY_CHANGE"
databound="1"
table=""></databind>
</column>
<column
AffectsFormMode="1"
backcolor="-1"
description=""
disp_desc="1"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="Arbeitsgang"
type="113"
uid="Col4"
val_off=""
val_on=""
visible="1"
width="120">
<ValidValues>
<action
type="add"></action>
</ValidValues>
<databind
alias="U_PROCESS"
databound="1"
table="@PROJLINE"></databind>
</column>
<column
AffectsFormMode="1"
backcolor="-1"
description=""
disp_desc="0"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="Stunden"
type="16"
uid="Col3"
val_off="N"
val_on="U_HOURS"
visible="1"
width="50">
<databind
alias="U_HOURS"
databound="1"
table="@PROJLINE"></databind>
</column>
<column
AffectsFormMode="1"
backcolor="-1"
description=""
disp_desc="1"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="Maschine"
type="113"
uid="Col6"
val_off=""
val_on=""
visible="1"
width="150">
<ValidValues>
<action
type="add"></action>
</ValidValues>
<databind
alias="U_MACHINID"
databound="1"
table="@PROJLINE"></databind>
</column>
<column
AffectsFormMode="1"
backcolor="-1"
description=""
disp_desc="0"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="Std. Satz Maschine"
type="16"
uid="Col5"
val_off="N"
val_on="Y"
visible="1"
width="80">
<databind
alias="U_MACHHOUR"
databound="1"
table="@PROJLINE"></databind>
</column>
<column
AffectsFormMode="1"
backcolor="-1"
description=""
disp_desc="0"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="Std. Satz MA"
type="16"
uid="Col2"
val_off="N"
val_on="U_EMPLCOST"
visible="1"
width="80">
<databind
alias="U_EMPLCOST"
databound="1"
table="@PROJLINE"></databind>
</column>
<column
AffectsFormMode="1"
backcolor="-1"
description=""
disp_desc="0"
editable="1"
font_size="12"
forecolor="-1"
right_just="0"
supp_zeros="0"
text_style="-1"
title="Bemerkungen"
type="16"
uid="Col1"
val_off="N"
val_on="U_REMARKS"
visible="1"
width="180">
<databind
alias="U_REMARKS"
databound="1"
table="@PROJLINE"></databind>
</column>
</action>
</columns>
</Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="19"
left="10"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="349"
type="4"
uid="1"
visible="1"
width="65">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="OK"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="1"
from_pane="0"
height="19"
left="77"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="349"
type="4"
uid="2"
visible="1"
width="65">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Abbrechen"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
<Item
description=""
disp_desc="0"
enabled="0"
from_pane="0"
height="19"
left="144"
linkto=""
right_just="0"
tab_order="0"
to_pane="0"
top="349"
type="4"
uid="btnDELETE"
visible="1"
width="65">
<Specific
AffectsFormMode="1"
backcolor="-1"
caption="Löschen"
font_size="-1"
forecolor="-1"
supp_zeros="0"
text_style="-1"></Specific>
</Item>
</action>
</items>
</form>
</action>
</forms>
</Application>
Any ideas how to solve this problem?
Regards
Christian Niehaves
Hi,
How was this solved?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Christian,
What PL B1 do you use? Since there since some problem with PL10 (already lots of discussion). If you are using PL10, please upgrade to PL11.
Otherwise, my suggestion is to add a blank row first, to make sure the basic function is all right. And then try to double check your DBDatasource value and databinding.
If problem still exist, please let us know.
Hope this helps,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.