mj vdb
asked on
Week numbers and summaries
We want to get the salary status per week number. The user enters the 'year' and the 'until week number'. Crystal Reports works with an excel sheet with payment dates and salary amounts. So far, we have been able to get the week numbers and summaries for the desired 'week range', but we don't get every week number.
Example:
If the user enters '2015' and 'until week number 29', he should get:
-29 weeks (1 to 29)
-Per week number either 'the sum of the salary amounts' or '0'.
The null is required when nothing was earned in a specific week number. In such a case, the excel sheet is useless and the null should be created and combined with the specific week number.
How do we get 'a week number and a null' if the week number ended up with nothing?
We thank you,
Mike ea
Example:
If the user enters '2015' and 'until week number 29', he should get:
-29 weeks (1 to 29)
-Per week number either 'the sum of the salary amounts' or '0'.
The null is required when nothing was earned in a specific week number. In such a case, the excel sheet is useless and the null should be created and combined with the specific week number.
How do we get 'a week number and a null' if the week number ended up with nothing?
We thank you,
Mike ea
Create a table (or in your case, an Excel named range) with one row per week.
Do an Outer join from that table to the salaries table.
Do an Outer join from that table to the salaries table.
ASKER
Thanks. We specifically didn't expect a tailored sheet. On the long term the approaches may be put into the equation, but they won't make it at this stage. For now, the end user can't enhance the source and the setup can't be changed as well.
Specs:
-Fixed source with columns 'date of payment' and 'salary amount'.
-End user enters 'year' and 'until week number'.
-Crystal goal: show the result (salary sum or null) for each week number. Ytd etc are not required.
W're looking forward to the advices as to how we have to design this in Crystal.
Mike ea
Specs:
-Fixed source with columns 'date of payment' and 'salary amount'.
-End user enters 'year' and 'until week number'.
-Crystal goal: show the result (salary sum or null) for each week number. Ytd etc are not required.
W're looking forward to the advices as to how we have to design this in Crystal.
Mike ea
What is your input source?
Is it a database?
Can you provide sample data?
Doesn't need to be real just typical.
mlmcc
Is it a database?
Can you provide sample data?
Doesn't need to be real just typical.
mlmcc
ASKER
The excel source we use represents the version the end user has to work with.
The sample shows how basic it is.
Mike ea
sample-source.jpg
The sample shows how basic it is.
Mike ea
sample-source.jpg
Is this what you want. It uses IdoMillet's idea of a date table
mlmcc
Salary-by-Week.rpt
salary-by-week.xls
mlmcc
Salary-by-Week.rpt
salary-by-week.xls
ASKER
Salary-by-Week.rpt:
A) We look for column-2 'Week Number' and column-3 ' Salary for Week' , but they have to be changed.
The issues:
-Example1: column-2 shows two entries for week number 1 and we want one entry per week number.
-Example2: next to week number 4 the cell in column-3 needs to show '0.00'. In fact, for any week number without salary we want to see a '0.00' in column-3. Week numbers without salary / week numbers with '0.00' are not part of the excel source: Crystal has to deal with this on its own.
B) Column-4: there is something going on with the running total, but the case doesn't need it.
In short: when a week number has no salary we want Crystal to generate the number '0.00' in column-3 by itself.
Mike ea
A) We look for column-2 'Week Number' and column-3 ' Salary for Week' , but they have to be changed.
The issues:
-Example1: column-2 shows two entries for week number 1 and we want one entry per week number.
-Example2: next to week number 4 the cell in column-3 needs to show '0.00'. In fact, for any week number without salary we want to see a '0.00' in column-3. Week numbers without salary / week numbers with '0.00' are not part of the excel source: Crystal has to deal with this on its own.
B) Column-4: there is something going on with the running total, but the case doesn't need it.
In short: when a week number has no salary we want Crystal to generate the number '0.00' in column-3 by itself.
Mike ea
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
done
See attached example.
TJ
YTDsalary.xlsx