Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rows for Months with No data

Status
Not open for further replies.

nugget5

Programmer
Feb 1, 2007
8
US
I am creating a report that shows monthly totals for users. The view that is supplying the data has monthly aggregation done. The problem I am encountering is if a user did not work in a certain month there is not a row for that month. Is there a way I can display a row that would show zero data instead of having the month skipped over in the report. This is in Crystal 8, any help is greatly appreciated.

Bsmith
Work Days Out of # Out
Days Bal. Bal. of Bal.
Feb-07 20 18 $6.35 2
Jan-07 15 15 $0.00 0
Dec-06 10 9 ($7.25) 1
Oct-06 22 20 $51.36 2
Sep-06 15 15 $0.00 0

JJones
Work Days Out of # Out
Days Bal. Bal. of Bal.
Feb-07 20 17 $10.54 3
Jan-07 15 15 $0.00 0
Dec-06 10 9 ($7.25) 1
Nov-06 14 14 $0.00 0
Sep-06 15 11 $0.36 4

thanks
 
Create a table with ALL the dates in it, and link that table to the one you are currently using. Use the date from the newly created table rather than the date from the work performed table.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"A fine is a tax for doing wrong. A tax is a fine for doing well.
" - unknown
 
I do not know what the dates to be put in a table. I only want the last 12 months.
 
If you do a table of months, this could include past and future months, for general use. For the report, you select on this table, maybe using
Code:
DateDiff("m", {Table.Date}, currentdate) in [0 to 12]

This assumes you have a date with your month record, maybe the first of the month.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Ok, I have added a table that has the dates in it. But now when the tables are joined the userid field is null for months that do not have data, so when the report is grouped by userid it still will not show months for that user that they have not worked.
 
Then use a formula field:
Code:
if isnull({userid}) then "No User ID" else {userid}

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Yes, that takes care of the rows that have a null userid, but it still does not show rows for each user for each month, whether they had any activity or not.
 
is there a way to do this without creating another table for dates.
Thanks,
Kavitha.
 
You can always use running totals where you use an evaluation formula specific to the month, as in:

month({table.date}) = 2

Reset on change of user. Place these in the user group footer.

-LB
 
the prob is i am trying to create a report which shows particular months salary by pay group along with year to date salary on same line. some times i have a group which is not paid for the month. some where i am going wrong with my report
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top