0 Replies Latest reply on Sep 8, 2013 10:32 PM by blueroller

    problem getting a report object report to right justify

    blueroller

      I am trying to get a report object to right justify columns.  I ran a test in console to see the output.  the code i used is:

      var rep = new Report();

      rep.size = 1.5;

      var lnf = "%,025.2f";

      for (j = 0; j < 25; j++){

           rep.writeText(util.printf(lnf,j*5));

      }

      rep.open("test report");

      This right justifies just fine so long as the number j*5 is same number of digets.  When the length of the number to print get longer, the right justification is off by just a little.  I know this happens becasue the font being used by the report object is a proportional font.  The api says that the only two options for report.style are "DefaultNoteText" and "NoteTitle".  How do I change the "DefaultNoteText" to use a fixed width font?  Or better yet can you give me some suggestions on how to right justify a proportional font?