Print Page | Close Window

Show Dates even when dont exists

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16308
Printed Date: 18 Apr 2025 at 7:16pm


Topic: Show Dates even when dont exists
Posted By: vidaul
Subject: Show Dates even when dont exists
Date Posted: 28 Apr 2012 at 9:42am

I my question its simple for sure but this is my first report ;)

I already have a report that display employee results
by NrEmployee and between Dates

TableInfo
-Id
-Date
-NrEmployee
-...
-...

Now i whant to show all days between dates even they have no information to the selected NrEmployee

To have the dates i create a table with all dates from 2000 to 2020
and make the relation in crystal TableInfo.Date = AllDatesTable.Date

AllDatesTable
-Date

Now what is the best way to display all dates even when TableInfo.NrEmployee does not exists

I try with outer join etc option in crystal but with no sucess

Thanks.




Replies:
Posted By: lockwelle
Date Posted: 30 Apr 2012 at 3:39am
perhapps you used the wrong outer join.
 
If you have a date table, you should be able to outer join to it and get all the values. Of course you could use a stored proc, but that might entail rewriting the report.
 
In SQL it would look like:
select * from employeeDate AS ed right join AllDates AS ad on ad.date = ed.Date
 
I don't like right joins, but if you have already written the report, a right join is the simplest concept.
 
HTH


Posted By: vidaul
Date Posted: 10 May 2012 at 12:40am
I have comeback to this issue ...

Still need some help please,
 the right join when the parameter nrEmployee  IsNull not working

Thanks


Posted By: vidaul
Date Posted: 10 May 2012 at 1:24am
The join its working correctly a forgotten suppress function its hiding the row Confused

Thanks for the help http://www.crystalreportsbook.com/Forum/member_profile.asp?PF=3327&FID=9 - lockwelle   Thumbs%20Up

[SOLVED] 



Print Page | Close Window