Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


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

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 27th September 2018, 06:36
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Report Layout Issue
Baan: ERP LN 6.1 FP11 (Infor ERP 10.5)
C/S: None/Unknown

Dear all,

I have issue on display report data. Please refer attached file for more details. First attached file (Report Layout Issue 1) is now current layout display. How can I show the report layout as second attached file (Report Layout(request like this)). My code as below. Please advise. Thanks.

Code:
|****************************** declaration section ***************************

declaration:

	table	ttccus025	| Cut List Calculation
	table	ttccom001	| Employee-General
	table	ttccus024	| Short Bar List
	table	ttcmcs052	| Projects


	extern	domain	tcmcs.str60	title1,  sect.olen.clle
	extern	domain	tclbal		bal
	extern	domain	tcclle		count.clle, max.clle, run.no
	extern	domain	tccsle		total.qty, totalqty
	extern	domain	tcoqty		gross.qty, short.qty, minus.qty, a.short.qty, test.qty

	extern	domain	tcitem		item.var(1) based
	extern	domain	tcitem		qty.var(1) based
	extern	domain	tcitem		bal.qty.var(1) based
	extern	domain	tcitem		finish.item, f.item, f.qty, f.bal.qty
	long i, t, tot.num

before.program:
	free.mem(item.var)
	free.mem(qty.var)
	free.mem(bal.qty.var)

	i = 0
	t = 1

header.1:
before.layout:
	title1 = "TEST"

before.tccus025.sect.1:
before.layout:
	totalqty = 0

detail.1:
before.layout:

	select count(tccus025.clle):count.clle
	from tccus025
	where tccus025.sect = :tccus025.sect and tccus025.olen = :tccus025.olen and tccus025.clle = :tccus025.clle
	selectdo
		run.no = run.no + 1
	endselect

	|**** Max Long Bar ***********
	select max(tccus025.clle):max.clle
	from tccus025
	where tccus025.sect = :tccus025.sect and tccus025.olen = :tccus025.olen and tccus025.ocut = tcyesno.no
	|group by tccus025.clle
	selectdo
	selectempty
		max.clle = 0
	endselect
		
	if count.clle = run.no then
		bal = tccus025.lbal
	else
		bal = 0
	endif


	|**** Show Finish Goods ***********	
	short.qty = tccus025.csle

	select tccus024.*
	from tccus024
	where tccus024.sect = :tccus025.sect and tccus024.lgth = :tccus025.slen
	selectdo
		gross.qty = tccus024.oqty
		finish.item = tccus024.item
			
			short.qty = short.qty - gross.qty
	

			i = i + 1
			alloc.mem(item.var, 47, i)
			alloc.mem(qty.var, 47, i)
			alloc.mem(bal.qty.var, 47, i)

			item.var(1,i) = finish.item	
			qty.var(1,i) = str$(gross.qty)
			bal.qty.var(1,i) = str$(short.qty)
			
	endselect

after.layout:	
	calculate.total.quantity(tccus025.csle)		


detail.2:
before.layout:
	for tot.num = t to i

		f.item = trim$(item.var(1,tot.num))
		f.qty = qty.var(1,tot.num)
		f.bal.qty = bal.qty.var(1,tot.num)

		break
	endfor
	
	if (i = 0) or (i = t) then
		i = 0
		t = 1
		free.mem(item.var)
		free.mem(qty.var)
		free.mem(bal.qty.var)
	endif

after.layout:
	if i <> 0 then

		if i <> t then
			t = t + 1
			layout.again()			
		endif
		
	endif

after.program:
	free.mem(item.var)
	free.mem(qty.var)
	free.mem(bal.qty.var)

after.tccus025.clle.1:
after.layout:
	run.no = 0

after.tccus025.sect.1:
before.layout:

	total.qty = totalqty


Functions:

function calculate.total.quantity(domain tccsle t.qty)
{
	totalqty =  totalqty + t.qty
}
Attached Images
File Type: png Report Layout Issue 1.png (16.9 KB, 11 views)
File Type: png report layout (request like this).png (41.3 KB, 15 views)
Reply With Quote
Sponsored Links
  #2  
Old 27th September 2018, 17:29
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 531
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Do you want to get After Used Qty on the report? Simply use a field with quantity domain and assign the value f.qty - tccus025.csle
Reply With Quote
  #3  
Old 28th September 2018, 04:09
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Quote:
Originally Posted by Ajesh View Post
Do you want to get After Used Qty on the report? Simply use a field with quantity domain and assign the value f.qty - tccus025.csle
Thanks for your reply. Yes, but the figure get wrongly. I also want to display the item code.

Eg:
finish good A need use 3 pcs short bar A and
finish good B need use 4 pcs short bar A.
1 pcs Long Bar only can cut 2pcs shor bar A.

I want display as below.
Material Mat.qty Qty short bar A finish good After used qty
Long Bar 1 pcs 2 pcs finish good A 1 pcs
Long Bar 1 pcs 2 pcs finish good A 0 pcs
finish good B 3 pcs
Long Bar 1 pcs 2 pcs finish good B 1 pcs
Long Bar 1 pcs 2 pcs finish good B 0 pcs

Please advise. Thanks.
Reply With Quote
  #4  
Old 28th September 2018, 14:40
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 531
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Whatever value is being shown in Total Qty to be used - Short Bar Process Qty, You can display it in before.layout of the Report or use it directly in the Report Field

Also You want the Trimmed Item Code to be displayed? Its achievable if you use trim$
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
Invoices printing issue-display last record with 2 lines tracylee Tools Development 7 20th October 2017 11:51
Report Layout issue due to AFS vik.patil Tools Development 6 2nd May 2016 07:18
Only one dynamic footer on the last page BaBernd Tools Development 4 10th April 2015 17:18
Printing Layout Twice in a Report MilindV Tools Development 3 2nd December 2010 13:32
Layout within report layout layswan Tools Development 1 22nd April 2008 11:41


All times are GMT +2. The time now is 07:55.


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