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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar Style Report

Status
Not open for further replies.

BryanLane

Technical User
Apr 28, 2008
52
US
I have created a vacation calendar using the "Create a calendar-style report" document by LBass. This is a very handy report. I used this report for 2009 data and it worked flawlessly.

My question is: How do I roll it forward for the new year?

I have updated the Calendar.xls file so that the dates are now 2010 days and I have a new TimeOff.xls that lists all the time off for employees for 2010. When I refresh the report the calendar pages all show 2010 and are correctly laid out with the correct start day for each month, but there is no data showing up on any day.

Drilling down to any of the subreports for a day and then using Browse Data shows 2010 dates so I know the subreports are looking at the right data set as well.

"The problems we face today cannot be solved by the minds that created them."
--Albert Einstein
 
Can you please post the subreport selection formula for one of the days of the week where you expect to see data? Drill into the subreport->report->selection formula->record.

-LB
 
As soon as I read your response I realized where the "problem" was. Each day was hardwired with the date as 2009. When I change them to 2010 it worked flawlessly.

Here is Monday's selection criteria:

{@WeekNumber} = {?Pm-@WeekNumber} and
Year({TimeOff_.Date}) = 2009 and
DayOfWeek({TimeOff_.Date}) = 2 and
{timeoff_.Leave Type} <> "Holiday"

I have the ignore Holiday clause ({timeoff_.Leave Type} <> "Holiday"
) in there so that it does not list every employee as an individual line for the holiday days.

In my Main report I have a parameter for Year, but I did not pass that through to the subreports (because I did not know how). So I guess the next part of my Crystal education is learning how to pass parameters from Main to Sub.

Thank you for pointing me in the right direction (again).

Bryan

"The problems we face today cannot be solved by the minds that created them."
--Albert Einstein
 
You can create the same parameter in each subreport and then in the main report->edit->subreport links, move the parameter to the right and in the lower left use the dropdown to select {?Year}, not the default {?pm-?Year}. In each subreport, replace the hard-coded year with the parameter.

-LB
 
Perfect. I just added the parameter to each subreport, updated the selection criteria and then handled the subreport links.

Now I am good to go for this year and future years...and I learned how to pass parameters.

Thank you very much for helping me out and increasing my Crystal knowledge.

Bryan



"The problems we face today cannot be solved by the minds that created them."
--Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top