Ash Gajjar
26th September 2016, 11:15
I have a program script where I output 3 different ascii files. Each of these have their own report layout (Same report group)

I am hoping to run this session using Cron, thus require no user interaction (ie no selection of report to be run)

Rprt_send() and brp_ready() functions shows up the report selection parameters.

Any suggestions? I have looked at spool functions, but do not understand how to use this.

Many thanks
ash

srprks
26th September 2016, 11:53
Hi
You can remove report link from the session and use brp.* functions
before.choice:

brp.id1 = brp.open("rxxpur2401m0001","D", 1) |report 1
brp.id2 = brp.open("rxxpur2401m0001","D", 1) |report 2
brp.id3 = brp.open("rxxpur2401m0001","D", 1) |report 3

and where you are getting your data use brp.ready() to send your data

and when you done with sending data use brp.close()

Ash Gajjar
26th September 2016, 12:01
ok, that kind of make sense
however, done understand hat id1, 2 ..... represents

"D" is output "display", right?

Much appreciation
ash

srprks
26th September 2016, 12:03
Yes Exactly.

Thanks

Ash Gajjar
26th September 2016, 12:07
choice.print.data:
on.choice:

rpt.path = "/baanrpt/jedox/jedox_daily/jdsoc4403m.txt"
rpt_mat = brp.open("rjdsoc44031002","rpt.path",0)

rpt.path = "/baanrpt/jedox/jedox_daily/jdsoc4403l.txt"
rpt_lab = brp.open("rjdsoc44031003","rpt.path",0)

rpt.path = "/baanrpt/jedox/jedox_daily/jdsoc4403e.txt"
rpt_exp = brp.open("rjdsoc44031004","rpt.path",0)

read.main.table()

brp.close(rpt_mat)
brp.close(rpt_lab)
brp.close(rpt_exp)


At output:......
rpt.typ = "M"
brp.ready(rpt_mat)
rpt.typ = " "

srprks
26th September 2016, 12:24
No..

function long brp.open (string rep_name(16), string device(14), long mode)

Description

This activates a specified report and opens a specified spooler device (if it is not already open). Several reports can be active simultaneously. In a 4GL script, the name of the current report is stored in the predefined variable spool.report. This variable is available in the on.choice subsection of a choice.print.data section.


Arguments
string rep_name(16) The name of the report. Do not include a language code. The language of the user is automatically used.

string device(14) The code of the device on which the report must be printed. This code must be defined in the data dictionary. If you specify an empty string here, you can use the mode argument to display a window in which the user can select the required device.

long mode 0 User is not prompted to select a spooler device.

1 A window is displayed in which the user can select a spooler device. A

Cancel button enables the user to cancel the operation.

2 A window is displayed in which the user can select a spooler device. There

is no option for canceling the operation.



The 3rd Argument is for spooling device. you cant give path to store the file.

bhushanchanda
26th September 2016, 12:29
Hi,

Second argument to the function brp.open() is not the path. Its device name. You can set the path in the device data or else through your program script. So, while running through JOB, you need to do something like -

brp.open("rxyz","ASCIT",0)

Ash Gajjar
26th September 2016, 12:33
Ok, got that!

Many thanks
ash

raghuvirk20
23rd November 2016, 18:24
Hi All,

I am not able to print the address (Delivered / Received address) on a report.
even i have checked at table level and input field (in report) level. address field is there. So any one can help me, how to check this field level value at programming level.
Actually I am new to the LN system. if any one is having the similar code snap shot. please share with me. so that i can easily identify the issue and resolving it as well.

Thanks,
Raghuvir

srprks
24th November 2016, 05:50
post your code

Thanks