Skip to Content
avatar image
Former Member

Code in Sample Report - What does it do?

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

PSAT.JPG (21.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 30, 2015 at 06:16 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you, Abhilash.

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

      Thanks for the reply.


      Take care,

      Erin