Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Google search


Poll
What version of Baan have you installed
Baan IV
30%
FP3
3%
FP4
0%
FP5
0%
FP6
2%
FP7
4%
10.2 (incl. 10.2.1)
3%
10.3
7%
10.4
18%
10.5
29%
Other
2%
Total votes: 89

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 18th January 2018, 12:48
tmannais tmannais is offline
Junior Member
 
Join Date: Jul 2017
Posts: 13
tmannais is on a distinguished road
Baan: LN 10.5 - DB: MySQL - OS: Windows
Exclamation [AFS] Report does not show up

Hi,

I am using AFS to execute a form command in tfgld1401m000 to print a report but it doesn't display the report and there is no error either.
Here is the code:

Code:
function afs.non.finalize.transaction(domain tcmcs.str6 i.batch, domain tcmcs.str4 i.year, domain tcmcs.s512 i.content.line)
{
	string	non.finalize.code(13)
	domain	tcmcs.str256	error.msg.from.non.finalize
	domain	tcmcs.str256	error.msg
	string	user(15)
	long	company
	boolean	check.error.msg
	check.error.msg = false
	non.finalize.code = "tfgld1401m000"			|* Non finalize 
	user = logname$
	company = get.compnr()
	|stpapi.find(non.finalize.code, error.msg.from.non.finalize)
	stpapi.clear(non.finalize.code)
	stpapi.put.field(non.finalize.code, "year.f", str$(i.year))
	stpapi.put.field(non.finalize.code, "cono.f", str$(company))
	stpapi.put.field(non.finalize.code, "cono.t", str$(company))
	stpapi.put.field(non.finalize.code, "btno.f", str$(i.batch))
	stpapi.put.field(non.finalize.code, "btno.t", str$(i.batch))
	stpapi.set.report(non.finalize.code, "rtfgld140111000", "D", error.msg.from.non.finalize)
	stpapi.form.command(non.finalize.code, 5, "exec.cont.process", error.msg.from.non.finalize)
	if not isspace(error.msg.from.non.finalize) then
		stpapi.recover(non.finalize.code, error.msg)
		error.msg.from.non.finalize = "Cannot insert tfgld1401m000: " & error.msg.from.non.finalize
		save.error.log(i.content.line, non.finalize.code, error.msg.from.non.finalize)   |* table save log tfgld164 Import AP/AR 
		check.error.msg = true
	endif
	if check.error.msg = true then
		stpapi.end.session(non.finalize.code, error.msg.from.non.finalize)
		message("Some errors occur. Please see the log information.")	
	endif
	stpapi.end.session(non.finalize.code, error.msg.from.non.finalize)
}
tfgld1401m000 is a standard session, and the report is correct and exists.
Please help.

Regards,
Thana
Reply With Quote
  #2  
Old 18th January 2018, 14:23
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,963
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Are those the only fields on the form? I have had cases where I have to put all the fields on the form to get the report to print - plus (not sure about your version) but in 4c4 users love to save defaults for sessions. So I always put all the fields to make sure those do not cause issues.
__________________
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
  #3  
Old 19th January 2018, 03:39
tmannais tmannais is offline
Junior Member
 
Join Date: Jul 2017
Posts: 13
tmannais is on a distinguished road
Baan: LN 10.5 - DB: MySQL - OS: Windows
I did what you suggested and it works like a charm.
Thank you again Mark. You are exactly right. This is a perfect solution.

Regards,
Thana
Reply With Quote
Sponsored Links
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
Invoices printing issue-display last record with 2 lines tracylee Tools Development 7 20th October 2017 11:51
Which Set Commands Do You Use? Why? mr_suleyman Tools Development 14 16th January 2014 22:44
BW client parameters lsatenstein Tools Administration & Installation 2 31st January 2012 22:29
Background info for bshell options (BaanIV) victor_cleto Tools Administration & Installation 61 26th January 2010 19:17
solving recursion problems rmarles Tools Development 2 25th January 2005 22:23


All times are GMT +2. The time now is 16:08.


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