Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
15%
200 - 500 GB
28%
500 - 800 GB
4%
800 - 1200 GB
9%
1200 - 1500 GB
9%
1500 - 2000 GB
13%
> 2000 GB
22%
Total votes: 46

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 4th February 2019, 16:17
FrenkR FrenkR is offline
Member
 
Join Date: Jul 2009
Posts: 66
FrenkR is on a distinguished road
Baan: 5 - DB: AS400 - OS: Linux
Show error inside report script
Baan: Other/Unknown
C/S: None/Unknown

Hello,
is there any mechanism how to report error inside report script and stop generating/running report?
I would like to create an error inside report script and send it to session that runs report. Instead displaying report, underlying session should display error only.

Rgds,
Frenk
Reply With Quote
  #2  
Old 5th February 2019, 12:03
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 576
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
What errors do you mean? Compilation Errors, obviously get caught at the time of compilation and reports do not run with that.

Computational errors like division by zero etc create a Fatal error which will result in crash of the sessions..
Reply With Quote
  #3  
Old 6th February 2019, 11:17
FrenkR FrenkR is offline
Member
 
Join Date: Jul 2009
Posts: 66
FrenkR is on a distinguished road
Baan: 5 - DB: AS400 - OS: Linux
Hello,
inside report script, I would like to stop further report processing and nofify parent process, that report should not be printed. E.g. if sales order has no "confirmation date" in some order line, then I would stop further report generation and show message e.g. "Position 10 has no confirmation date". No report should be printed, only message from "parent" process should be displayed.
Is this even possible?
Reply With Quote
  #4  
Old 6th February 2019, 12:00
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 576
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
One Option is to check in the Program Script itself , if report is to be printed to not? If report is not to be printed then don't call the report at all.

Other option is to check in the report (before.program section) if report is to be printed or not, If not then write exit() or end()..
Reply With Quote
  #5  
Old 6th February 2019, 23:34
FrenkR FrenkR is offline
Member
 
Join Date: Jul 2009
Posts: 66
FrenkR is on a distinguished road
Baan: 5 - DB: AS400 - OS: Linux
have no code of "program script", only report. So no option to cancel reporting process. Question was, if reporting "framework" has any built-in mechanism to stop further processing and retrieve error (e.g. dal error message or similar) from report script if report script cancel report generation for some reason.
Reply With Quote
Sponsored Links
  #6  
Old 6th February 2019, 23:42
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,194
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I am not sure about LN, but in 4c4 if I started generating a report and then stopped it in the report process, when it dropped back to the parent it would still print what was already generated. I do not think it would kill it. In my case what I would do in 4c4 is in the parent session I would build code to check before I even started generating the report to make sure nothing printed. Now you probably need to wait for someone that knows more about baan 5 or LN which ever version you are on.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #7  
Old 8th February 2019, 08:56
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 576
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
There is no processing supposed to happen in Report scripts;its just sending records and printing. That's it. All the processing is supposed to happen in the UI script or the DB layers.
Reply With Quote
  #8  
Old 8th February 2019, 17:31
vinceco252's Avatar
vinceco252 vinceco252 is offline
Guru
 
Join Date: Mar 2002
Location: Frederick, CO
Posts: 419
vinceco252 is on a distinguished road
Baan: Baan IVc3, IVc4, 5b, 5c, ERP LN 6.1, Infor ERP 10.x - DB: SQL Server, Oracle - OS: Windows, Linux, HPUX, AIX, (a little bit of) Solaris
^Tell that to the tfcmg1260 check reports.
__________________
Vincent Murphy
---------------
ERP Practice Manager / Senior Consultant
OST
vmurphy@ostusa.com
Reply With Quote
  #9  
Old 12th February 2019, 09:42
FrenkR FrenkR is offline
Member
 
Join Date: Jul 2009
Posts: 66
FrenkR is on a distinguished road
Baan: 5 - DB: AS400 - OS: Linux
First, thank you for your answers. My wishful thinking was that there exist some "magic" undocumented cancellation function. Actually it is quite strange that development team didn't design such functionality. Because of full scripting support inside report, I would expect that many things inside script can go wrong. So, cancellation function would be very welcome option.
Reply With Quote
  #10  
Old 12th February 2019, 13:04
tmannais's Avatar
tmannais tmannais is online now
Senior Member
 
Join Date: Jul 2017
Posts: 124
tmannais is on a distinguished road
Baan: LN 10.5 - DB: MySQL - OS: Windows
Try

Code:
message("Error Message")
stop()
In the

Code:
before.program
Reply With Quote
  #11  
Old 12th February 2019, 18:17
avpatil avpatil is offline
Guru
 
Join Date: Feb 2002
Posts: 728
avpatil is on a distinguished road
Baan: IVc3 - DB: SQL2000 - OS: Win 2003
Well you can try building logic say in header of report and if it is an error set variable that will not print the layout to print.
Reply With Quote
  #12  
Old 14th February 2019, 20:43
FrenkR FrenkR is offline
Member
 
Join Date: Jul 2009
Posts: 66
FrenkR is on a distinguished road
Baan: 5 - DB: AS400 - OS: Linux
Hello,
message() break AFS scripts, so this is not a solution. Also idea was to cancel printing inside arbitrary section, including "end.program" section. So, inside ideal case, at least partial report generation, that should be cancelled, is always already done.
As I understand now, there is no such functionality, except post-processors in device "level".
Reply With Quote
  #13  
Old 17th February 2019, 01:16
mr_suleyman's Avatar
mr_suleyman mr_suleyman is offline
Guru
 
Join Date: Aug 2004
Posts: 642
mr_suleyman is an unknown quantity at this point
Baan: Baan IV - DB: Oracle - OS: HP UX, IBM AIX
Hello,
Why dont you create new main program in which call the program which have no source file. I think that you can make pre-check by using user inputs or range for orders or you can find which orders will be printed. If there is no error in pre-check go ahead for reporting.
Reply With Quote
  #14  
Old 19th February 2019, 11:49
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,366
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,


You may have to kill the report by finding it process ID.


Here's a thread with some links I posted about how to do that.


Things to take care -



Check the report script and see if there are any db transactions taking place. If there are any important tables being updated, you may have to deal with that. Also, check what tables are being updated from program script for getting the report printed, you may need to revert some of the data there too.


e.g. When you print a Purchase Orders, there's no way to reprint it without selecting "Reprint Option". It means, a table say tdpur400 or something is updated from program script when the corresponding report is printed. So, all those things needs to be manually taken care.


There is no function available to send an error code back to program script to abort all the ongoing transactions when its a standard source without source code. So, it will be tedious task to handle it if there is any complex report script and corresponding program script related to this change.


So, please consider everything before making the move.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
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
Simple Report Script Date chris_kzn Tools Development 14 29th May 2013 17:19
BW client parameters lsatenstein Tools Administration & Installation 2 31st January 2012 22:29
filtering of data using report script belle_dev01 Manufacturing & Supply Chain 0 24th September 2008 04:05
solving recursion problems rmarles Tools Development 2 25th January 2005 22:23
How to add input window to report script justone Tools Development 11 28th February 2004 21:09


All times are GMT +2. The time now is 06:39.


©2001-2018 - Baanboard.com - Baanforums.com