Hi, I am using crystal 8.5 on XP professional. I writing a commission report for photographers where the main reports date parameter is on "post_date" and the sub report is on "date_shot" to show how many days they worked in the past two weeks (pay period) with the main report showing posted sales in same two week period. I am grouping both the main and sub reports by photographer and they would like to be able to divide the "Total Sales" by the number of days worked. To get the number of days worked in the sub report I am using the following formulas:
this formula is in the sub-report report header:
whileprintingrecords;
shared numbervar DW;
DW = 0
this formula is in the sub-report detail section:
whileprintingrecords;
shared numbervar DW;
If (onFirstRecord or ({AXS_PHOTO_CATALOG.TAKEN_DATETIME})<>Previous({AXS_PHOTO_CATALOG.TAKEN_DATETIME}))
then DW:= DW + 1
this formula is in sub-report GF1 (grouped on Photographer):
whileprintingrecords;
shared numbervar DW;
DW
This works great for passing a total to the main report but, I want to have it reset for each photographer. The sub-report is in the Photographer group footer in the main report.
any ideas would be welcome. Thanks, Rob
this formula is in the sub-report report header:
whileprintingrecords;
shared numbervar DW;
DW = 0
this formula is in the sub-report detail section:
whileprintingrecords;
shared numbervar DW;
If (onFirstRecord or ({AXS_PHOTO_CATALOG.TAKEN_DATETIME})<>Previous({AXS_PHOTO_CATALOG.TAKEN_DATETIME}))
then DW:= DW + 1
this formula is in sub-report GF1 (grouped on Photographer):
whileprintingrecords;
shared numbervar DW;
DW
This works great for passing a total to the main report but, I want to have it reset for each photographer. The sub-report is in the Photographer group footer in the main report.
any ideas would be welcome. Thanks, Rob