Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Default a parameter date to today's date in Crystal Enterprise

Posted on 2005-04-26
12
Medium Priority
?
554 Views
Last Modified: 2012-05-05
My report was on crystal 10.  I have it posted in the intranet via Crystal Enterprise.  When I run in Crystal 10, I can leave the date parameter blank and it defaults to today's date.   But that does not work in Crystal enterprise.  How can I have it default to today's date in Crystal enterprise?
0
Comment
Question by:Laura Munilla
  • 3
  • 3
  • 3
  • +2
11 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 13866722
What happens if you give it a default value of Today() or Now() in the report?

This may help
http://support.businessobjects.com/library/kbase/articles/c2016954.asp

mlmcc
0
 
LVL 42

Expert Comment

by:frodoman
ID: 13866792
Unfortunately you're going to need to modify your select expert formula to take this into consideration.  Something like this:

if {?DateParam} = '' then
   {table.field} = today()
else
   {table.field} = {?DateParam}

As far as I know there's no way to have CE default to the current date.  There are some 3rd party tools out there that let you use dynamic parameters, but I've never used any of them personally.

0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 13867278
frodoman's right, you will need to modify the record selection, but not in that manner.  Even if you modify the criteria to allow for  blank parameters, it will still bomb in CE.  CE doesn't like blank parameters unless you explicity make the NULLS.  Here are the steps I'd recommend:

1)  Modify the selection criteria of the report to be the following:

(
If
  {?DateParam} = #01/01/1900#
Then
  {table.field} = CurrentDate
Else If
  {?DateParam} <> #01/01/1900#
Then
  {table.field} = {?DateParam}
)

2)  Set the default parameter value in Crystal Enterprise to '01/01/1900' <Date(1900,01,01)>

In Crystal Enterprise, this will force the report to default to the Current Date unless another parameter value is specified.

~Kurt

~Kurt
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 

Author Comment

by:Laura Munilla
ID: 13888409
Thanks
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 13888995
I object to the points awarded in this case.  Lmunilla, how did mlmcc's solution answer the question you asked?

~Kurt
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 13891310
frodoman didn't suggest any such thing - what he said was "As far as I know there's no way to have CE default to the current date."

That is true, there isn't any way for it to default to the current date.  In order to do that, you must assign a dummy date value as the default within CE and then handle it within the record selection criteria of the report.

~Kurt
0
 
LVL 42

Expert Comment

by:frodoman
ID: 13894307
I don't care much about the points, but in the interest of leaving this PAQ here I believe the accepted answer should be mine and/or Kurt's.  You cannot use today() / now() as defaults in CE so that will not solve the problem.

frodoman
0
 

Author Comment

by:Laura Munilla
ID: 13904627
I accepted that answer as I believed the right answer right now (for what I need to do) is "You can't do it".  If this is incorrect, then, I'll like to reopen the question as Mlmcc suggested.

What I want is for  CE to list todays date in the parameter field as a default.  The user can change this to another date.- if they wish.  I have no issue filtering the data in the report to output up to today's date.  As a matter of fact, it is irrelevant for my data, cause there is no future information.  The latest info is the current date.  If there is a way to have Crystal Enterprise LIST today's date and have that change every day, then please reopen the case.

Thanks allof you for trying to get me the RIGHT answer.   :)
0
 
LVL 42

Expert Comment

by:frodoman
ID: 13905102
Lmunilla,

Unfortunately the correct answer is that you cannot do it - CE simply doesn't support that function.  As I said (and rhinok gave details), your best bet is to create a parameter selection (whether it's 1/1/1900 as Kurt suggested or something else doesn't matter) and then have your report treat that value as the current date.

Hope that helps,

frodoman
0
 

Author Comment

by:Laura Munilla
ID: 13906291
Thanks.  
0
 

Expert Comment

by:cgrimes_techmd
ID: 26547552
This saved me a lot of hours researching this as one would assume you could do it.  Although the paramter when you view it will show "1900/01/01"  the data value for the report will change.  Its unfortunate but at least the report works.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question