• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

Crystal REport Date issue


i have a report where i need to show values based on dates. its a monthly report so report should show dates even when there is no transaction but that date is not coming from database, for example, there are records from 14 June but no records for june 15, so database doesn't give u june 15 and gives u june 16. Now this can happen multiple times within a month.

so i was hoping if anyone can tell me how to display dates even when there is no records coming out from the database for that particular date and should be able to display multiple times. i would really appreciate any help.

2 Solutions
In theory, the simplest thing is if you can create a table that has every date in it and link that to your data, so the report gets at least one record for each date.

 If you can't do that, it may be possible to have the report try to fill in the blanks.  For example, have a formula in the report compare the date in the current record to the date in the previous record and, if they're more than 1 day apart, produce a list of the missing dates.  Whether or not that's practical/possible may depend on the structure of your report.

You can generate a table with all days in a period and left join it with your data.
A SQLServer function and a sample how to use it are available from this link:

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now