1.09 Special DisplayFormat

Q1 : How if data is PI-12345 but I wanted to be printed as 12345?

A : Just Enter as Follow code:-

Procedure DBTxtDocNoOnGetText(var Text: String);

begin

Delete(Text, 1, 3);

Text := Text;

end;

Q2 : How if data is PI-12345 but I wanted to be printed as PI12345?

A : Just Enter as Follow code:-

Procedure DBTxtDocNoOnGetText(var Text: String);

begin

Delete(Text, 3, 1);

Text := Text;

end;

Q3 : How if data is 17-08-2005 but I wanted to be printed as 17 hb?

A : Just Enter as Follow code in the DisplayFormat:-

dd 'hb'

Q4 : How if data is 1234-001 but I wanted to be printed as 1234 & the value is not fixed (i.e may 12345-001, 1234-001)?

A : Just Enter as Follow code:-

Procedure DBTxtDocNoOnGetText(var Text: String);

begin

Text := SubStrOfDelimitedStr(Text, 0, 1, '-');

end;

Q5 : How if data is 1234-001 but I wanted to be printed as 001 & the value is not fixed (i.e may 12345-001, 1234-32)?

A : Just Enter as Follow code:-

Procedure DBTxtDocNoOnGetText(var Text: String);

begin

Text := SubStrOfDelimitedStr(Text, 1, 1, '-');

end;

Q6 : How to reverse this #,0.00;-#,0.00 to this -#,0.00;#,0.00?

A : Just Enter as Follow code:-

procedure DetailBeforePrint;

var d, s : string;

begin

s := Option.GetFieldValue('AccountingValueDisplayFormat');

d := ValueOfSemiColonStr(s, 1)+';'+ ValueOfSemiColonStr(s, 0);

DBTxtC4.DisplayFormat := d;

end;