|
I think we need to see a little of your coding to help, Jason. How are--
you defining your Data Structures? Are they defined internally, within
the program - or externally defined?
The following basic example works just fine for me:
DDS:
A R AAFORMAT SPACEB(1)
A 43'Test of Printer File with
D/Str Fo-
A rmats'
A SPACEB(1)
A CHARFLD 20O 21SPACEB(3)
A NUMFLD 9 2 57
RPG IV:
**Free
Dcl-F AAPrtf Printer;
Dcl-DS PrtfDS Extname('AAPRTF':'AAFORMAT':*Output);
End-Ds;
CharFld = 'First Record';
NumFld = 12345.7;
Write AAFormat PrtfDS;
*InLR = *On;
Return;
Getting sight of your code might help us to isolate your problem.
Brian.
On 20/03/2019 18:38, Jason Olson wrote:
So the last few days I've been working on creating a printed report.they
Normally I just create spreadsheets and email those, but in this
case,
wanted a printed report emailed as a PDF.field
So I created a report like normal, but as I create programs with
MAIN procedures, I needed to create data structures for each record
format in the print file. All of the fields in the print file are
reference fields except a field that will hold a total. That is
defined as a 9 byte zoned field with 2 decimal places. What is
strange is when I go to set this
to a value in my program. If I set it to a value like 0 everythingto
works normally. However, if I try to move a value into it like from
another field, I get a data decimal error. The only way I was able
to get things
work normally is if I set the field in the data structure to 0using
before
it. I haven't ran into this before, so I figured I would ask the
group if someone had seen this.
Thanks,
Jason E. Olson
IBM i Engineer/Developer
josys36@xxxxxxxxx
480.223.2952
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.