tmannais
3rd May 2019, 12:05
Say, I have a standard print session.
Execute the print command in the session.
After that, there are 3 reports displayed for selection to be printed on.
One is a standard report. Another 2 are customized reports.
The question is how to hide report(s) by some conditions using any available methods? so that the user can only select the available report(s) after my customized validation.

VishalMistry
3rd May 2019, 16:54
Here is a relevant post for your requirement.

http://www.baanboard.com/baanboard/showthread.php?t=22810

Other option is not to link any report with print session and based on some conditions, you can call specific report using brp series of functions. Here is a simple comparision of rprt and brp report functions.

brp.open() = rprt_open()
brp.ready() = rprt_send()
brp.close() = rprt_close()

if you search the forum, you may find relevant threads with examples.

Hope this helps,

Vishal

JaapJD
6th May 2019, 12:35
In a session extension you can hide reports conditionally. This is available as of LN tools 10.6.

tmannais
10th May 2019, 12:26
In a session extension you can hide reports conditionally. This is available as of LN tools 10.6.

I tried adding Standard Linked Report -> standard report -> Is Visible hook
return(false)
and then commit.
The report is still visible and printable in the session just like nothing has been done to it.
I think the hook has a bug because I have tried something (not related to this) with Menu Extension using this very same hook "Is Visible" to return(false). It did not work as well.