cancel
Showing results for 
Search instead for 
Did you mean: 

Code in Sample Report - What does it do?

Former Member
0 Kudos

Hi,

I'm viewing some of the sample reports available and in one, College Board PSAT 9.0.rpt, there are formula fields that display bullets to indicate numbers/percentages.

One of the formulas is this:

whileprintingrecords;

shared numbervar ratio;

local numbervar marmot;

marmot:= int(ratio*Maximum ({@Comp Group}, {SKILL.SKILL_NO}));

"{\rtf1\ansi\ansicpg1252{\fonttbl{\f0\fmodern\fprq1\fcharset0 Lucida Console;}}" +

"\viewkind4\uc1\pard\f0\fs6 " + replicatestring(" ",marmot) + "\fs27\cf1 " + chr(149) + "\par" +

"}";

I understand the shared and local variable parts - the taking of the number, but I don't understand what is in between the "".

It seems to serve as a way to place the bullets in the right place (compared to the header), but the only thing I've ever seen like it is web code.

Would anyone be able to explain in layman's terms what the code is doing and/or how it works - what type of code it is?

I've attached a screenshot of the part of the report I'm looking at.

Thank you,

Erin

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Erin,

The code between the double quotes is RTF text code.

I have never written RTF codes however, CR can 'interpret' such codes by setting the field's 'Text Interpretation' to 'RTF Text' (Format Field > Paragraph tab). 

-Abhilash

Former Member
0 Kudos

Thank you, Abhilash.

That's giving a name to my conundrum.  I will research more.

Thanks for the reply.


Take care,

Erin

Answers (0)