Change Datasource Value 追蹤

0
Avatar
Legacy Poster

I am trying to change a datasource value programitically, I have used the 

 

btFormat.SubStrings.SetSubString("var001str20", "000007");  and

 

btFormat.SubStrings["var001str20"].Value = "xxxxxx";

 

neither of the two statements change the datasource the datasource is incremented by 1 and I need a way to start from a different number besides 0, If I need to reprint some labels.

 

 

 

 

3 意見

0
Avatar
Ian Cummings
版主
評論操作 永久連結

Have you double checked that you've named the data source in your BarTender document with the "var001str20" reference that you're using in the expression?  Note that this is a name for the data source directly, not the design object that contains the data source.

0
Avatar
Legacy Poster
評論操作 永久連結

Ian, thanks for your reply, I did check and it's the actual data source I am trying to change.    The datasource(var001str20) is serialized and increments by 1, it always starts at zero, I would like to change the start number periodically when the user needs to.

0
Avatar
Ian Cummings
版主
評論操作 永久連結

Setting the value of the named data source in the manner you've indicated, before you perform a print, is what you need to do in order to get the results you want.  If this isn't working for you then something else must be going wrong.

登入寫評論。