Text Markup
0
0
Edited Aug 31, 2015
Advanced text markup is specified as XML. If you are familiar with HTML, you might be familiar with the structure since HTML is also XML.
We hope to enhance Report Builder's simplified text editor so that you don't need to use markup unless you want to insert custom computations. And even then, we hope to simplify it. But for now, here you go:
Start your text markup with a Paragraph element.
<Paragraph>
</Paragraph>
Add horizontal alignment using the HAlign attribute. Possible values are: {Left, Center, Right}.
<Paragraph HAlign="Center">
</Paragraph>
Add content using the Run element.
<Paragraph HAlign="Center">
<Run>Hi, this is my first text run.</Run>
<Run>And this is text run number two.</Run>
</Paragraph>
Linebreaks are specified using the Br element.
<Paragraph HAlign="Center">
<Run>Hi, this is my first text run.</Run><Br/>
<Run>And this is text run number two.</Run>
</Paragraph>
You may create multiple paragraphs by enclosing your paragraphs in a Document element.
<Document>
<Paragraph HAlign="Left">
<Run>Hi, this is a run in a left-aligned paragraph.</Run><Br/>
</Paragraph>
<Paragraph HAlign="Right">
<Run>And this is a run in a right-aligned paragraph.</Run><Br/>
</Paragraph>
</Document>
Format Runs using FontFamily, FontSize, FontWeight {Normal, Bold}, FontStyle {Normal, Italic}, and Color (in hex).
<Paragraph HAlign="Center">
<Run FontFamily="Arial" FontSize="20" FontWeight="Bold">Hi, this is my first text run.</Run><Br/>
<Run FontStyle="Italic" Color="#007acc">And this is text run number two.</Run>
</Paragraph>
Add an underline using Underline.
The preview in RB may not show the underline. But export to PowerPoint and you'll see it. Possible Underline values are: {None, Words, Single, Double, Heavy, Dotted, HeavyDotted, Dash, DashHeavy, DashLong, DashLongHeavy, DotDash, DotDashHeavy, DotDotDash, DotDotDashHeavy, Wavy, WavyHeavy, WavyDouble}
<Paragraph>
<Run>Hi, this is some </Run>
<Run Underline="Single">underlined text</Run>
<Run>.</Run>
</Paragraph>
You may add formatting attributes to the Paragraph (for each Run to inherit).
<Paragraph HAlign="Center" FontFamily="Helvetica Nueue" FontSize="20" Color="#000000">
<Run>Hi, this is my first text run.</Run><Br/>
<Run Color="#ff0000">And this is text run number two.</Run>
</Paragraph>
An example for slide basenote footers:
Base: US respondents (###) ● Q1: How many monkeys does it take to... ? ● Q2: How much wood would a woodchuck chuck in the next 3 months?
... is coded as follows:
<Paragraph HAlign="Left" FontWeight="Normal" FontStyle="Normal" FontFamily="Arial" FontSize="8">
<Run>Base: US respondents (###)</Run>
<Run Color="#d1282e"> ● </Run>
<Run>Q1: How many monkeys does it take to... ?</Run>
<Run Color="#d1282e"> ● </Run>
<Run>Q2: How much wood would a woodchuck chuck in the next 3 months?</Run>
</Paragraph>
You may insert a custom computation into a Run using the Computation element:
<Paragraph>
<Run>
<Computation Filter="country==1" Syntax="validcount(Q1)" Weight="{wp}" ValueFormat="#,##0"/>
</Run>
</Paragraph>
In the above example, setting Weight equal to "{wp}" tells Report Builder to use the project weight. You may also set Weight equal to a specific variable, i.e. Weight="wts".
Filter, Weight, and ValueFormat are optional attributes for the Computation element. The Syntax attribute is required.
You may pull a variable label into a Run using the following:
<Paragraph>
<Run>
<VarLabel Var="country" />
</Run>
</Paragraph>
You may pull a value label into a Run using the following:
<Paragraph>
<Run>
<ValueLabel Var="country" Value="1" />
</Run>
</Paragraph>
You may pull a loop label into a Run using the following:
<Paragraph>
<Run>
<Computation Syntax="@countryloop.label" />
</Run>
</Paragraph>