Set Default Current date in parameter fields Crystal Report - crystal-reports

I have a problem with Crytal Report (CR) 2013, my customer want to default current date in parameter fields in Crytal Report when they open it. I try to do it with many ways but it not work. i'm looking forward to ur help. Tks all.
Current form

The only way I know to set a current date to a report parameter is by adding your report as a subreport and passing a formula returning current date as a source for the parameter. You may add also a parameter for date in the main report and inside the formula check if the provided value is for example 1/1/1900 then use current date. This will work if you do not have subreports in your report ( Crystal does not support nested subreports) and the user should be aware that date 1/1/1900 should be selected for current date.
Generally speaking default values should be handled by the software , which is running the report. Ask your customer to try application like this one: http://www.r-tag.com/Pages/CommunityEdition.aspx.
I am posting the link because this software is free. My guess is that there are other applications , which are able to set default values for report parameters. You can do your research. Here is a sample video setting a default value for date: http://www.r-tag.com/Pages/Preview_ParameterTemplates.aspx
The video is for different report type, but Crystal reports will be handled in the same way.

I am a colleage of Hai Pham. I give you more information about this issue.
1. datasource: stored procedure
2. set current date is default value in import parameters popup
popup image
3. users can select another value
Thanks,
Dai Nguyen Quang.

Related

Crystal Reports: Set date parameter value to calculation without using a sub-report?

Is it possible to set the value of a command parameter to a date calculation i.e 2 months from the date run without putting it in a sub-report and passing the values from a main report?
You can do this either using a subreport or in the calling application. No other way. You can check this video to see how it works in an application:
http://www.r-tag.com/Pages/Preview_RTagAndBOE.aspx
Jump directly to 2:12 or select "Parameter templates" in the menu. This software has a free version, which supports the default values so if changing the application is an option for you go and get it from here:
http://www.r-tag.com/Pages/CommunityEdition.aspx
If you developed your own application you can implement similar interface.

Using Crystal Reports year to date

I am relatively new to using Crystal Reports. I am pulling the correct information from my database however I need to only pull the information from the beginning of the month to the current date, i.e. 09/01/2013 - 09/23/2013. Could anyone give me a snipit of code on how that would look.
Much appreciated.
The best way is you need to filter the data before it is populated on reports i.e. filtering the query itself. The other option is to create new parameter for the selected field and passing the value on runtime.
http://www.codeproject.com/Articles/205398/Crystal-Report-Filtering-Using-Selection-Parameter
In below figure you can add the records selection on the required field and add the condition similarly

Date format on input control

I'm using iReport 4.6.0 and JasperReports Server 4.5.0. I've created a report where I want to pass a date value to a MySQL database. I've created a parameter and used java.util.Date class. On the input control, I set it to a single value type, and the date data type. When running the report in iReport (using Preview), I'm prompted to select a date, and it generates the report using the specified date. After deploying the report to the JasperReports Server, when I'm prompted to enter a date, I get an empty report. I noticed the date format is different on the input control on the server (YYYY-MM-DD) than the one when previewing the report in iReport (MM/DD/YYYY). Is there any way to fix this?
I agree with mdahlman. The formatting of the input control shouldn't be a problem. It should be passing a valid date value to the report.
Make sure that the name of the input control (not the label) exactly matches the name of your parameter. And it is case sensitive. If they are not identical, this could be your problem.

SSRS Report Subscription Parameters (Date Values)

I am looking to setup a report subscription in SSRS 2008 R2 where the client user can set the date parameter to whatever the individual user would like. I have been reading multiple suggestions to use =Today() in the parameters but this syntax does not work for me. Does anyone know whether is is possible to set my from date to "Today -30 days" and my to date to "today"? What is the syntax used in the subscription parameters?
Settings:
Error:
As described in the above link provided by praveen the solution became to create two parameters in the report containing integer values with a label that describes the periods i would like to use in my subscription. These parameters can easily be set to "Hidden" so they are not showing when you would like to run the report by hand. I also chose to set the default value for both parameters to 1 which is my value for Today(). This mean my report will start out with having today's date selected in both of the visible date parameters.
In the two date parameters that are shown in the report you can then set the default value to a switch of the values you are able to pick in your hidden date parameters. You can now setup a subscription that will work and that looks like the following:

Parameters and Ranges of Values

I need to create a report in Crystal 2008 and I've haven't developed a report using Crystal in many years.
When the user runs the report, I want them to be able to enter a start date and end date. I assume I can do this by using parameters. My question is this. Can I do this with a single parameter value or will it require two parameter values? Ideally what I would like to do is to allow the user to enter a start and end date in one parameter/prompt combination. Is this possible?
Thanks - Randy
This is possible and what your talking about is a ranged parameter value.
Create an parameter in Crystal Reports
set the type to Date
In the options Area. you will see a option called Allow range values. Set this to true.