Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 26th May 2004, 16:39
Neal Matthews's Avatar
Neal Matthews Neal Matthews is offline
Guru
 
Join Date: Sep 2001
Location: Nottingham
Posts: 483
Neal Matthews is on a distinguished road
Baan: Baan IVc4 ags0 - DB: Informix 9.40 UC4 - OS: Sun Solaris 9
Surpress the print of a report from within the report script

Hello,

I am attempting to surpress the print of a report from within the report script.

Basically I don't want the report to print if the service order is uncosted. At the moment I have set up a before.report.1: section and using a message in conjuction with the end() function.

The only problem with this technique is that if the users chooses to display the report for an item which is uncosted then when the user leaves the main session he gets a blank display browser.

This is extremely irritating if the user has been in the session for a while printing service orders and then leaves the session to find numerous blank display windows.

I have tried using the before.program section of the script instead but at this point the service order field is 0.

Does anybody know of a way around this. Please note I do not have a development license.

Cheers
Neal Matthews
Intier Automotive - IT Support Analyst
Reply With Quote
  #2  
Old 26th May 2004, 16:47
dorleta's Avatar
dorleta dorleta is offline
Senior Member
 
Join Date: Dec 2001
Location: Madrid - Spain
Posts: 133
dorleta is on a distinguished road
Baan: BaanIV - DB: All - OS: All
Perhaps ...

if you can detect that there arn´t results to show you can do in the after report section

spool.device = "ASCII" and send to a file

I never have tested it .

good luck
Reply With Quote
  #3  
Old 26th May 2004, 22:58
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Maybe..

It seems to me I tried changing the spool.device inside the report and could not get it to work. Not sure if this would work, but in the report script why not just use the kill command to kill the ttstpdisplay that may be running. I am not sure if this would cause problems, but you could try it.

Mark
Reply With Quote
  #4  
Old 27th May 2004, 08:51
Neal Matthews's Avatar
Neal Matthews Neal Matthews is offline
Guru
 
Join Date: Sep 2001
Location: Nottingham
Posts: 483
Neal Matthews is on a distinguished road
Baan: Baan IVc4 ags0 - DB: Informix 9.40 UC4 - OS: Sun Solaris 9
Hello,

Thanks for the suggestions.

You're right Mark for some reason I cannot get the spool device setting to work within the report script.

The problem with the kill technique is that the display browser only appears when the user leaves the session and at no point can I see a ttstpdisplay to kill when I run ps.

Any other ideas would be appreciated.

Cheers
Neal
Reply With Quote
Sponsored Links
  #5  
Old 27th May 2004, 12:24
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
some ideas

U can use the pstat function to get the pid of ttstpdisplay. In order
to ensure the pid of ttstpdisplay is correct u can check it's parent
or use get.pgrp function for the pid of ttstpdisplay. Once the proper pid
of ttstpdisplay is ascertained , use kill to remove the process from process
group.
Reply With Quote
  #6  
Old 27th May 2004, 14:54
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Session...

Not sure if this will work, but maybe instead of suppressing all the print when the order is not costed. Go ahead and let it print. Then see if you can see the ttstpdisplay in the after.report section using the ps command. If something actually printed maybe that will force ttstpdisplay to go ahead and come up.

Everything else involves modifying the session script.


Mark
Reply With Quote
  #7  
Old 27th May 2004, 15:50
Neal Matthews's Avatar
Neal Matthews Neal Matthews is offline
Guru
 
Join Date: Sep 2001
Location: Nottingham
Posts: 483
Neal Matthews is on a distinguished road
Baan: Baan IVc4 ags0 - DB: Informix 9.40 UC4 - OS: Sun Solaris 9
Hello,

Unfortunately I'm struggling to get the pid of the ttstpdisplay. I'm not entirely sure how the functions specified by Hitesh work as the documentation I've found suggests that for these functions you need the pid in the first place.

I've tried to get to the pid by running a shell from within the report script without any luck.

Any more suggestions would be welcome.

Cheers
Neal
Reply With Quote
  #8  
Old 27th May 2004, 16:02
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Other thread..

See if the code in this thread helps. It is the last post by me.

Mark
Reply With Quote
  #9  
Old 27th May 2004, 16:13
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
finding pid

I was trying to give u the code for finding the pid . But Mark has already given the link to accomplish the task . I think that link is comprehensive.
Reply With Quote
  #10  
Old 27th May 2004, 17:57
Neal Matthews's Avatar
Neal Matthews Neal Matthews is offline
Guru
 
Join Date: Sep 2001
Location: Nottingham
Posts: 483
Neal Matthews is on a distinguished road
Baan: Baan IVc4 ags0 - DB: Informix 9.40 UC4 - OS: Sun Solaris 9
Thanks guys,

That works perfectly. I even understand how the code works now as well.

Cheers
Neal
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
print 2nd report from 1st report script cmandal Tools Development 6 14th October 2012 23:56
Variable value different in pgm. script & report script ? PacSun Tools Development 5 28th June 2006 19:09


All times are GMT +2. The time now is 15:11.


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