Good day guys,
I have several reports generated using Crystal report with a Date Range value and I need to get the formular for the Start date and End date of the report
Several reports has been generated using Crystal Report. I have used the Minimum() and maximum() formulars to get the Start date of the range and also the end date of it. But it is only picking the start date for the two reports.
minimum({Dttable.Order_date})
I expect the Output to be that if the date range selected is
01/07/2019-31/07/2019
Output should be start date 01/07/2019
end date 31/07/2019
I got a way Around.
I had to use it as formular and not under RunningTotal
Related
I have a crystal report I run weekly and manually update the dates to pull the last 7 days (not including today). I've tried to use 'in last7days' and/or {date} >= minimum(lastfullweek) + 1
and {date} <= maximum(lastfullweek) + 1. I can't get this query to run - I get an error saying a string is required here. My date format is yyyy-mm-dd. I need to update this report to run automatically - I don't want to run the report by manually updating the date range every week. Thanks in advance for your help!
You are probably comparing a string to a date. Check the data types of the elements in your expression. Most likely your {date} column is a string rather than a date.
See if you can convert it to a date (e.g. the cDate() function).
Try R-Tag Community Edition. It is free and has the option to set the dates and other values outside the report so you don't have to hardcode them inside the report.
I created a report that calculated how many days it took a person to complete a task (datediff) and then calculated the avg. number of days it took a group of people to complete the same task (by summing the datediff and then inserting an "avg." function). The time frame used was set by using a "Start date" and "End date" parameter field.
Now, the end user is asking, "how does that average compare to last year?"
I gave a quick answer by creating a Cross tab where I made the "Start date" 01/01/2018 and the end date 12/09/2019 and then grouped by Year in the columns. That is not an exact year-to-year comparison since this is all of 2018 compared to YTD 2019.
I know there is a better way to do this. Any help is appreciated!
Each task has a unique ID, a start date, and an end date
Try using a subreport that shows the same summary data as the primary report, but for a modified set of Start and End Dates. Link the subreport using both Start Date and End Date, but subtract one year from each value. This will allow your primary report to show data for 1-1-2019 through 12-09-2019 and the subreport will show 1-1-2018 through 12-09-2018.
Here is the formula to subtract 1 year from a date.
DateAdd("yyyy", -1, {#StartDate})
You can use this formula in your selection criteria for the subreport or you can create a formula field in the subreport as well, then use that formula field in the selection criteria.
I'm not even sure how to start writing this logic. I have help desk issues in a SQL database with a create date and a resolved date columns. I'm trying to display only the records in which their create date is 14 days or less than the resolved date. Right now the report prompts for the start date and end date. Now I want to modify it. How do I write this logic and in which section of the formula builder? I'm using CR 2011 Standard.
I have a SSRS report that has typical Start Date / End Date parameters that will filter out Sales Order information based on the OrderDate field. With this report, I have a subreport. This subrebort is basically nothing more than an aggregation of the same info, by month. This aggregate information should be from the first day of the month, one year prior, through the last day of the End Date's parameters month. This does not take the main subreports Start Date parameter into consideration at all.
This is where it gets a little tricky. For example, lets say I made the start date / end date parameters on my main report:
10/15/2016 - 11/15/2016
(just remember, for this purpose, the start date is irrelevant)
I would want the subreport to show the sales totals, per month, for the ENTIRE month of December 2015 through the ENTIRE month of November 2016, even though my end date was 11/15/2016.
If I were to put in those same dates for my parameters in the report right now, for the aggregation of December 2015, I would only get sales from the 15th through the 31st. Currently I have my subreport to filter on the OrderDate by:
Fields!OrderDate.Value>= DateAdd(DateInterval.Month, -12,Parameters!EndDate.Value)
I know that this filter is not currently set up to have an end date for the parameter, just a greater than argument, which is wrong since I want the 12 month history to stop at the last day of the month for the month of my End Date parameter, but I don't know how to make that happen either.
I hope I have explained this well. Any help on this would be greatly appreciated.
You can set a filter to get only dates between a specific range in your subreport dataset, tablix and some visualizations:
In DataSet properties or Tablix Properties in the Filter tab use these settings:
In the Value textboxes you should use the expressions to calculate your date range.
StartDate
=DateSerial(Parameters!EndDate.Value.Year-1,Parameters!EndDate.Value.Month,1).AddMonths(1)
EndDate
=DateSerial(
Parameters!EndDate.Value.Year,Parameters!EndDate.Value.Month,1).AddMonths(1).AddDays(-1)
It should filter your data from 12/01/2015 to 11/30/2016 if your EndDate parameter is set to 11/15/2016
Let me know if this helps.
Im pretty new to crystal reporting ,I need a formula to to iterate through the date field.All it took is a date field as dynamic input-{?startdate}
I need the page should display 30 days/date from that dates in reports..(I got to display other data to pull in between these date fielded captions.)This is a quick requirement ,I know i should have made some investigation before posting here..Any help is greatly appreciated.Thanks!
You can do two things:
Set your date parameter to allow for range values (user enters start date and end date)
Add 30 days to the day of your chosen date datefield in [{?startdate}, DateAdd('d', 30, {?startdate})]
Hope that helps,
Chris