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.

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
mj vdbAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MouseCaptainHelp Desk AnalystCommented:
Sounds like your data range has two colums: Date and SalaryPaid.  You'll need add two additional calculated columns: one to concatenate a unique identifyer using year and week number.  And the other using cumulative addition which resets at the beginning of each year (previous row's YTD + current row's payment, with a condition based on whether year is same as prior row) to calculate salary paid YearToDate.

See attached example.

Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
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.
mj vdbAuthor Commented:
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.

-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
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

What is your input source?

Is it a database?

Can you provide sample data?
Doesn't need to be real just typical.

mj vdbAuthor Commented:
The excel source we use represents the version the end user has to work with.
The sample shows how basic it is.

Mike ea
Is this what you want.  It uses IdoMillet's idea of a date table

mj vdbAuthor Commented:

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
Is this what you need?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mj vdbAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.