pjohns
22nd April 2009, 13:36
Hello,

I'm sure I'm overlooking something really simple here. I'm not very hot on creating reports in Baan

I'm creating a simple report to generate a payment file. I have a before.report layout and a detail layout. When I print the report both layouts are being printed on the same line. What have I done wrong? My before.report layout has text, a couple of Baan fields and blank space. Nothing at all complicated.

The report script has a couple of lines for before.report (before.layout) that are formating dates.

I've even created anew report with a before.report and detail section. In the before.report layout I have some text that says "top" and in the detail layout I have some text that says "test". I have an empty script. When I run the report i get one line of text saying "toptesttest"

I must be doing something fundamentally wrong here.

Thanks in advance

PJ

zardoz
22nd April 2009, 16:05
Have you tried to print using different devices, by ex. D, ASCIF, windows printer?
In the layout page, for each layout, you have a value of multicolumn different from 0?

pjohns
22nd April 2009, 17:04
Hello Zardoz, thanks for your reply.

I was sending my output to a file and opening this from a Samba share on our Linux server. Due to Windows formatting it was putting all the data on one line. When opened from vi on Linux the format was okay.

The duplication of the details layout was resolved by putting - "if details then lattr.print = false" into the script. I got this by looking at some of the other reports I was basing my report on. Not sure why i need to do this but it fixes the duplication error??

~Vamsi
22nd April 2009, 17:37
Hello Zardoz, thanks for your reply.

I was sending my output to a file and opening this from a Samba share on our Linux server. Due to Windows formatting it was putting all the data on one line. When opened from vi on Linux the format was okay.


What editor are you using to view the file off the Samba share?

I would hazard Notepad. If that is the case, try Wordpad or any decent replacement for Notepad.

Unix files use linefeed <LF> - chr$(10) - as line endings.
Mac files use carriagereturn <CR> - chr$(13) - as line endings.

Dos/Windows use <CR><LF> as line endings. Notepad requires that files be formatted only with Dos/Windows line endings. Other editors usually do not have this limitation.

Based on Scintilla (the same widget used in SciTE: http://www.baanboard.com/baanboard/showthread.php?t=603), here is a replacement for Notepad: http://www.flos-freeware.ch/notepad2.html

pjohns
22nd April 2009, 18:15
I was using textpad, which if I open the file correctly it would open without issue. I was just double clicking the file on the samba share.

Thanks for your tips on editors.

The problem I had with the duplicate details layouts, although fixed by putting lattr.print=false in the script, is now giving my problems in my after.report layout. I have to create a count of records printed in the report detail. So where I have one detail line (remember the duplicate detail line is not being printed beacuse of lattr.print = false) my count is including the one I'm not printing. How do I ignore the 'hidden' detail line in my count?

Thanks