Crystal reports date functions and formula - date

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.

Related

Automating crystal report - need to run for the last week

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.

Power BI Week Visual Filtering

Power BI novice here. I have multiple reports which require date filtering by week. I can sometimes get the data to display with my Week column using dates from a column in the same table.
I thought building a Week column based on the date column would result in an easy to use visual. The week column is calculated by:
WeekYear = IF(
FORMAT(WEEKNUM(START.[Date],1)-1,"00"="00",
"Wk53-" & YEAR(START.[Date])-1,
"Wk" & FORMAT(WEEKNUM(START.[Date],1)-1,"00") & "-" & YEAR(START.[Date]))
This results in an x-axis displaying weeks in this format: Wk52-2019. If the underlying data of column STARTis in the proper datetime format, what could be the issue?
I noticed data on the visual which is not filtered for a date range display without issue. Trying to filter with DATESINPERIOD or other DAX date filters caused calculated measures to not display or break the model. I know a lot of references state having a separate calendar table is critical and I suppose I don't fully understand. Thanks in advance.
If you are trying to create the week in date format, then you can use the following calculation:
Week = Table[Start] - WEEKDAY(Table[Start],2)+1
This returns the Monday date of the week, if you want other days you can adjust the calculation accordingly.
If this is not what you are looking for, then you might have to clarify your requirements a bit more.

Getting Start Date and End date of a Crystal Report

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

grouping a date range by month in Crystal reports

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"

Iteration of date field crystal reports

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