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 4th January 2017, 08:28
amator's Avatar
amator amator is offline
Junior Member
 
Join Date: Aug 2016
Posts: 20
amator is on a distinguished road
Baan: Baan 4 - DB: SQl Server 2012 - OS: Windows 8
Post Choosing of Report where to display the data.

Hi Guys,

I want to know if is it possible to choose the report where I will send the data from my function.

Just to be clear this is how I print data:
----------------------------------------------------------------------------
choice.cont.process:
on.choice:
execute(print.data)

choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif
----------------------------------------------------------------------------
As you know the "read.main.table" is a function.

What I want to do is I have 2 different functions that will print data into 2 different reports.

Just to be clear again:

Function1 will send to Report1
Function2 will send to Report2

and then when I generate data from my session and I choose the Report2 the Function2 should be the one to generate.

Thanks in advance guys,
Reply With Quote
  #2  
Old 4th January 2017, 09:21
JaapJD's Avatar
JaapJD JaapJD is offline
Guru
 
Join Date: Sep 2002
Location: Netherlands
Posts: 728
JaapJD will become famous soon enoughJaapJD will become famous soon enough
Baan: BaanIV, BaanERP, ERP LN 6.1 - DB: Oracle, SQL Server - OS: Unix, Windows
Two options:
- Define the 2 reports in different report groups. Have a field on the screen that the user can choose the type of report
- Define both reports in same group. Then the user will be prompted to choose the report. Based on the report$ variable you can execute the correct function.
Reply With Quote
  #3  
Old 4th January 2017, 13:59
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,905
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Moved to the correct forum. Another option is to just do something with the report name in spool.report. For example:
Code:
	if(rprt_open())then
		on case spool.report
			case "rtisfcxxxx01000":	
			case "rtisfcxxxx01200":	
			case "rtisfcxxxx05000":
				select.sub.workcenter.records()
				break
			case "rtisfcxxxx01100":	
			case "rtisfcxxxx01300":	
				select.main.workcenter.records()
				break
		endcase
		rprt_close()
	else
		choice.again()
	endif
__________________
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
Sponsored Links
  #4  
Old 5th January 2017, 03:11
amator's Avatar
amator amator is offline
Junior Member
 
Join Date: Aug 2016
Posts: 20
amator is on a distinguished road
Baan: Baan 4 - DB: SQl Server 2012 - OS: Windows 8
Hi JaapJD and mark_h,

Thanks for the reply I tried the 2nd option mentioned by JaapJD which is connected to the reply of mark_h. I think I'm on the right solution and I'm still testing it.

mark_h, I just have a question. I tried the code that you mentioned and it doesn't have any error while compiling but while trying the session it doesn't get any data or in short in didn't enter the condition.

Please check my code if I have any mistakes:
---------------------------------------------------------------------------------------------------------------------------
choice.cont.process:
on.choice:
execute(print.data)

choice.print.data:
on.choice:
if(rprt_open())then
on case spool.report
case "whinhxxx000x01":
read.main.table()
break
case "whinhxxx000x02":
read.second.table()
break
endcase
rprt_close()
else
choice.again()
endif
---------------------------------------------------------------------------------------------------------------------------

I think the problem here is the case where I declare the report code but I exactly declare the right report code.

Thank you in advance,
Reply With Quote
  #5  
Old 5th January 2017, 05:51
rahul ingale rahul ingale is offline
Member
 
Join Date: May 2011
Location: Hyderabad
Posts: 33
rahul ingale is on a distinguished road
Baan: baan infor - DB: sql - OS: windows xp
Possibly you are missing r in report code.it should be r and then reportname like
rtdsls4411000.
__________________
IRL
Reply With Quote
  #6  
Old 5th January 2017, 06:38
amator's Avatar
amator amator is offline
Junior Member
 
Join Date: Aug 2016
Posts: 20
amator is on a distinguished road
Baan: Baan 4 - DB: SQl Server 2012 - OS: Windows 8
Hi rahul ingale,

Thanks for the help. It works perfectly now.

Thanks for all the help guys.
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
Report Display keshav.pandya Manufacturing & Supply Chain 2 12th February 2015 20:14
How to hide all detail data in a display session? xiang_zh Tools Development 1 26th January 2005 07:28
How to Print Out report as same as Print Display Screen (Windows 2k Ad Server) nopadon Tools Administration & Installation 1 9th November 2003 14:31
How to display time in report? Svetlana Tools Development 9 17th February 2003 06:57


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


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