For report with Export to Excel option, I need to show one field i.e.,Cost field different from that of the print preview report. The condition is if the level=1 then the values should be displayed in the Cost field same as in the print preview of the report and if the level= 2, then in the excel file the cost should not show any values for that field, it should display only zeros, that i did it, in OnPresection of that respective header, like if level=1 then ExporttoExcel(rowno,FORMAT(cost)), this is working fine.
For the same Cost Field, i have to display total of cost field, that should be different from that of the Printpreview report because if level=1 then cost may have different values and level=2 then cost =0,but my report is showing cost value in excel file same as print preview of the report. what condition should i include? please help me. can any one advice how to do it?
0
Comments
Put the different number in a different column, then just add a standard Excel =SUM(A1:F15) type function at the end.
Thank you for your prompt reply. I didn't get you what u replied. Could u please explain me in detail. Is the SUM allowed in navision?
ExcelBuffer.formula := strsubstno('sum(J%1:J%2)',StartRow,Endrow);