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:
JVENGLEy
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5209
People Online:
Visitors:
260
Members:
0
Total:
260
Online Now:
New Topics
Lawson Add-Ins for Microsoft Office
Deleting an Orphan Time Record with MS Add-ins
12/13/2025 7:26 PM
I have discovered an Orphan Time Record when dumpi
Lawson S3 HR/Payroll/Benefits
Secure 2.0
12/8/2025 9:06 PM
Has anyone using S3 V10 for Benefits been able to
Lawson Add-Ins for Microsoft Office
More.... ic81.2
12/5/2025 10:51 PM
We build our PAR's with MS Addins using IC81 a
Lawson Add-Ins for Microsoft Office
Uploads
11/20/2025 3:32 AM
The Next button has stopped functioning on the upl
S3 Systems Administration
Lawson Security Admin (LSA) - Securing Print Manager to self only
10/24/2025 6:27 PM
Looking for someone who would be willing to share
Lawson Add-Ins for Microsoft Office
Lawson Add-in
9/30/2025 6:51 PM
I am looking for a Lawson Add-ins query to add new
Lawson S3 Procurement
Anyone getting PO 0000 not found for company error in PO23?
9/30/2025 2:45 AM
Anyone getting PO 0000 not found for company error
Lawson Add-Ins for Microsoft Office
PO20 - Cancel PO via Add-in
9/25/2025 8:03 PM
Is it possible to cancel PO's using add-ins? I
S3 Systems Administration
S3 Payroll - PayStubs
9/18/2025 6:58 PM
Looking for a reliable solution to streamline the
S3 Systems Administration
Quick Access report
8/25/2025 7:17 PM
Looking for a good way to see who has access Lawso
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1377
Roger French
1315
mark.cook
1244
Chesca
1042
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Integration / Customization
S3 Customization/Development
Script to email report from custom program - report incomplete
Please
login
to post a reply.
3 Replies
0
Subscribed to this topic
18 Subscribed to this forum
Sort:
Oldest First
Most Recent First
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
New Poster
Congrats on posting!
3/27/2014 2:40 PM
Split
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
Split
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
New Poster
Congrats on posting!
3/27/2014 3:18 PM
Split
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.
Please
login
to post a reply.