#DEFINE CRLF Chr(13) + Chr(10)
SET PROCEDURE TO D:\ROA_RB\ROAPRINT\COMUN\UTILE\WEB\htmlmerge.prg ADDITIVE
SET PROCEDURE TO D:\ROA_RB\ROAPRINT\COMUN\PROGRAME\regex.prg ADDITIVE
lcTemplate = "c:\roaprint_initializari\totals_win.tmpl"
Create cursor bon (TIP N(2),DENUMIRE C(50),CANTITATE N(10,4),PRET N(10,4),UM C(10),COTATVA N(5,2),DEPARTAMENT N(2))
Insert into bon(tip, denumire, cantitate, pret, um, cotatva, departament) values (1,'ARTICOL 1', 1, 10.00, 'BUC', 1.19, 1)
loHTML = CREATEOBJ('HTMLMerge')
lcText = FILETOSTR(lcTemplate)
lcText = loHTML.ScanMerge(lcText)
lcText = loHTML.cHtml
MessageBox(lcText)
lcText = strtranregexp(lcText,"(^<.*>\r*\n*)", "") && <...> + chr(13) + chr(10)
Debug
Suspend 
lnPos = At(CRLF+CRLF,lcText)
Do while lnPos > 0
	lcText = Strtran(lcText, CRLF+CRLF, CRLF)
	lnPos = At(CRLF+CRLF,lcText)	
EndDo 
MessageBox(lcText)
