Board index » delphi » Problem With Shared Variable in Crystal Report !!
Ronny Widjaja
![]() Delphi Developer |
Problem With Shared Variable in Crystal Report !!2003-11-19 02:28:02 AM delphi114 I use statement like this : WhilePrintingRecords; shared currencyvar MyTotal := Sum({ITEM.PRICE}) to get a total from one subreport back to the main report. And this code is do a good job. But when i show the report, something like this happen : Item Price Ruler $4 Pencil $2 ============ Total $6 No Data Show ============ Total $6 If my subreport will show 2 detail with the second detail got no record, but the value from total could not set to zero again. So how to init this shared variable become zero for the first time before enter into calculation ?? Thanx Ronny Widjaja |