lsatenstein
16th April 2005, 16:03
I would like to put output to a color printer when certain conditions appear in the input. My use would be for a report about activities in the moth. For example, with calendaring where in the header, the days of the month show in landscape legal, I would want to show the Weekends in color, and the holidays in another. I would also like to show (with some background), when an entry has a condition that persists for several days. A example of a condition is a time and attendance report where I could show vacation absence in one color, union activity absence in a second, illness in a third, and so forth.
I would also like to know if there are examples available for doing the same on window displays. I have an application where information on the display has to change as some critical value is reached (Green, Yellow, Red).
Our version is Baan 4C4 Standard
Any examples would be appreciated.
en@frrom
18th April 2005, 10:01
Hello, if I understand correctly, you want to decide based upon some conditions whether your output will be sent to printerA (black&white), or to printerB (color). Do you have sources? If you have the source, then you just write something like this:
if <conditions for color printing are met> then
brp.open("reportname", "colourprintername", 0)
else
brp.open("reportname", "black&whiteprintername", 0)
endif
Good luck!
En
Hitesh Shah
18th April 2005, 16:16
We have been printing conditional bold marking using cf$ function padded around output variable . The same way u should be able to use bg$ and fg$ to print colors in ur output depending on different conditions.
lakoon
18th April 2005, 23:38
Hello
To be able to have colours on baan gui forms you have to work with graphical elements which you are placing on the form.
I'll provide an example (can't get it right now) .. got it.
/lakoon
|Defenition of graphical element
gc.id = create.object(
DsCgc, main_window_id,
DsNgcCapStyle, GCCAPBUTT,
DsNgcLineWidth, 0)
gwin = create.object(
DsCgwindow, main_window_id,
DsNx, 6,
DsNy, 134,
DsNwidth, 350,
DsNheight, 38,
DsNborderWidth, 0,
DsNeventMask, EVTALLEVENTMASK )
gwin.lable = create.sub.object(
gwin.oprn, DsCgpText,
DsNgc, gc.id,
DsNgcForeground, RGB.RED,
DsNgcFontSet, font(current_font),
DsNx, 5,
DsNy, 29,
DsNstring, "Your String: ->")
|Changing Colours:
if your.decision then
change.sub.object(gwin, gwin.lable,
DsNgcForeground, RGB.YELLOW,
DsNstring, "Your String: ->")
else
change.sub.object(gwin, gwin.lable,
DsNgcForeground, RGB.RED,
DsNstring, "Your String: ->")
endif
update.object(gwin.oprn)
lsatenstein
19th April 2005, 05:25
One of the requirements I have is a horizontal layout with squares, 31 of them, representing a month. I need to color the squares corresponding to weekends, and holidays.
I know I can set up variables that would turn colours on, and would also control intensity. That data is instream data to a colour printer.
I was hoping for some easy native Baan printer support for color, with the ability to change colors dynamically.
Les