Form in color

jlettjlett Member Posts: 9
edited 2004-06-10 in Navision Attain
Somebody could explain how i can have a report using color.
for ex. i need to get negatives numbers in red.

Comments

  • John_TegelaarJohn_Tegelaar Member Posts: 159
    There's a simple answer to this question: You can't do that with Navision reports. Colors in the printeroutput are not supported.

    Posibble work-arounds:

    1) Save (export) the existing report in HTML, open it in Excel and do the formatting there.

    2) Use an alternative reporting package, like Crystal Reports (but there have been a few rather negative postings on this)

    3) Setup a template in Excel, which gets filled with data through automation, controlled from within Navision. This could take you a long way to what you want to accomplish. See the various postings in the forums (fora?) - recently there was an extensive one from Marcus Fabian, providing lots of detail for getting an understanding of the mechanism.

    John
  • akoako Member Posts: 12
    This function may be can help you..

    If you want to get value for your negatives, use the UPDATEFOR COLOR()

    Example :

    IF Stock < 0 CurrForm.Stock.UPDATEFORCOLOR(255);

    Bambang W.
    ako@ebsi.co.id
  • mfabianmfabian Member Posts: 187
    The original question was about reports not forms. Colors in forms are not a problem.

    Marcus


    Marcus Fabian
    m.fabian@thenet.ch
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
  • SandraSandra Member Posts: 52
    There is one more way, not very elegant, but it works. You can create new fields in for example a parameter table, or in the Company data table of the as blob fields. Create the colour you want to have in your report as a simple bmp file. Import it and then create a Picture box in your report with source expression equal to the table field you have created. Do not forget to do a calcfield on the field. Then be sure that all other labels or controls lay above your picture box (this is tricky!). I know it is not the most elegant way of doing things, but it works and has always been a quick way of dealing with the problem. There is still hope that one day Navision will actually activate the feature of "colouring" the report, but until then ...



  • philippegirodphilippegirod Member Posts: 191
    If you want to change for some lines, the format use the next properties in each form control (each column for instance).

    In the OnFormat trigger of my control (which name is MyControl):
    IF ({condition, for instance : }Qty < 0) THEN
    CurrForm.MyControl.UPDATEFORECOLOR := 255; //255 = Red

    You can use several colors like those :
    255 = Red
    65280 = Green
    16711680 = Blue
    65535 = Yellow

    You can also use other format procedures like :
    UPDATEINDENT
    UPDATESELECTED
    UPDATEEDITABLE
    UPDATEFORECOLOR
    UPDATEFONTBOLD
    My candle burns by both ends, it will not last the night,
    But oh my foes and oh my friends, it gives a lovely light
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    [Topic moved from "Navision Tips & Tricks" by Administrator]
Sign In or Register to comment.