Aligning Report Text - Smalltalk

This is a discussion on Aligning Report Text - Smalltalk ; Hi, I have integrated Ian's Report Package into my application and it works very well. Great job Ian! Users will not have the ability or time to make use of the Report Editor given the nature of the data. Just ...

+ Reply to Thread
Results 1 to 3 of 3

Aligning Report Text

  1. Default Aligning Report Text

    Hi,

    I have integrated Ian's Report Package into my application and it
    works very well. Great job Ian!

    Users will not have the ability or time to make use of the Report
    Editor given the nature of the data. Just simple print or print
    preview. I accomplished this by making a few minor changes to render
    the report "silently" without opening the Report Editor.

    My question is how to align data for a given report. First I populate
    the report with column names followed by the data values which come
    from a model object. Unfortunately, I have not been able to get the
    model data to align with the field names.

    Any suggestions?

    Thanks,

    Pax


  2. Default Re: Aligning Report Text

    Pax,

    >I have integrated Ian's Report Package into my application and it
    >works very well. Great job Ian!


    Blimey! I didn't think anyone would use that package in anger. I only
    really added it so that I could produce some formatted text without
    getting too involved in the RichEdit control. IIRC, I never got round
    to finishing it.

    I'm glad you find it useful though.

    >My question is how to align data for a given report. First I populate
    >the report with column names followed by the data values which come
    >from a model object. Unfortunately, I have not been able to get the
    >model data to align with the field names.
    >
    >Any suggestions?


    Can't the tabs do that. You can set parameters for the tab stops
    programmatically - tab position, tab alignment and character used to
    fill in the tab spacing.

    The alignment can either be left, centre, right or decimal (decimal
    points are aligned).

    So, to create two columns with right aligned text you would have to
    define a tab scheme (tab position, alignment, filler)

    tabs
    at: #myFormat
    put:
    ((OrderedCollection new)
    add: #(2 #right #space);
    add: #(4 #right #space);
    add: #(6 #right #space);
    yourself).

    and then add your data to the report document

    myReport
    tabStops: #myFormat
    while:
    [myReport appendTextAndCr: ' header1 header2'.
    myReport appendTextAndCr: ' aaa 11'.
    myReport appendTextAndCr: ' bbbb 2222'.
    myReport appendTextAndCr: ' cccccc 33333'].

    where the "spaces" in the above strings are tab characters.

    Let me know if that won't do what you want and I'll see if I can work
    out something else.
    --
    Ian

    The From address is valid

  3. Default Re: Aligning Report Text

    Hi Ian,

    I did notice the tab configuration but didn't give it a second look. I
    think your suggestion should give me what I want and make things align
    nicely. However, I will have to create a tab format for each report
    class which should be straight forward.

    Otherwise, I like what you have done with the package as it gives the
    developer a means to view/edit/print and print preview a document from
    the object model.

    Again, great job!

    Thanks,

    Pax


+ Reply to Thread

Similar Threads

  1. Aligning/flowing text around an object
    By Application Development in forum Adobe illustrator
    Replies: 2
    Last Post: 07-09-2007, 11:43 AM
  2. aligning bottom text in book
    By Application Development in forum Adobe Indesign
    Replies: 12
    Last Post: 07-02-2007, 04:40 PM
  3. Aligning smaller object to center of larger, aligning points
    By Application Development in forum Adobe illustrator
    Replies: 4
    Last Post: 12-20-2006, 10:40 PM
  4. Aligning or Justifying text/labels
    By Application Development in forum basic.visual
    Replies: 1
    Last Post: 11-28-2005, 08:46 AM
  5. Justification in Report Text VAST 5
    By Application Development in forum Smalltalk
    Replies: 0
    Last Post: 09-22-2005, 09:19 AM