Using Report Fields/Functions as Input Parameters

You can use any field or function in your report as a parameter for a WebI:Chart Macro.

NUMERIC PARAMETERS

IMPORTANT NOTES:

EXAMPLE:

This example data set includes five series columns and a column of macro parameter values:

Series/Groups

Series1

Series2

Series3

Series4

Series5

Parameter Values

Group1

10

50

90

130

170

10

Group2

20

60

100

140

180

20

Group3

30

70

110

150

190

30

Group4

40

80

120

160

200

40

When a chart is created using this data set, the values from the "Macro Parameters" column are included in the chart. EXAMPLE:

When a macro references this column (e.g. @CY P5 255 0 0), the series is removed from the chart and the value is used as an input parameter to the macro:

@CY P5 255 0 0

In this example, "P5" identifies the location to draw a red (255 0 0) line on the Y-Axis and the Macro Parameter values are removed from the chart.

STRING PARAMETERS

Series/Legend labels that contain string~ prefixes can be extracted and used in WebI:Chart macros that use numeric parameters. Each legend label must be formatted with one or more prefix strings terminated with a tilde (~):

Prefix0~Prefix1~Prefix2 ... Prefixn~ SeriesLabel

IMPORTANT NOTES:

EXAMPLE:

This example data set includes five series columns and each series/legend label includes three numeric prefixes:

Groups

10~20~30~Series1

20~30~40~Series2

30~40~50~Series3

40~50~60~Series4

50~60~70~Series5

Group1

10

50

90

130

170

Group2

20

60

100

140

180

Group3

30

70

110

150

190

Group4

40

80

120

160

200

When a chart is created using this data set, the series label prefixes are initially included in the chart. EXAMPLE:

When a macro references a series label prefix (e.g. @CY S0 255 0 0), the series is removed from the chart and the value is used as an input parameter to the macro:

@CY S0 255 0 0
@CY S1 0 255 0
@CY S2 0 0 255

In this example:

"S0" identifies the location to draw a red (255 0 0) line on the Y-Axis.

"S1" identifies the location to draw a green (0 255 0) line on the Y-Axis.

"S2" identifies the location to draw a blue (0 0 255) line on the Y-Axis.

After the prefix is referenced in a macro, the string prefixes are stripped from the legend labels.

WebI:Chart is a product from
Three D Graphics
Los Angeles, CA 90064
threedgraphics.com