Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Integration / Customization
S3 Customization/Development
Script to email report from custom program - report incomplete
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Lisa Powell
Past 24 Hours:
1
Prev. 24 Hours:
0
Overall:
5163
People Online:
Visitors:
283
Members:
0
Total:
283
Online Now:
New Topics
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1348
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
S3 Customization/Development
Script to email report from custom program - report incomplete
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
AnnH
Basic Member
Posts: 7
3/27/2014 2:08 PM
Emailing a report from a custom program but the report is incomplete even though the script call is at the very end. I need to close the report file manually but CLOSE REPORT-FILE returns compile error. We have gotten by this in scheduled jobs by calling the script from a token but this report is processed on demand and I can't tie a token to it as the user may process the job under another name. Is there a Lawson API that will clear the report buffer and close the report? Thanks, Ann
jaherb
Veteran Member
Posts: 164
3/27/2014 2:40 PM
I had to do something like this a long time ago and do not have the specific example. However the way I handled this was to create a secondary print file, where I directed the report print lines to. Using this method you need to manually open and close this file. After this secondary print file is closed then you should be able to run your script to email it out.
AnnH
Basic Member
Posts: 7
3/27/2014 2:51 PM
Thanks, I may try that, it sounds like something I may have done in the past. I know I dealt with this at another location and I hate that I can't remember what I did...!
jaherb
Veteran Member
Posts: 164
3/27/2014 3:18 PM
Yes... I can't recall all the detail, but I know it works. I need to create an actual example and keep it on hand, rather than trying to figure it out each time. The notes I have on it are as follows...
To create a secondary print file, to eliminate the banner page when printing special forms, you will need to do the following:
In workdef, define your new file with File Record = "Yes" and File Media = "Printer". Define the record as 132 bytes in length.
In the PD, add an open statement for the new print file. The open should be located prior to performing the routine that will write to the new file. Also add a close statement just after that same routine.
In the .rpt, add a $PRINTFILE parameter, followed by the print file name, just after the $REPORT card for the report you are creating.
By doing this, you will create two print files, both will be visible in the print manager. PA330 makes use of this function and can be referenced as an example.
You are not authorized to post a reply.