Calculated fields creating problems
anithegregorian
India
Normally, calculated fields are the best way to place the calculations related to various fields like qty * rate = amount then I can set amount field as calculated and write an event in OnCalculateField.
This is OK and works fine in Master/Detail datasets. For group reports I have no option but to create a query object with an inner join and retrieve the data from the query with an ORDER BY clause. Opposed to what happens in Master/Details calculated fields ie. calculated fields are evaluated and shown in report, but in query calculated fields are totally dis-regarded ie. all the calculated fields appear as zero (0) even when the original database has the calculated totals. I don't think that this is an issue with FreeReports or even FastReports 4. Before signing off just one question if I need to show the calculated values then what should I do?
This is OK and works fine in Master/Detail datasets. For group reports I have no option but to create a query object with an inner join and retrieve the data from the query with an ORDER BY clause. Opposed to what happens in Master/Details calculated fields ie. calculated fields are evaluated and shown in report, but in query calculated fields are totally dis-regarded ie. all the calculated fields appear as zero (0) even when the original database has the calculated totals. I don't think that this is an issue with FreeReports or even FastReports 4. Before signing off just one question if I need to show the calculated values then what should I do?
Comments
Dont Use amount (Calculated field) , Use a total filed and use [ToDouble([qty]* * [rate])]