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!

Date Range String

Status
Not open for further replies.

darran6

Programmer
May 12, 2005
38
GB
Environment: Crystal Reports Developer XI R1 (+ Crystal Reports Server XI R1)

Many of our sales reports allow the user to choose a time period (either a number of months or pre-set values like year-to-date, etc.).

I have a set of repository custom functions that build a date string (e.g. "November 2005 to March 2006") which is displayed at the top of the report.

The problem is that I make use of CurrentDate to create these strings, and so if the user looks at the report 3 months later, then the date string will have changed (e.g. "February 2006 to June 2006"), which is obviously incorrect.

Obviously I need to use DataDate, but Crystal won't let me use this in a custom function.

Does anyone know how to create a (repository) custom function to display date strings that doesn't use the current date?

Many thanks,
Darran
 
the user looks at the report 3 months later

Why not export the report for future look-ups? Word, Excel or PDF (which has a free reader).

Crystal does also have Data Date and Print Date among its special functions - at least it has from version 8.5 onwards. But I'd have thought an export was the right answer.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Madawc,

We're trying to use the Crystal Report Server as the place to hold monthly/weekly/daily/on demand reports rather than emailing them to mulitple users who then store them in all sorts of locations.

Some of our reports are already produced in PDF format, but others need to be maintained in Crystal format to preserve drill-down functionality, etc.

I was hoping to be able to produce a repository function that can easily be used in multiple reports.

Cheers,
Darran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top