robmason10
Technical User
Synopsis:
Report is to disply MISSING time sheet entries - i.e. when an employee does not enter time for a day then the report will show it. The report is generated from a start and end date (parameters in select exp). I have an ALMOST excellent solution from the CR website (shown beloew)....however using this solution (below) it only displays where there are gaps 'mid-period' not from the ?start date or to the ?enddate. i.e. if a range is for the month of april and entries do exist for 10th and 15th the report will show 'gaps' for 11,12,13,14 and 16 but not for 1,2,3....17,18,19....etc.
anyone help me out with this one? - Thanks in advance....
Solution from CR
To display all dates in a date range even though some dates may not exist in the database, follow these steps:
1. Right click the Details section and from the fly out menu select 'Insert Section Below'. You now have a Details A section and a Details B section.
2. Place your date field into the Details A section. Right click the date field to select it and from the fly out menu select 'Format Field'.
3. From the 'Format Editor' select the 'Common' tab and then select the 'Suppress if Duplicated' check box.
4. Format the Details A section and select the 'Suppress Blank Section' check box.
5. Create a basic syntax formula similar to the following and insert it into the Details B section:
' @date
' thisdate and nextdate will be used to determine if gaps exist in the database
dim thisdate as date
dim nextdate as date
'output will be used to create the on-screen formula display
dim output as string
thisdate = {?startdate} + 1
nextdate = nextvalue({?startdate})
do while nextdate - thisdate > 0
output = output + totext(thisdate, "MM/dd/yyyy"
+ chr(10)
thisdate = thisdate + 1
loop
formula = output
' output is creating a string running total to create the dates which do not exist
' the chr(10) in output creates a new line for each new date created
6. Right click @date and from the fly out menu select 'Format Field'. From the 'Format Editor' select the 'Common' tab and then select the 'Can Grow' check box.
7. Right click the Details B section and from the fly out menu select 'Format Section'. From the 'Section Expert' select the 'Suppress Blank Section' check box.
When you preview your report, all dates display, whether or not there is any corresponding data in the database.
Report is to disply MISSING time sheet entries - i.e. when an employee does not enter time for a day then the report will show it. The report is generated from a start and end date (parameters in select exp). I have an ALMOST excellent solution from the CR website (shown beloew)....however using this solution (below) it only displays where there are gaps 'mid-period' not from the ?start date or to the ?enddate. i.e. if a range is for the month of april and entries do exist for 10th and 15th the report will show 'gaps' for 11,12,13,14 and 16 but not for 1,2,3....17,18,19....etc.
anyone help me out with this one? - Thanks in advance....
Solution from CR
To display all dates in a date range even though some dates may not exist in the database, follow these steps:
1. Right click the Details section and from the fly out menu select 'Insert Section Below'. You now have a Details A section and a Details B section.
2. Place your date field into the Details A section. Right click the date field to select it and from the fly out menu select 'Format Field'.
3. From the 'Format Editor' select the 'Common' tab and then select the 'Suppress if Duplicated' check box.
4. Format the Details A section and select the 'Suppress Blank Section' check box.
5. Create a basic syntax formula similar to the following and insert it into the Details B section:
' @date
' thisdate and nextdate will be used to determine if gaps exist in the database
dim thisdate as date
dim nextdate as date
'output will be used to create the on-screen formula display
dim output as string
thisdate = {?startdate} + 1
nextdate = nextvalue({?startdate})
do while nextdate - thisdate > 0
output = output + totext(thisdate, "MM/dd/yyyy"
thisdate = thisdate + 1
loop
formula = output
' output is creating a string running total to create the dates which do not exist
' the chr(10) in output creates a new line for each new date created
6. Right click @date and from the fly out menu select 'Format Field'. From the 'Format Editor' select the 'Common' tab and then select the 'Can Grow' check box.
7. Right click the Details B section and from the fly out menu select 'Format Section'. From the 'Section Expert' select the 'Suppress Blank Section' check box.
When you preview your report, all dates display, whether or not there is any corresponding data in the database.