HEY!
Let's milu, try to finish your never ending issue.
Currently I can not work for a 40-60 minutes, because our partner's remote terminal server had to be re-started, so I have a bit of time for you - and I hope, I will have patience enough too.
As I had read your posts and exchanged some private message, I tried to reconstruct your issue - along your 7 threads on the single issue:
total on Line number
Select and fetch next
Fetch next
Custom level break logic on line number-call a section
custom-level break on kine number-
urgent
workfile creation-
urgent
Workfile creation
Let's go...
S1.) You have a report section, based on F4211.
Am I right?
S2.) You wanted a total on line number, but based it on only the integer part.
I helped you to solve this, suggesting:
[ QUOTE ]
1.) Make your detail section invisible.
2.) Set the desired sequencing on the section and make Level Break everything in sequencing down to Line Number - including Line Number too of course.
3.) Create a Level Break Footer section on Line Number.
4.) Place aggregate Totals for Units and Price on the footer section.
5.) Place additional fields on that section, what is required for you to display on the report.
6.)In the Before Level Break event of the detail section add the following ER line:
BC Line Number (F4211) = floor([BC Line Number (F4211)])
in the assignment you have to go to the Expression Manager on the right side and select the floor function from the General category (right bottom pane).
6.) In the Do Section event of the Level Break Footer section fill the fields with the appropriate PC (Previous Column) values - exept for the total fields.
[/ QUOTE ]
Though, you have never confirmed in your
original thread, whether does it work or does not.
This issue had been solved.
Am I right?
S3.) You wasn't able to fetch from F4074 to F4211 (nice, long thread
)
The problem was simply, that you fetched F4074 with the truncated Line Number value, as key.
Am I right?
S4.) You would like to fetch F4074 for each F4211 and accumulate a price field from F4074 on the footer section of floor(LineNumber) level break.
Am I right?
============
Now, you included into your original issue the work file creation, record insert, update, delete and table triggers.
If I understood your original issue - then forget them (for a while at least, please) and do the following.
=============
A.) Accomplish the "Before Level Break" trick, as I suggested.
B.) Define a report scope ER variable, based on LNID. Let's name it "rpt_mnLineNumberOriginal_LNID
C.) Enhance the very complicated
ER code in the Before Level Break event the following way:
rpt_mnLineNumberOriginal_LNID = BC Line Number (F4211)
BC Line Number (F4211) = floor([BC Line Number (F4211)])
D.) Place an appropriate numeric Report Variable (RV) for your price onto the detail section (RV Price).
E.) Modify your select in your previously published code in the Do Section event of the detail section.
IF BC Line type = 'CN"
F4074.Select
BC Document (Order No, Invoice, etc.) (F4211) = TK Document (Order No, Invoice, etc.)
BC Order Type (F4211) = TK Order Type
BC Order Company (Order Number) (F4211) = TK Order Company (Order Number)
rpt_mnLineNumberOriginal_LNID = TK Line Number
VA rpt_F4074PriceAdjustmentType = TK Price Adjustment Name
F4074.Fetch Next
RV Price <- TK Amount - Price per Unit
else
RV Price = BC Amount _extende(F4211)
F.) (as Finally
) Place an aggregate Total on RV Price onto your Level Break Footer section.
====================================
At last but not least, let us know how does it work BUT PLEASE, not in an other thread again! THANKS!
Good luck,
Zoltán