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 16th March 2011, 16:16
rduncan10's Avatar
rduncan10 rduncan10 is offline
Senior Member
 
Join Date: Feb 2007
Location: Cambridge, ON Canada
Posts: 116
rduncan10 is on a distinguished road
Baan: IVc4 - DB: Oracle 10g - OS: SUSE Linux
Thumbs up Report variables don't work when Printed to Display
Baan: Baan IVc4
C/S: Server

I have a problem where some variables created in a report script don't print correctly when the user prints the report to Display (using a Screen printer). They do work when the user uses any other type of printer.

Report Script
Code:
declaration:
     extern domain tcamnt rpt.total

detail.1:
before.layout:
      if [condition is met] then
           rpt.total = rpt.total + detail.total
      endif
      lattr.print = false
"rpt.total" is then added to the "after.report" section. If printed to display, this shows $0. If printed elsewhere, it shows the correct amount.

I usually try to avoid report scripts as much as I can. I admit I don't fully understand how to handle the variables here. I've tried various declaration methods, but nothing seems to work.

Thanks,
R
Reply With Quote
Sponsored Links
  #2  
Old 16th March 2011, 16:36
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
What you show should work - I recommend setting the total to 0 in the before.program section. Second make sure that condition is set if going to screen or a printer. Then just put it in debug mode with the two different devices to see what is not executing correctly.
__________________
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 16th March 2011, 18:16
rduncan10's Avatar
rduncan10 rduncan10 is offline
Senior Member
 
Join Date: Feb 2007
Location: Cambridge, ON Canada
Posts: 116
rduncan10 is on a distinguished road
Baan: IVc4 - DB: Oracle 10g - OS: SUSE Linux
Thanks

Thanks. Your suggestion about before.program pointed me in the right direction.

I forgot to show this in my sample, but I was resetting the variable in a "before.field" section. I had forgotten that this is fired whenever a new page is encountered. Our normal screen printer only shows a few lines, so new pages are encountered a lot.

I just put "if lattr.break then...endif" around the code that resets the variables and it works.

As I said, I usually try to avoid report scripts, so I forget these things.
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
Page x of y: Kevin Brock's solution. ~Vamsi Code & Utilities 4 5th January 2006 11:08
SQL query, variables, report Dogman Tools Development 4 1st November 2005 13:00
How to display time in report? Svetlana Tools Development 9 17th February 2003 06:57
report script to display messages then exit ltannous Tools Development 11 17th January 2003 23:22
Check Report Printed not allowed gilforum Manufacturing & Supply Chain 7 9th September 2002 09:37


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


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