Form in color

jlett
Member Posts: 9
Somebody could explain how i can have a report using color.
for ex. i need to get negatives numbers in red.
for ex. i need to get negatives numbers in red.
0
Comments
-
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.
John0 -
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.id0 -
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 72With best regards from Switzerland
Marcus Fabian0 -
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 ...
0 -
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
UPDATEFONTBOLDMy candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light0 -
[Topic moved from "Navision Tips & Tricks" by Administrator]0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions