Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   Tools Development (http://www.baanboard.com/baanboard/forumdisplay.php?f=8)
-   -   Report with output with more than 255 char. (http://www.baanboard.com/baanboard/showthread.php?t=30669)

Jaap Roos 31st January 2007 14:25

Report with output with more than 255 char.
 
Hello,

I need reports with more than 255 line's columns.
How can I create this in BAAN ERP Vc

I'm not able to insert a default report size with more than 255 lines.
Is there anybody who can help me?

With Regards,
Jaap Roos

en@frrom 31st January 2007 14:42

You can either create the report in a smaller font which fits more than 255 characters, or alternatively, and depending on the kind of data the report is printing, you can create an ascii or csv file or so in your script rather than using a report layout...

Jaap Roos 31st January 2007 14:54

Font en delimited file
 
Hi,

Thanks for your replay:
1) Can you tell me where I can define such a font?
2) How can I create a delimited asci file withhout using a report?

Thanks
Jaap Roos

en@frrom 31st January 2007 15:05

Jaap, if you search the board you will find plenty of topics explaining how to achieve these things...

bdittmar 31st January 2007 16:00

use seq.*
 
Quote:

Originally Posted by Jaap Roos (Post 108075)
Hi,

Thanks for your replay:
1) Can you tell me where I can define such a font?
2) How can I create a delimited asci file withhout using a report?

Thanks
Jaap Roos


Hello,

you can create a delimited ascii file with seq.* statements.

Regards

SandraDiehl 9th February 2007 22:37

I've done this many of times
 
I had done this several times and this is how I have done it:

You need to define variables:

long fp
long rv
string directory(1024)
string line(2048)

Then need to open the file that you are going to write to. We had designed this one to write to a directory that the users then had the results and set up by individual company.

choice.cont.process:
on.choice:
directory = "/forecast/" & str$(get.compnr())
rv = mkdir(directory)
fp = seq.open(directory & "/" & "FORECAST.txt", "w")
if fp < 0 then
if not background then
message("File o:%s could not be open", directory&"/FORECAST.txt")
endif
else
read.main.table()
endif

Once the file is open and you are processing the records you need to format and send to the file: Also remember that you have to do headers since you don't have the layout option in BaaN...

function build.report.header.file()
{
line = ""
line = line & "Customer" & "|"
line = line & "Program" & "|"
line = line & "Ship To Location" & "|"
line = line & wk1.lbl & " Units" & "|"
line = line & wk1.lbl & " Sales" & "|"
line = line & wk2.lbl & " Units" & "|"
line = line & wk2.lbl & " Sales" & "|"
line = line & wk3.lbl & " Units" & "|"
line = line & wk3.lbl & " Sales" & "|"
line = line & wk4.lbl & " Units" & "|"
line = line & wk4.lbl & " Sales" & "|"
line = line & wk5.lbl & " Units" & "|"
line = line & wk5.lbl & " Sales" & "|"
line = line & wk6.lbl & " Units" & "|"
line = line & wk6.lbl & " Sales" & "|"
line = line & wk7.lbl & " Units" & "|"
line = line & wk7.lbl & " Sales" & "|"
line = line & wk8.lbl & " Units" & "|"
line = line & wk8.lbl & " Sales" & "|"
line = line & wk9.lbl & " Units" & "|"
line = line & wk9.lbl & " Sales" & "|"
line = line & wk10.lbl & " Units" & "|"
line = line & wk10.lbl & " Sales" & "|"
line = line & wk11.lbl & " Units" & "|"
line = line & wk11.lbl & " Sales" & "|"
line = line & wk12.lbl & " Units" & "|"
line = line & wk12.lbl & " Sales" & "|"
line = line & wk13.lbl & " Units" & "|"
line = line & wk13.lbl & " Sales" & "|"
rv = seq.puts(line, fp) | writes out line
}

NOTE: Header you only need to do once, so create and send.

Now the actual data:

function build.report.detail.file()
{
line = ""
line = line & tccom010.nama & "|"
line = line & tdssc989.plni & "|"
line = line & tccom013.namc & "|"
line = line & str$(tdssc989.qnty(1)) & "|"
line = line & str$(tdssc989.valu(1)) & "|"
line = line & str$(tdssc989.qnty(2)) & "|"
line = line & str$(tdssc989.valu(2)) & "|"
line = line & str$(tdssc989.qnty(3)) & "|"
line = line & str$(tdssc989.valu(3)) & "|"
line = line & str$(tdssc989.qnty(4)) & "|"
line = line & str$(tdssc989.valu(4)) & "|"
line = line & str$(tdssc989.qnty(5)) & "|"
line = line & str$(tdssc989.valu(5)) & "|"
line = line & str$(tdssc989.qnty(6)) & "|"
line = line & str$(tdssc989.valu(6)) & "|"
line = line & str$(tdssc989.qnty(7)) & "|"
line = line & str$(tdssc989.valu(7)) & "|"
line = line & str$(tdssc989.qnty(8)) & "|"
line = line & str$(tdssc989.valu(8)) & "|"
line = line & str$(tdssc989.qnty(9)) & "|"
line = line & str$(tdssc989.valu(9)) & "|"
line = line & str$(tdssc989.qnty(10)) & "|"
line = line & str$(tdssc989.valu(10)) & "|"
line = line & str$(tdssc989.qnty(11)) & "|"
line = line & str$(tdssc989.valu(11)) & "|"
line = line & str$(tdssc989.qnty(12)) & "|"
line = line & str$(tdssc989.valu(12)) & "|"
line = line & str$(tdssc989.qnty(13)) & "|"
line = line & str$(tdssc989.valu(13)) & "|"
rv = seq.puts(line, fp)
}


Now if you need totals and subtotals you can do that as well....

Hope this helps.


All times are GMT +2. The time now is 19:04.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com