1. или так
Add(MainForm,3591892,140,112)
{
Width=755
Height=572
}
Add(ChildGroupBox,16596836,189,112)
{
}
BEGIN_SDK
Add(EditMulti,12324586,21,21)
{
WorkCount=2
Width=650
Height=298
VOffset=49
link(doWork1,2822035:doBringToFront,[])
link(doWork2,2822035:doSendToBack,[])
}
Add(GroupBox,2822035,35,70)
{
Width=739
Height=534
Align=5
Caption="На печать."
Point(doBringToFront)
Point(doSendToBack)
}
Add(Button,7347469,35,28)
{
Left=5
Top=20
Width=90
Caption="Создать HTML"
link(onClick,8056583:doEvent1,[])
}
Add(DoData,682558,420,42)
{
Data=String(<html><head></head><body><h3 align="center" style="color:Tomato">Домашняя бухгалтерия. РАСХОДЫ.</h3> <table lign="center" border="1" width="90%"> <tr><td><b>Наименование расходов </b></td><td> <b>Сумма </b></td></tr> )
link(onEventData,4584918:doWork1,[(508,48)])
}
Add(DoData,5200042,420,231)
{
Data=String(</table></body></html>)
link(onEventData,14204559:doWork3,[(508,237)])
}
Add(Hub,8056583,84,28)
{
OutCount=4
link(onEvent1,7247405:doClear,[(515,34)(515,181)])
link(onEvent2,13503857:doClear,[(136,41)(136,181)])
link(onEvent3,682558:doData,[])
link(onEvent4,3517164:doEnum,[(172,55)(172,146)])
}
Add(StrList,7247405,532,168)
{
}
Add(HubEx,14204559,504,168)
{
link(onEvent,7247405:doAdd,[])
}
Add(DoData,3641262,532,238)
{
link(onEventData,14981452:doFromText,[])
link(Data,7247405:Text,[])
}
Add(WebBrowser,14981452,630,210)
{
Left=120
Top=15
Width=605
Height=510
Point(doFromText)
Point(doPreview)
}
Add(Button,5676408,574,245)
{
Left=5
Top=50
Width=90
Caption="Печать"
link(onClick,14981452:doPreview,[])
}
Add(StrList,14624440,189,84)
{
Strings=#8:Вася;230|8:Коля;150|9:Петя;4270|8:Витя;100|
}
Add(ArrayEnum,3517164,203,140)
{
@Hint=#20:Подключаешь к своей |21:таблице к точке Array|
link(onItem,10559579:doSplit,[])
link(onEndEnum,218615:doEvent1,[(247,153)(247,230)])
link(Array,14624440:Array,[])
AddHint(60,-54,131,26,@Hint)
}
Add(FormatStr,3358128,420,140)
{
Mask="<tr><td> %1 </td><td align="Right"> %2</td></tr>"
link(onFString,4584918:doWork2,[])
link(Str1,10559579:Left,[(426,128)(318,128)(318,178)(279,178)])
}
Add(StrPart,10559579,273,140)
{
Char=";"
Point(Left)
Point(Right)
link(onSplit,13091119:doEvent1,[])
}
Add(HubEx,4584918,504,140)
{
Angle=1
link(onEvent,14204559:doWork1,[])
}
Add(Hub,13091119,329,140)
{
link(onEvent1,3358128:doString,[])
link(onEvent2,13503857:doOperation,[(350,153)(350,174)])
}
Add(FormatStr,157244,357,224)
{
DataCount=1
Mask="<tr style="color:Red"><td><b> Итого: </b></td><td align="Right"><b> %1</b></td></tr>"
link(onFString,14204559:doWork2,[(409,230)(409,174)])
link(Str1,3473619:Var2,[])
}
Add(Hub,218615,329,224)
{
OutCount=3
link(onEvent1,157244:doString,[])
link(onEvent2,5200042:doData,[])
link(onEvent3,3641262:doData,[])
}
Add(Math,13503857,357,168)
{
Point(doClear)
link(Op1,3473619:Var3,[(363,156)(396,156)(396,208)])
}
Add(GetDataEx,3473619,357,203)
{
link(Data,13503857:Result,[])
}
END_SDK
2. или так
Add(MainForm,3591892,119,112)
{
Width=755
Height=572
}
Add(ChildGroupBox,16596836,168,112)
{
link(Data1,14624440:Array,[])
}
BEGIN_SDK
Add(EditMulti,12324586,21,21)
{
WorkCount=2
DataCount=1
Width=545
Height=263
VOffset=49
HOffset=105
link(doWork1,2822035:doBringToFront,[])
link(doWork2,2822035:doSendToBack,[])
}
Add(GroupBox,2822035,35,70)
{
Width=739
Height=534
Align=5
Caption="На печать."
Point(doBringToFront)
Point(doSendToBack)
}
Add(Button,7347469,35,28)
{
Left=5
Top=20
Width=90
Caption="Создать HTML"
link(onClick,8056583:doEvent1,[])
}
Add(DoData,682558,343,42)
{
Data=String(<html><head></head><body><h3 align="center" style="color:Tomato">Домашняя бухгалтерия. РАСХОДЫ.</h3> <table lign="center" border="1" width="90%"> <tr><td><b>Наименование расходов </b></td><td> <b>Сумма </b></td></tr> )
link(onEventData,4584918:doWork1,[(389,48)])
}
Add(Hub,8056583,84,28)
{
OutCount=4
link(onEvent1,7247405:doClear,[(408,34)(408,153)])
link(onEvent2,13503857:doClear,[(110,41)(110,181)])
link(onEvent3,682558:doData,[])
link(onEvent4,3517164:doEnum,[(121,55)(121,146)])
}
Add(StrList,7247405,413,140)
{
}
Add(DoData,3641262,413,231)
{
link(onEventData,14981452:doFromText,[])
link(Data,7247405:Text,[])
}
Add(WebBrowser,14981452,511,203)
{
Left=120
Top=15
Width=605
Height=510
Point(doFromText)
Point(doPreview)
}
Add(Button,5676408,455,238)
{
Left=5
Top=50
Width=90
Caption="Печать"
link(onClick,14981452:doPreview,[])
}
Add(ArrayEnum,3517164,126,140)
{
@Hint=#20:Подключаешь к своей |21:таблице к точке Array|
link(onItem,10559579:doSplit,[])
link(onEndEnum,218615:doEvent1,[(170,153)(170,230)])
link(Array,12324586:Data1,[])
AddHint(14,-51,131,26,@Hint)
}
Add(FormatStr,3358128,343,140)
{
Mask="<tr><td> %1 </td><td align="Right"> %2</td></tr>"
link(onFString,4584918:doWork2,[])
link(Str1,10559579:Left,[(349,128)(241,128)(241,178)(202,178)])
}
Add(StrPart,10559579,196,140)
{
Char=";"
Point(Left)
Point(Right)
link(onSplit,13091119:doEvent1,[])
}
Add(HubEx,4584918,385,140)
{
link(onEvent,7247405:doAdd,[])
}
Add(Hub,13091119,252,140)
{
link(onEvent1,3358128:doString,[])
link(onEvent2,13503857:doOperation,[(273,153)(273,174)])
}
Add(FormatStr,157244,280,224)
{
DataCount=1
Mask="<tr style="color:Red"><td><b> Итого: </b></td><td align="Right"><b> %1</b></td></tr> </table></body></html>"
link(onFString,4584918:doWork3,[(389,230)])
link(Str1,3473619:Var2,[])
}
Add(Hub,218615,252,224)
{
link(onEvent1,157244:doString,[])
link(onEvent2,3641262:doData,[])
}
Add(Math,13503857,280,168)
{
Point(doClear)
link(Op1,3473619:Var3,[(286,156)(319,156)(319,208)])
}
Add(GetDataEx,3473619,280,203)
{
link(Data,13503857:Result,[])
}
END_SDK
Add(StrList,14624440,154,49)
{
Strings=#8:Вася;230|8:Коля;150|9:Петя;4270|8:Витя;100|
}
можно так
А можно HTML создавать и "напрямую" запросом к таблице в БД