Showing posts with label along. Show all posts
Showing posts with label along. Show all posts

Thursday, March 22, 2012

Date Parameter and text box question

I have a report that runs transcripts for people. I have a date parameter setup along with last and first name. The date parameter field is used to specify what year (ex. 1/1/2006 - 12/31/2006) to pull the information for.

Now..I have a text box at the bottom (Footer) of my report that says something to the affect of "Official transcripts for 2006". There will be times when I have to run the report using a different year other then "2006" in the date parameter field. How do I have the text at the bottom change to reflect the year I'm reporting on? If I use dates say in 2004 I need the text at the bottom to reflect that year and not 2006. Can this be accomplished?

Thx,

Bill

Sounds like you need to parse the parameter value (Parameters!ParameterName.Value) to get to the year portion. You can add a code-behind VB.NET function to help with this as demonstrated at the beginning of this article.|||

="Official transcripts for 2006" & Parameters!YourDateParameterName.Value

Try this. . .

Sunday, March 11, 2012

Date formatting problem

I have a crystal report that is populated by the results of a SQL stored procedure. The data returned is grouped by year and this appears along the x axis of the chart. The problem is that it sees the years as numbers and changes them to 2,000 2,001 2,002 etc. I have tried defining them as dates in the stored proc but this makes no difference and the chart options >grid >group axis does not allow me to alter the numbers category to date as it is greyed out.

Does anyone know how I can display these dates correctly.

Thanks for any help in advance.Try formatting the field to show without the comma.

Example in CR 8.5 using RDC... Right-click on the field and click Format, there's a tab called Date/Time or Number or something like that.|||I am also having this problem, expect I have used a formula field to combine two date fields to give me a date range (February 15-20, 2004), but I am getting February 15.00-20.00, 2,004.00. I can't change the formatting since the formula field is a string. Any suggestions?|||Try changing the default Number Format. In CR 8.5 using RDC, right-click to bring up the menu, Click Designer, Default Settings. Click the Fields tab. Click the Number button. This will allow you to set the default format for the Crystal Reports Program, not just the report you're working on.