Home > Back-end >  Delphi xe7, fastreport 6, frxuserdataset fileds inside why there will be a space?
Delphi xe7, fastreport 6, frxuserdataset fileds inside why there will be a space?

Time:11-05

Consult everybody, why I use frxuserdataset controls the content of the promised a stringgrid, at design time, or run time, add field values in frxuserdataset fields, after the judgment in ongetvalue events, varname behind it there is a # 9, lead to string ranging,
For example the following code:

Procedure TfmPurchaseOrder. FrxGridGetValue (const VarName: string; Var Value: the Variant);
The begin
If comparetext (varname, 'ITEM NO)=0 then
Value:=sglist. Cells [2, frxgrid RecNo];

If varname='ITEM NO then
Value:=sglist. Cells [2, frxgrid RecNo]
Else if varname='CODE' then
Value:=sglist. Cells [12, frxgrid RecNo];
end;



NO matter use comparetext or direct comparison, step through it shows varname 'ITEM NO # 9

Consult everybody how to deal with?
Because I found in the same form of the combobox items in the edit box is also the value of each row behind have a this', see figure


CodePudding user response:

First used, combobox items didn't met with blank, is it your editor Settings?
Can't find the reason with the first, with trim (string), or the copy (string, 1, length (string) - 1) removed at the end of the space,

CodePudding user response:

I don't know why, I built a project again, with this control, as if no problem,