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?
Related
I want to create a graph line in tableau with a count distinct id per month.
I use an excel spreadsheet that is updated a few times per month but never on the same date, so I have different dates registered as months go by.
I want to use the last date registered per month so I can use that date to show month's trend through the years. Each id represent a different construction building, so it is expected that the same id can be found on different months.
This is what I tried: Tableau Fixed (LOD) formula the get last date registered per each month:
{ FIXED [id_constructionbuilding], MONTH([date_registered]): MAX([date_registered])}
Then I use rows and columns in tableau but I get more than one max date (my excel has 2020 and 2021 dates, so it's picking dates from October 2020 and October 2021 for example). Dates are order according to Spanish so you will see month and days shifted:
I would suggest updating your calculated field to:
{ FIXED [id_constructionbuilding],DATETRUNC('month', [date_registered]), DATETRUNC('year', [date_registered]):MAX([date_registered])}
This will keep the level of detail (LOD) to the id_constru..., month and year.
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.
I have designed student ID Card using crystal report version 13_0_9 for visual studio 2013.
There 2 fields on student ID card that reflect year and month. For the field year I need to show it as 2015 - 2016. And for month it need show as June To May.
I tried placing two special fields for year, month and formatted to show only year and month value.
But the fields reflect only current year and month, how do I achieve this to reflect year as 2015 - 2016 and month as June To May. See below Image.
https://onedrive.live.com/?cid=9F3DE61006533307&id=9f3de61006533307%211621&v=3
A formula called Year:
cstr(Year (CurrentDateTime),"#") & '-' & Right(cstr(Year (CurrentDateTime) + 1 ,"#"),2);
and one called Month
cstr(CurrentDateTime,"MMM") & ' to ' & cstr(DateAdd("m",11,DateAdd("y", 1, CurrentDateTime)),"MMM")
I'm on Crystal standalone but should work equally in VS 2013
I have a cross-tab table that I want to group each column by an specific month for each year. (ex. March 2011, March 2012, March 2013 and so on).
I'm guessing that a formula is needed to do this since there's no predefined functions in CR that can help me group dates like that.
Is this true?
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"