Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Show Dates even when dont exists Post Reply Post New Topic
Author Message
vidaul
Newbie
Newbie


Joined: 28 Apr 2012
Online Status: Offline
Posts: 3
Quote vidaul Replybullet Topic: Show Dates even when dont exists
    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.

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
IP IP Logged
vidaul
Newbie
Newbie


Joined: 28 Apr 2012
Online Status: Offline
Posts: 3
Quote vidaul Replybullet 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


Edited by vidaul - 10 May 2012 at 12:43am
IP IP Logged
vidaul
Newbie
Newbie


Joined: 28 Apr 2012
Online Status: Offline
Posts: 3
Quote vidaul Replybullet 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 lockwelle  Thumbs%20Up

[SOLVED] 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.