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
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 15th August 2016, 11:04
amator's Avatar
amator amator is offline
Junior Member
 
Join Date: Aug 2016
Posts: 26
amator is on a distinguished road
Baan: Baan 4 - DB: SQl Server 2012 - OS: Windows 8
Post How to declare in detail layout not print the before.field layout?

Hi guys,

I want to ask how to declare not to print the before.field layout in detail layout if the detail layout is empty.

For example:

before.field.1
before.layout:

after.layout:

detail.1
before.layout:

"CODE HERE HOW TO DECLARE NOT TO PRINT THE BEFORE FIELD LAYOUT IF MY CODE HERE IN DETAIL LAYOUT DOESNT GET ANY DATA OR EMPTY"

after.layout:


I'm new in baan.

Thanks in advance,
Amator
Reply With Quote
  #2  
Old 15th August 2016, 14:03
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,653
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
use lattr.print

Quote:
Originally Posted by amator View Post
Hi guys,

I want to ask how to declare not to print the before.field layout in detail layout if the detail layout is empty.

For example:

before.field.1
before.layout:

after.layout:

detail.1
before.layout:

"CODE HERE HOW TO DECLARE NOT TO PRINT THE BEFORE FIELD LAYOUT IF MY CODE HERE IN DETAIL LAYOUT DOESNT GET ANY DATA OR EMPTY"


after.layout:


I'm new in baan.

Thanks in advance,
Amator
Code:
if condition then
    lattr.print = false
else
   lattr.print = true
endif
__________________
//Bernd
Reply With Quote
  #3  
Old 16th August 2016, 07:38
oirfeodent's Avatar
oirfeodent oirfeodent is offline
Member
 
Join Date: Jun 2016
Posts: 51
oirfeodent is on a distinguished road
Baan: Baan - DB: DB - OS: OS
guess before.field.1: cannot be controlled from detail.1:
But try lattr.enddata, if nothing to print in detail.1: this field should have the info.
Code:
before.field.1
before.layout:
    if lattr.enddata then                  |Check if anything to print.
        lattr.print = false
    endif
Reply With Quote
  #4  
Old 16th August 2016, 08:25
amator's Avatar
amator amator is offline
Junior Member
 
Join Date: Aug 2016
Posts: 26
amator is on a distinguished road
Baan: Baan 4 - DB: SQl Server 2012 - OS: Windows 8
Hi bdittmar,

Thanks for the reply. I tried to insert my query and codes in the before field layout instead of detail layout and I tested it if there is an error. Yes it works I can insert the code and query in before field and it works the same when it is in the detail so I tried your advice the lattr.print and a condition. Yes again it works but i have another problem in the out put.

For example (Based on the original output)

Page 1 output:

FFFFFFFFFFFF
______________
PREPARED BY
--------------------------------------------------------------------------------------------------------
Page 2 output:
Report Title
LABEL: FFFFFFFF PAGE NO.: 2
LABEL: FFFFFFFF DATE: FFFFFFFFFF

DATE ITEM DESCRIPTION AMOUNT
FFFFFFF FFFFFFFF FFFFFFFFFFFFF FFFFFFFFFFFFFFFF



FFFFFFFFFFFF
______________
PREPARED BY

---------------------------------------------------------------------------------------------------
Page 3 output:
Report Title
LABEL: FFFFFFFF PAGE NO.: 3
LABEL: FFFFFFFF DATE: FFFFFFFFFF

DATE ITEM DESCRIPTION AMOUNT
FFFFFFF FFFFFFFF FFFFFFFFFFFFF FFFFFFFFFFFFFFFF

--------------------------------------------------------------------------------------------------------

Notice that the first page is the footer only and the last page is w/o footer.
The first page should be no data the second page should be the first data.

Thanks in advance,
Amator
Reply With Quote
Sponsored Links
  #5  
Old 16th August 2016, 14:25
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,934
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
What I think is happening is the detail layouts are being skipped because of your test, but at footer time it probably has the data for the next page. Your best bet is to debug the report step thru it and see what data you have at the footer - then make sure you have a check for it. My guess is the footer has the new data and your test might not be working like you think. So debug it and get to the footer section and make sure the test in it is actually working.
__________________
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
  #6  
Old 19th August 2016, 04:56
amator's Avatar
amator amator is offline
Junior Member
 
Join Date: Aug 2016
Posts: 26
amator is on a distinguished road
Baan: Baan 4 - DB: SQl Server 2012 - OS: Windows 8
Quote:
Originally Posted by mark_h View Post
What I think is happening is the detail layouts are being skipped because of your test, but at footer time it probably has the data for the next page. Your best bet is to debug the report step thru it and see what data you have at the footer - then make sure you have a check for it. My guess is the footer has the new data and your test might not be working like you think. So debug it and get to the footer section and make sure the test in it is actually working.
Hi Mark,

Thank you for the comment.I debug it and I found some detail in the first page. I reconstruct my conditions in the detail layout. and now it works.

Thank you,
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 Detail Layout In Form of Matrix sachinbaan Tools Development 4 10th July 2015 10:04
3GL ASCII-Menu System for ERP-LN AndreasSchmitt Tools Development 7 5th June 2008 13:07
Is there a way to print a previous layout (layout.again to different layout)? smacleod Tools Development 1 24th April 2003 21:11


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


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