Exact position in sections (reports)

HenningThHenningTh Member Posts: 59
Hi all

Anyone having a good idea how to place a text in an exact position when printing.

It's a little "curly" because I have a large(long) textbox in which I want to add some information placed on an exact position on the paper.

Something like this: "SourceExpr": Info1 + Info2 + MyVariable

Info1 & and Info2 can vary in length but MyVariable must be placed at exactly pos. 65 on the paper. Giving that not alle letters are of same width it is somewhat a puzzle.

Thanks in advance.

Comments

  • PeterDPeterD Member Posts: 66
    And a second textbox for YourVariable isn't an option?
  • HenningThHenningTh Member Posts: 59
    Unfortunately it would be very difficult to use the alternative with 2 textboxes as the content may vary quite a lot depending of conditions the code is obtaining during run.
    It could be anything from 2 to 10 variabels that should be combined in one textbox.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    try something like
    Combine Info1 + Info2 and calculate the strlen
    based on the length add '' to string using PADSTR and add your variable at 65th position.
  • abhinav0408abhinav0408 Member Posts: 35
    Something like this: "SourceExpr": Info1 + Info2 + MyVariable
    Why dont you add calculated space in betwwen your info2 and your variable....

    like SourceExpr": Info1 + Info2 +' '+MyVariable
  • HenningThHenningTh Member Posts: 59
    Thanks for suggestion Mohana, but it doesn't work.

    If calculate strlen of info1 and info2 - say giving the result 40.

    If adding 25 to this you should be on pos. 65 - correct, but on the line only - not guaranteed pos. 65 on paper as the line could have more 1's (which is a narrow char.) than 8's
  • PeterDPeterD Member Posts: 66
    What about using a non proportional font?
Sign In or Register to comment.