Vertical text on report

CuypzCuypz Member Posts: 56
Hello guys,


I am required to print a vertical line of text on a report. Any ideas how I should do it?

In an effort to be one step ahead of you guys: I HAVE searched the forum, I HAVE tried to solution provided (NDI (Navision:Dynamic:Imaging) v1.03), but it doesn't work, as I get the same error as noted in the related topic (OLE Automation error) and am unable to fix that problem :)

Since I am not allowed to bring problems like this under everyone's attention with a "me too" reaction, I decided to dedicate a new post to this problem. :wink:

Comments

  • bostjanlbostjanl Member Posts: 107
    Cuypz wrote:
    Hello guys,


    I am required to print a vertical line of text on a report. Any ideas how I should do it?

    In an effort to be one step ahead of you guys: I HAVE searched the forum, I HAVE tried to solution provided (NDI (Navision:Dynamic:Imaging) v1.03), but it doesn't work, as I get the same error as noted in the related topic (OLE Automation error) and am unable to fix that problem :)

    Since I am not allowed to bring problems like this under everyone's attention with a "me too" reaction, I decided to dedicate a new post to this problem. :wink:

    If the text is static, create a bitmap with that text and put in in the report.

    bostjan
  • CuypzCuypz Member Posts: 56
    bostjanl wrote:
    Cuypz wrote:
    Hello guys,


    I am required to print a vertical line of text on a report. Any ideas how I should do it?

    In an effort to be one step ahead of you guys: I HAVE searched the forum, I HAVE tried to solution provided (NDI (Navision:Dynamic:Imaging) v1.03), but it doesn't work, as I get the same error as noted in the related topic (OLE Automation error) and am unable to fix that problem :)

    Since I am not allowed to bring problems like this under everyone's attention with a "me too" reaction, I decided to dedicate a new post to this problem. :wink:

    If the text is static, create a bitmap with that text and put in in the report.

    bostjan

    it isn't...

    i'm currently using the TBarcode extension and I need to print the barcode number vertically. This is possible with the TBarcode ocx, but I am unable to set the FontSize variable in my code. When I print the current font size of the BC variable, it returns 0.

    BC.FontSize := 24;

    All other properties are set correctly (apart from FontName which remains blank too)


    So if anyone can tell me what I'm doing wrong or how I can make a dynamic vertical text, i'd be glad to hear it...
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    If the max length of your string is say 30, write a function that pads it up to 30 chars with spaces to the right. (Quick Reference from the Downloads will help).

    Then, put 30 tiny, one-char wide textboxes under each other, each having a SourcExpression of FORMAT(YourString[0]), FORMAT(YourString[1]), FORMAT(YourString[2]) (or maybe it starts with 1, not 0, I'm not sure)

    The above padding is necessary, otherwise, it will bomb out with an error.
  • MbadMbad Member Posts: 344
    Can populate an array pretty easily. Anyone remember what the max dims for array is?
  • CuypzCuypz Member Posts: 56
    edited 2007-03-29
    this solution will provide me the following


    T
    E
    X
    T.


    I want TEXT, but rotated 90° CCW.


    (off-topic)Coming back to your solution, wouldn't it be just easier to make a small, but tall textbox and insert newline characters every other character?
  • MbadMbad Member Posts: 344
    If you rorate that 90 degrees wouldnt that make it horizontal...
  • CuypzCuypz Member Posts: 56
    if you rotate a horizontal line of text 90° CW OR CCW, i believe it's new orientation would be vertical as one would have to tilt his head to be able to read it...
  • MbadMbad Member Posts: 344
    Cuypz wrote:
    this solution will provide me the following


    T
    E
    X
    T.


    I want TEXT, but rotated 90° CCW.

    If you are looking at this, you are making no sense.
  • CuypzCuypz Member Posts: 56
    true, but if you're looking at all the reactions, I am making sense. It's not so hard if you make an effort.

    Then, put 30 tiny, one-char wide textboxes under each other, each having a SourcExpression of FORMAT(YourString[0]), FORMAT(YourString[1]), FORMAT(YourString[2]) (or maybe it starts with 1, not 0, I'm not sure)

    if my text variable is "TEXT", then Miklos Hollender's solution will give me

    T
    E
    X
    T

    . As I said from the beginning, this is NOT what I want. I want the horizontally written "TEXT" to be rotated 90° counter clockwise, thus vertically orientated.

    I don't know how I can point out how it would look if it were rotated 90° short from drawing it, but the T would look something like this:
    |
    |-----
    |
    

    and the E would look something like this:
    |   |
    |_|_|
    

    I don't think I'm able to point it out much clearer than this.


    Now, I'd appreciate it very much if someone came with a solution to achieve this, this whole discussion is really leading nowhere...
  • CuypzCuypz Member Posts: 56
    Never mind, the problem is solved. Thanks for your suggestions!
  • ssinglassingla Member Posts: 2,973
    would you like to share how u solved it.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • SavatageSavatage Member Posts: 7,142
  • gdkve9gdkve9 Member Posts: 161
    Cuypz wrote:
    Never mind, the problem is solved. Thanks for your suggestions!

    Could you Please share this here. The same requirement I am facing it here and I am struck ](*,)

    Here I would like to even add the reason for the requirement. Actually on the printer stationary instead of printing vertically here our client says horizontal printing is economical. In detail to say in a 100(length) X 150(breadth) mm lable size printed stationary, for printing 30 X 100 mm lable, vertically we can print only 3 copies but by tilting 90 degrees i.e., horizontally we can print 5 copies. As here they print around 100,000 copies a day this would save their stationary.

    If any one could suggest on this to reach the solution, would be very grateful..
    Dilip
    Falling down is not a defeat..defeat is when you refuse to get up.
  • garakgarak Member Posts: 3,263
    Do you make it right, it works too!
  • gdkve9gdkve9 Member Posts: 161
    garak wrote:

    I have seen your solution Mr.garak, but my requirement is a bit different one. A lable of 40 lines needed to be printed and the data comes on to the lable from almost 4 different tables. So data on the lable is dynamic. Such lable i needed to be printed horizantally in the report. For example suppose " 1234 " is the data on the lable, the report should print as shown.
    _ __
    _|
     _ _
    | | |
     _
    | |_|
    ____
    
    

    If you could suggest on this, i would be grateful...thanks again
    Dilip
    Falling down is not a defeat..defeat is when you refuse to get up.
  • garakgarak Member Posts: 3,263
    i do not understand the problem.
    if you will print this text 1234 in one body section and you have before print get the value to print (1 from table A, 2 from table B ...) then you can do:

    TextVert := Value1fromTableA + '\' + Value2fromTanbleB ......

    But if the lengt is dynamic, than you cannot use a normal report because the textbox is limited in his length. For this case you can communicate between NAV and your printer wiht using the printer own code specifics.

    The most priners has this interface. so, you can create a codeunit and send then the sequenses to the printer. That's also possible, not so easy but possible. Hope you unterstand.

    regards
    Do you make it right, it works too!
  • EugeneEugene Member Posts: 309
    Solutions:
    1)one could create a new font with all letters rotated and use that new font
    2)one could use an OCX that does the rotations and returns bitmaps to Navision (barcode ocx mentioned earlier seems to be doing exactly that)

    But both these solutions have a problem imposed by navision report designer - section height has FIXED height and cannot be changed dynamically depending on text length
  • gdkve9gdkve9 Member Posts: 161
    garak wrote:
    TextVert := Value1fromTableA + '\' + Value2fromTanbleB ......

    My friend, the solution of yours will print the text "1234" as
    1
    2
    3
    4
    
    

    but not the way i require..
    _ __ 
    _| 
     _ _ 
    | | | 
     _ 
    | |_| 
    ____ 
    
    

    And,
    Eugene wrote:
    Solutions:
    1)one could create a new font with all letters rotated and use that new font

    I am suprised if we could create our own fonts with the normal fonts rotated. Could you please gimme the way to do that man. Its would be nice to see the way from you here in this forum..

    Thanq all.
    Dilip
    Falling down is not a defeat..defeat is when you refuse to get up.
  • EugeneEugene Member Posts: 309
    simply google for "Font Editor" or "Font Creator" or something like that.
    Have in mind however that there are raster (defined as pixels) and vector (defined by commands how to draw a given letter) descriptions of fonts.
    You can find a lot of simple raster font editors but it is better to get your hands on a vector font editor so you can modify TrueType fonts


    Still you will be left with a problem how to dynamically define the section height in navision
  • EugeneEugene Member Posts: 309
    i really feel sorry for navision developers for navision report designer has not implemented such a simple WinAPI call as this one (to rotate fonts 90 degrees):
    lf.Escapement := 900;
    lf.Orientation := 900;
    CreateFontIndirect(lf);
    
  • idiotidiot Member Posts: 651
    Eugene wrote:
    i really feel sorry for navision developers for navision report designer has not implemented such a simple WinAPI call as this one (to rotate fonts 90 degrees):
    lf.Escapement := 900;
    lf.Orientation := 900;
    CreateFontIndirect(lf);
    
    You should feel sorry for navision report designer has not implemented support for font colors.
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • EugeneEugene Member Posts: 309
    i've downloaded trial version of FontCreator 5.6
    installed it
    opened Arial regular font and rotated it 90 degrees by going to menu Tools-Glyph Transformer then selected Outlines-Rotate ( dont forget to use the command on all glyphs not just on selected one) and rotated them -90 degrees

    saved the font in new ttf file and voila i have a new 90 degrees rotated font
  • jonsan21jonsan21 Member Posts: 118
    idiot wrote:
    Eugene wrote:
    i really feel sorry for navision developers for navision report designer has not implemented such a simple WinAPI call as this one (to rotate fonts 90 degrees):
    lf.Escapement := 900;
    lf.Orientation := 900;
    CreateFontIndirect(lf);
    
    You should feel sorry for navision report designer has not implemented support for font colors.

    Colors will be supported in the next version with the RoleTailored Client, along with other fun stuff that SQL Reporting Services offer.
    Rgds,

    Jon.
Sign In or Register to comment.