I have a SP in SQL that will pull data based on a start and end date. What I am trying to achieve in Crystal Reports is a way to group them by Month. most of the account only have 1 usage per month but now an again a few have more that one and I like to have crystal reports display them as a grouped total.
I think I need to make a formula that says is the date month is equal to 01 for Jan 02 for Feb, etc.
But I don't know how to write it.
any suggestions are very welcome
Adding a group for month is fairly simple in Crystal Reports - a good tutorial for an older version can be found here.
In simple steps:
Insert a group section onto your report.
Group on the date field
Select the dropdown for "this section will be printed:" and choose "for each month"
Related
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.
We're creating a report scheduling tool where user can select "monthly recurrence" and then provide day of the month that the report is generated. We're planning to use Jasper SOAP/REST APIs to trigger the report generation. Our problem is how to handle the case when user enters 29, 30 or 31? Our desired behavior would be for Jasper Server to adjust the generation date to the month end if the date does not exist for that month. For example user chooses 31, if month does not have a 31st, then report should be generated on 30th or 28th,29th for February.
Could this be done?
I'm new to crystal reports 2011 and I'm trying to develop a report that shows the monthly detail for years 2014 and 2015, and only summarizes years 2010-2013. I have the year as my grouping and I"m able to see all 6 years data summarized when I hide the drill down, but I want to show my customer the monthly data from 2014 and 2015 in detail. Any help would be appreciated!
There's a few ways this can be done:
Group on both year & month. In the "section expert" dialogue, define a formula to conditionally suppress the monthly details for appropriate years, e.g., {table.year} < "2014" (assuming year is a string, change as needed.
Define your own formula and then group on that custom formula, e.g.,:
if {table.year} < "2014" then {table.year} else
{table.month} & " " & {table.year}
The second one also presumes your values are stored as strings, you can use totext() to convert non-strong values if necessary. Option 1 is probably easier to present nicely, Option 2 might give a greater level of flexibility for future use of the rpt as a template with arbitrary grouping, though might still require multiple groups and conditional suppression to have it display exactly as desired, but these should point you in the right direction.
You can create 2 groups, one by year and one by month and write supress condition of month group like when year < 2014 then supress.
if year<2014
then true
else false
I'm generating an overtime report, and while Crystal Reports can group an employee's shifts into weeks, it uses a standard Sunday-Saturday week; I need a Monday-Sunday week(ie, Sept 12-18th inclusive). Is there any way to change this setting, or am I stuck with writing a complex formula?
I don't know of a setting that will allow you to do this, but the group formula is not too bad. The following will give you the week number/index in the year using Mondays as the start of the week.
datepart("ww",{table.date},crMonday)
You will probably want to incorporate the year, too. You can ensure proper sorting by year and week with this
totext(datepart("yyyy",{Orders.Order Date}),"####") + " "
+ totext(datepart("ww",{Orders.Order Date},crMonday),"##")
You could group by {table.date} - 1.