Raj@baan
22nd September 2013, 20:18
hi,

In my session actually 2 reports are there,and i need to print report by checking a Enum(tcyesno) condition ,if yes have to print one report,if no then print another report..Can any please help me in this Issue..i had used the Isspace Condition but no use..

bhushanchanda
22nd September 2013, 22:15
Hi,

Use brp.open() function to do that.

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

Check this Link (http://www.baanboard.com/programmers_manual_baanerp_help_functions_reports_choice_report)

You can use :-

e.g.
if enum_field = tcyesno,yes then
brp_id1 = brp.open( "rtccom040101000", "F", 0 )| Spooler is opened aumatically
endif

if enum_field = tcyesno.no then
|open some other report
endif
brp.ready( brp_id1 )
brp.close( brp_id1 )

jnandesh
23rd September 2013, 10:49
hi,

Actually i want to print those on csv sheets by changing the headers & details, i had used local paths for opening of csv sheets..can u please suggest for that...

bhushanchanda
23rd September 2013, 12:53
Hi,

Well, you can go for seq.* functions too. What you can do is, create a tmp file on server with seq.* functions with some field separator. Then, you can use server.to.client() to get the file on local machine.

Now, based on your condition you can design whole file. See, there are various ways, you need to chose the best for you.

I would have used brp.* functions if it was a report containing less columns but if my report has more than 15-20 columns I would go with seq.* functions. Well, again, it depends on the users requirement as well.

So in short:-

1. Create two functions which will print your two reports using seq.* functions.
2. Based on the enum value, call any 1 function.
3. Now, when the file is created on server, transfer it to client.

Done!

Abigail111
26th September 2013, 09:40
Hi,

Well, you can go for seq.* functions too. What you can do is, create a tmp file on server with seq.* functions with some field separator. Then, you can use server.to.client() to get the file on local machine.

Now, based on your condition you can design whole file. See, there are various ways, you need to chose the best for you.

I would have used brp.* functions if it was a report containing less columns but if my report has more than 15-20 columns I would go with seq.* functions. Well, again, it depends on the users requirement as well.

So in short:-

1. Create two functions which will print your two reports using seq.* functions.
2. Based on the enum value, call any 1 function.
3. Now, when the file is created on server, transfer it to client.

Done!
This solution is helpful for me.Thanks for your sharing