free_2tak
10th February 2011, 11:25
Hi All,

I wanted to extend the ERP LN report page width from the limited 255 chars to around 500. I know that we can do that by using spooling. But i am not where we should insert that code?
I wrote a query with aroung 25 fields of 500 chars in total and generated a report for that query using "Genearte QUery Report"

Now i wanted to make sure all the 25 fields are exported to excel or csv.

Where should i insert the spooling code? in the report script? if so where exactly in report script?

Please help me out...

george7a
10th February 2011, 12:37
Do you have an Excel/CSV device installed? or do you want to program it (if so please share your code)? (Check B2Win (http://www.nazdaq-it.com/utilities.php?prod=bwinse-pro))

You might also want to look at the Baan Query Tool (http://www.nazdaq-it.com/utilities.php?prod=querytool)

free_2tak
10th February 2011, 12:52
George!
Thanks for your reply. I want to write a manual script for expanding the page width of report. Also Excel device is already installed on ERP LN. I only want to expand the report page width.

Is baan query tool an open source software or do i have to pay for it?

george7a
10th February 2011, 13:00
The "spool" solution also has some kind of a limitation (512 if I remember correctly). The other option you have is to write it manually to a text file using the seq.* functions (http://www.baanboard.com/programmers_manual_baanerp_help_functions_directory_file_operations_synopsis).

Baan Query Tool (http://www.nazdaq-it.com/utilities.php?prod=querytool) is not free, but is cost effective. It supports "Wide" reports, so there is no limitation for number of characters in report. You can download a free (fully functional) demo to try it out.

free_2tak
10th February 2011, 13:21
George!

Thanks a lot for your reply. You mean you need to use seq.* function in the report script and in the detail section (report.detail) redirect the report fields to a file? Also if we write to a file, will the file had to be in server box? or we can also create file in client box?

george7a
10th February 2011, 13:34
You can choose to create the file on the server or the client, depending on which function you chose to work with (seq.*.local make the file on the client). I would advice you to create it on the server, then you can copy it to the client, email it, archive it somewhere else or anything you want.

free_2tak
11th February 2011, 12:01
Dear Goerge,
Thanks a lot for your replies. We can use seq.* functions to write to a file. Could you please let me know how to access report fields(input fields for the report that came from query data) in the report script. As i am beginner, i donno how to access them. Also there are 3 sections in the report namely, program section, report section, textfield section. Could you please let me know where to place seq.* functions. It might be a silly question but means a lot to me.

Thanks in advance..

bdittmar
11th February 2011, 14:08
Dear Goerge,
Thanks a lot for your replies. We can use seq.* functions to write to a file. Could you please let me know how to access report fields(input fields for the report that came from query data) in the report script. As i am beginner, i donno how to access them. Also there are 3 sections in the report namely, program section, report section, textfield section. Could you please let me know where to place seq.* functions. It might be a silly question but means a lot to me.

Thanks in advance..

Hello,
don't know your reportlayout, but:

declaration:

string fieldline(1200)



before.sortfield.x:
before.layout:

seq.open("your_path_and_filename", "w")

detail.x:
before.layout:

|create a string with all fields you need

fieldline=
field.1
&field.2
&field.3
..........
|Don't forget to convert all values to a string like:
|&str$(tiitm001.copr)

After all fields are concated to the fieldline variable
seq.puts(fieldline, fp)

after.sortfield.x:
before.layout:

seq.close(fp)

|fp is the filepointer !

Regards