Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual

Page 284

Advertising
background image

FactoryTalk EnergyMetrix Software

284

'populate utility name and total accruals lines

With objRtb1

.Text = "\fs20\caps\b " & strUtility & "\caps0\par "

.Text &= "Total Accrual: " & Format(dblTotalAccrual,
"c") & "\b0\par "

End With

'populate horiz bar charts and legend

'uses RTF color table and font table, don't change

With objRtb2

.Text =
"{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green2
55\blue255;"

.Text &=
"\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue
0;"

.Text &=
"\red255\green255\blue0;\red255\green255\blue255;\red0\green0\bl
ue128;"

.Text &=
"\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue
128;"

.Text &=
"\red128\green0\blue0;\red128\green128\blue0;\red128\green128\bl
ue128;"

.Text &= "\red192\green192\blue192;}"

.Text &= "{\fonttbl{\f0\fnil;}{\f1 Ariel;}{\f2
Courier New;}}"

.Text &= "\f2\fs20\cf2\cb8\b " & StrDup(intDays1,
"Z")

.Text &= "\cf5\cb8 " & StrDup((intDays2 - intDays1),
"X")

.Text &= "\cf6\cb8 " & StrDup((intDaysAll -
intDays2), "N") & "\par\b0 "

.Text &= "\f2 " & Space(15) & "\f2\cf2\cb8\b Z
\f0\cf0\cb8 " & Format(dblCost1, "c") & "\b0\par "

.Text &= "\f2 " & Space(15) & "\f2\cf5\cb8\b X
\f0\cf0\cb8 " & Format(dblCost2, "c") & "\b0\par "

.Text &= "\f2 " & Space(15) & "\f2\cf6\cb8\b N
\f0\cf0\cb8 " & Format(dblCost3, "c") & "\b0\par "

End With

'Add rich text box objects to report

Report.Add(objRtb1, dblLeft, dblTop, dblWidth, 0.3)

Report.Add(objRtb2, dblLeft, dblTop + 0.3, dblWidth,
dblHeight)

End Sub

Advertising