SSRS Report Subscription Parameters (Date Values) - date

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:

Related

Multiple Parameters in crystal report

I have created a crystal report layout with 3 parameter.
The 3 parameters are
1.) Date range
2.) Supplier
3.) Location code
User will always give input to the date range but will select either of these remaining two parameters based on the usage.
Is it possible to configure in one single report with optional option in Crystal layout
Assuming you are not using a very old version of Crystal, when you create or edit a parameter, look at the list of parameter properties: one of them is 'Optional Prompt' -- simply change it from the default of False to True.
Then, in your record select logic you can use the HasValue() function to check whether the user provided a value for that parameter.

Set Default Current date in parameter fields Crystal Report

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.

SSRS subscription- predefined delivery

I just want to ask if SSRS is capable of doing a predefined delivery for subscription.
If for example, I can expect a report to be emailed to me with the data from today and last 7 days ?
Below is what the fields look like.
Yes, you can either:
Using expressions, or a dataset using the necessary logic, configure the default values of a report to populate with the values you'd need
Use Data Driven subscriptions, along with a query that will return the values you'd need. See here for some information: http://technet.microsoft.com/en-us/library/ms169673.aspx
At the moment, it looks like your report simply doesn't provide any defaults, so you could use something like:
Date From
=DateAdd("d", -7, Today())
Date To
=Today()

Real time alert for JasperServer

I am having two input for dates as below & want to set alert for that
Alert:- If difference between StartDate & EndDate is more than 6 months,it must generate alert / prompt panel showing text "Month Period exceed than 6",
& report should not proceed further, untill & unless the user select dates between six months.
As far as I know you cannot configure this in JaperReports Server as is, you'd need to implement some logic around import control validation which might be rather complex given the fact that input control rendering is based on a single template and lots of configuration.
However, you can implement the desired validation easily in the report itself:
create another parameter datediff that contains as default expression the calculation of the date difference in months (the parameter needs to be specified below the 2 date parameters)
The way to utilize this information depends now on your particular report design, here an example:
extend your report query with where clause and 6>=$P{datediff}. This would only return results if the date difference is less or equal to 6 months
add the no data band to your report and add there the desired error message.
modify your report configuration for when no data to no data section.
redeploy your report to JasperReports Server.
The desired behavior is now available.

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.