Yenry98
2nd May 2002, 13:20
Hi,
I using Baan IVc4.
I want to make print session which has a sequence number like special field "Number of Record", it works for plain report, but it's fail when I use like a grouping i.e:
Group I
1 item a
2 item b
3 item c
Group II
1 item d
2 item e
3 item f
Could you advise me how to make sequence number 1,2,3 on each group?
Second thing, I'm trying to use the "Double Wide" font on report layout but it didn't work. I am using HP laserjet printer and want to print a bigger font for the report header. Kindly advise.
Thanks in advance.
evesely
2nd May 2002, 15:46
Do you want to create the sequence number in the program script or in the report? I'll assume the report.
I would create a variable in the report script (as a long). Set it to 0 in the before.groupfield layout's before.layout subsection if lattr.break = true (so it doesn't imporperly reset at the start of a page), and increment it in the before.layout subsection of the detail layout.
Yenry98
3rd May 2002, 05:59
Hi,
It still showing 1 only, seems the increment doesn't work. The report showing only number 1.
Here is the script:
declaration:
extern domain tcamta no
before.tiitm001.kitm.1: | tiitm001.kitm is group field
before.layout:
if lattr.break then
no = 0
endif
detail.1:
before.layout:
no = no + 1
DSchneider
3rd May 2002, 09:50
Hi Yenry,
the reason is, that you have to zero the variable in the group header:
after.<group>:
after.layout:
no=0
For the second thing - different fonts in report, you have to set 'fixed device font' in Maintain Reports Page two, and than you can give every Layout or every Field a specific font.
I hope this helps you
Best Regards
Daniel :)
Yenry98
3rd May 2002, 12:09
Thanks Daniel,
But still didn't work out. The problem is not to reset the counter on group level, the problem is my counter does not work.
I want sequence number on "detail.1:" but seem the statement "no = no + 1" under "before.layout:" does not work properly. It works only once, so it show 1 only. Can not increment.
Kindly advise.
DSchneider
3rd May 2002, 12:31
Hi,
I think it will be zeroed everytime, before adding 1!!!!!
So the addition really works, but begins every time at 0!!
Don't you agree?
Best Regards
Daniel :)
Yenry98
3rd May 2002, 13:21
Hi,
I got your point, it zeroed everytime, so i change my script to:
declaration:
extern domain tcamta no
detail.1:
before.layout:
no = no + 1
no zero anymore. But how come it still not working. Showing only 1 all the time. When i change no = no + 5, just for test, it show only 5, so seems the script only read once.
Kindly advise.
DSchneider
3rd May 2002, 14:09
That is strange.
Are there other detail-layouts?
Is there no statement like no=0?
Is there a statement in the print expression of detail.1 - Layout?
Best Regards
Daniel :)
Yenry98
3rd May 2002, 15:56
There are no other detail layout, only detail.1:
no statement like "no=0"
I use print expression "1" on -layout , means always print, isn't it?
That's the default.
dkorst
3rd May 2002, 17:16
Just a thought.....
Do you have your variable defined as an input field? If so Baan will zero out with each detail record.
Debbie Korst
RMCis Consulting
Yenry98
6th May 2002, 07:36
What a thought Debbie.
It's work...
Thank you all...