View previous topic :: View next topic |
Author |
Message |
jmateo Beginner
Joined: 17 Feb 2006 Posts: 4 Topics: 1 Location: Toronto
|
Posted: Fri Feb 17, 2006 11:42 am Post subject: Suppress quantitative fields in an Easytrieve report |
|
|
Hi,
I am writing a report with 2 different input files where the relationship is many-to-one (transaction vs. master). I wanted to make a report from both files where the fields from the master will be printed once only while the transaction fields always should be printed.
My fields from the master file are quantitative with 2 decimal places which cannot be used in CONTROL statement.
Hoping for an Easytrieve solution.
Regards,
Joseph |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Feb 17, 2006 12:05 pm Post subject: |
|
|
jmateo,
A sample input and desired output will be helpful.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
jmateo Beginner
Joined: 17 Feb 2006 Posts: 4 Topics: 1 Location: Toronto
|
Posted: Fri Feb 17, 2006 2:55 pm Post subject: Suppress quantitative fields in Easytrieve report |
|
|
As requested.
Code: |
Masterfile
MS-ACCOUNT-NUMBER 01 06 P
MS-GROUP 07 06 P
MS-BALANCE 13 06 P 2
MS-AMT1 19 06 P 2
MS-AMT2 25 06 P 2
Transaction File
TX-ACCOUNT-NUMBER 01 06 P
TX-TRAN-ID 07 02 A
TX-AMT1 09 06 P 2
TX-AMT2 15 06 P 2
Desired (SORTED BY MS-GROUP)
LINE 1 MS-ACCOUNT-NUMBER
MS-BALANCE
MS-AMT1
MS-AMT2
LINE 2 TX-TRAN-ID
TX-AMT1
TX-AMT2
Sample Output
ACCOUNT/ MS-BALANCE MS-AMT1/ MS-AMT2/
TRANID TX-AMT1 TX-AMT2
---------- -------- --------- -----------
0000000001 50.00 12.50 25.00
AA 100.00 25.00
AB 150.00 35.00
AC 100.00 25.00
0000000002 25.50 10.00 25.00
AA 125.55 25.00
AB 300.00 25.00
AC 400.00 25.00
GROUP '100' TOTAL 1175.55 160.00
0000000003 30.00 15.50 25.00
AA 125.55 25.00
AB 300.00 25.00
GROUP '200' TOTAL 325.55 50.00
|
|
|
Back to top |
|
|
jmateo Beginner
Joined: 17 Feb 2006 Posts: 4 Topics: 1 Location: Toronto
|
Posted: Tue Feb 21, 2006 5:05 pm Post subject: Suppress quantitative fields in Easytrieve report |
|
|
Hi Kolusu,
Just wondering if you got a solution to the 'suppress quantitative fields' problem.
Thanks in advance,
Joseph |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Wed Feb 22, 2006 10:34 am Post subject: |
|
|
Quote: |
Hi Kolusu,
Just wondering if you got a solution to the 'suppress quantitative fields' problem.
|
jmateo,
I never got a chance to look at your problem. You submitted your sample data late friday evening (EST) and nowadays with my busy schedule I do not wrok on solutions in the evenings. And your topic got lost in the recent topics list over the weekend.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Wed Feb 22, 2006 2:10 pm Post subject: |
|
|
I am lost here. I am not sure as to what you want here. If you don't want the decimals in your amount fields you can just move the input fields to a working storage variable defined without decimal places and use that in your report
for ex:
now define a working storage variable as follows
and let us say your input file has the 1234.56 for TX-AMT1
now if you code like this
By doing so W-TX-AMT will only have 1234. Now use this field in your report statement.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
nsoudi Beginner
Joined: 17 Feb 2006 Posts: 1 Topics: 0
|
Posted: Wed Feb 22, 2006 5:46 pm Post subject: |
|
|
Kolsu,
As per my understanding, Joseph wants to see the decimal points on the report, but problem is EasyTrieve does not allow him to use that field (with decimal point) in CONTROL statement. |
|
Back to top |
|
|
jmateo Beginner
Joined: 17 Feb 2006 Posts: 4 Topics: 1 Location: Toronto
|
Posted: Thu Feb 23, 2006 4:19 pm Post subject: |
|
|
Hi Kolusu,
Yes, NSOUDI is right, I cannot use the quatitative fields in CONTROL statement. I tried using the WS field without the decimal point in the CONTROL statement and at the same time use the real fields in my PRINT statement but does not work. For the meantime, I created an extracted file out of both transaction and master files using Eastrieve then generate the report using both PRINT statement for Master file fields and DISPLAY for transaction fields.
I am just wondering if there is a quick Easytrieve solution that I dont know yet.
Thanks a lot Kolusu for spending time on this. |
|
Back to top |
|
|
|
|