DataItem Name ----------------------------------------------- Sales Invoice Header <Sales Invoice Header> Sales Invoice Line SIL_Tax_1 Sales Invoice Line SIL_Tax_2 Sales Invoice Line SIL_Tax_3 Sales Invoice Line SIL_Tax_4 Sales Invoice Line SIL_OtherI am using SIL_Tax_1, SIL_Tax_2, SIL_Tax_3, SIL_Tax_4 for calculating the VAT Amount Totals of 4 different VAT percentages say 0%, 10.50%, 21%, 27% respectively. I need to show only the totals of the available percentages in Sales Invoice Line in the text file.
1st record: 0% 2nd record: 21% 3rd record: 0% 4th record: 21% 5th record: 0% 6th record: 0%I need to add the VAT Amount of 0% and 21 % and show only those 2 lines in the text file and not for 10.5% and 27%. Currently I am getting a blank line for 10.5 % and 27% and those blank lines should be removed in the text file.
Answers
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I gave conditions also like..
if SIL_Tax_1."vat %" <> 21 then
currdataport.break;
It is not working
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Is it posible these blank lines come form the DataItemSeparator property?
If yes, either modify the property and possibly write seperators to the file yourself as you need, or else modify the dataitem structure to match seperators and calculate VAT sums in your own C/AL loops.
if "your condition" then begin
..do stuff..
end else begin
CurrDataport.SKIP; //instead of BREAK
end;
are you exporting or importing?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks,
Aravindh
I found the solution for this issue and just wanted to share with you all that what I did. It is working fine in my case.
I wrote the following code in OnPreDataItem() of SIL_Tax_1, SIL_Tax_2, SIL_Tax_3 and SIL_Tax_4. Since the VAT % always remain sme in my case, I just hardcoded.
Thanks you all..
Aravindh