zhorik5 писал(а):
И попутный вопрос, а как сделать так чтоб в конце распечатки считалась общая сумма отдельной строкой?Как-то так
Схема
Add(MainForm,2953706,21,105)
{
Width=755
Height=572
}
Add(ChildGroupBox,16596836,70,105)
{
}
BEGIN_SDK
Add(EditMulti,12324586,21,21)
{
WorkCount=2
Width=755
Height=424
link(doWork1,2822035:doBringToFront,[(28,27)(28,34)])
link(doWork2,2822035:doSendToBack,[(28,34)(28,41)])
}
Add(GroupBox,2822035,35,28)
{
Width=739
Height=534
Align=5
Caption="На печать."
Point(doBringToFront)
Point(doSendToBack)
}
Add(Button,7347469,63,77)
{
Left=5
Top=20
Width=90
Caption="Создать HTML"
link(onClick,8056583:doEvent1,[])
}
Add(DoData,682558,217,91)
{
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,[(536,97)])
}
Add(DoData,5200042,322,259)
{
Data=String(</table></body></html>)
link(onEventData,795683:doWork2,[])
}
Add(Hub,8056583,112,77)
{
OutCount=7
link(onEvent1,7247405:doClear,[(543,83)(543,244)])
link(onEvent2,9199990:doClear,[(158,90)(158,335)])
link(onEvent3,682558:doData,[])
link(onEvent4,3517164:doEnum,[(200,104)(200,195)])
link(onEvent5,14204559:doWork2,[(155,111)(155,244)(347,244)(347,237)])
link(onEvent6,6248942:doEvent1,[(144,118)(144,300)])
}
Add(StrList,7247405,595,231)
{
}
Add(HubEx,14204559,532,231)
{
link(onEvent,7247405:doAdd,[])
}
Add(DoData,3641262,595,294)
{
link(onEventData,13482478:doMask,[])
link(Data,7247405:Text,[])
}
Add(WebBrowser,14981452,721,259)
{
Left=120
Top=15
Width=605
Height=510
Point(doFromText)
Point(doPreview)
}
Add(Button,5676408,595,336)
{
Left=5
Top=50
Width=90
Caption="Печать"
link(onClick,14981452:doPreview,[(714,342)(714,300)])
}
Add(StrList,14624440,217,133)
{
Strings=#8:Вася;230|8:Коля;150|8:Петя;470|8:Витя;100|
}
Add(ArrayEnum,3517164,231,189)
{
@Hint=#20:Подключаешь к своей |21:таблице к точке Array|
link(onItem,10559579:doSplit,[])
link(onEndEnum,218615:doEvent1,[(275,202)(275,258)])
link(Array,14624440:Array,[])
AddHint(60,-54,131,26,@Hint)
}
Add(FormatStr,3358128,434,189)
{
Mask="<tr><td> %1 </td><td> %2</td></tr>"
link(onFString,4584918:doWork2,[])
link(Str1,10559579:Left,[(440,177)(335,177)(335,233)(307,233)])
link(Str2,10559579:Right,[(447,177)(342,177)(342,233)(314,233)])
}
Add(StrPart,10559579,301,189)
{
Char=";"
Point(Left)
Point(Right)
link(onSplit,13091119:doEvent1,[])
}
Add(HubEx,4584918,532,189)
{
Angle=1
link(onEvent,14204559:doWork1,[])
}
Add(FormatStr,13482478,658,287)
{
DataCount=5
Mask=""
Point(doMask)
link(onFString,14981452:doFromText,[])
}
Add(Hub,6248942,560,294)
{
link(onEvent1,3641262:doData,[])
link(onEvent2,13482478:doString,[(581,307)(581,293)])
}
Add(Hub,13091119,357,189)
{
link(onEvent1,3358128:doString,[])
link(onEvent2,9199990:doAdd,[(382,202)(382,328)])
}
Add(StrList,9199990,406,322)
{
}
Add(ArraySum,4914408,420,385)
{
ArrayType=1
link(onSum,157244:doString,[])
link(Array,9199990:Array,[])
}
Add(FormatStr,157244,469,385)
{
DataCount=1
Mask="<tr><td><b> Итого: </b></td><td><b> %1</b></td></tr>"
link(onFString,795683:doWork3,[(536,391)])
}
Add(HubEx,795683,532,259)
{
Angle=3
link(onEvent,14204559:doWork3,[])
}
Add(Hub,218615,287,252)
{
link(onEvent1,4914408:doSum,[(312,258)(312,391)])
link(onEvent2,5200042:doData,[])
}
END_SDK