Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Cross-tab trouble.. displaying empty rows Post Reply Post New Topic
Page  of 2 Next >>
Author Message
bergstein
Newbie
Newbie


Joined: 16 Nov 2009
Location: United States
Online Status: Offline
Posts: 3
Quote bergstein Replybullet Topic: Cross-tab trouble.. displaying empty rows
     Posted: 16 Nov 2009 at 7:06am
Background: Basically, I have to create to report using a cross-tab that displays the number of billed minutes used each day on each telephone within a facility, over a date range.  The rows are each specific phone.

Problem: The problem I am running into is that if there is no activity on a phone within the date range (zero billed minutes), the cross-tab does not see any data and does not display that particular phone at all.  Those who will be using this report demand to see the phones with no activity within the cross-tab displayed with the other phones. 

Is there some way I can remove the date range from the select expert, but instead use it somehow to suppress columns from my cross-tab that don't fall in the date range?  Or maybe is there some other, better way to achieve what I'm trying to do?  Because I keep running into walls every time I try something and nothing seems to work. I had a list of phones with no activity in a subreport elsewhere in the report but that was not acceptable to the user, so I have no choice but to write it this way and I don't even know if it's possible.

Thanks for any help you guys can provide!
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 16 Nov 2009 at 7:45am
I think I know what  you are asking for, but not sure.  Two things, phones not showing up that have zero minutes and data outside of the date range showing up on the report.

1. Maybe you could write a formula that would display a zero if there where no phone minutes (is it a null value?) and do a sum on that value for the summary.

2. The cross-tab should not show any values outside of your date range, so I am now sure what is going on.

I hope this helps.
IP IP Logged
bergstein
Newbie
Newbie


Joined: 16 Nov 2009
Location: United States
Online Status: Offline
Posts: 3
Quote bergstein Replybullet Posted: 16 Nov 2009 at 8:06am
Oh sorry about that I must not have been clear.

As long as I have my date range criteria in the select expert, the cross-tab will only show data within my date range.  (Each column in my cross-tab is each day within the date range, btw, in case I wasn't clear about that before.)

This works ALMOST perfectly, except for one major problem.  The user really needs to see phones with no activity in the date range displayed in the cross-tab with the rest of the phones, and that does not work.  The reason for this is the following:

Each individual phone call is stored in the database with a date/time, billed minutes, and the phone it was made on, among other things.  This table is the main table the cross-tab is pulling from.  If the criteria in the select expert is limiting the report to calls only stored with dates within the date range, and there are NO calls made on a phone within the date range, that phone is simply left off the cross-tab because it was never in the result set of the report to begin with.  This is why creating a formula setting the value to zero in the event of a null value does not work (I tried) because it is not a null value but rather, the criteria of the report filtering out the results before the cross-tab ever sees it.

I tried adding "or isnull(date field)" into the criteria, but all that did was add the phones that never had any activity EVER into the cross-tab (which was mainly junk data anyway, which didn't help).  It still ignored those phones that had calls OUTSIDE the date range, but just none WITHIN the date range. 

So the way I'm thinking about this is that the only way to achieve this would be to eliminate the date range criteria from my select expert altogether and find some way to suppress columns from my cross-tab that are outside of the date range.  But I do not think Crystal XI (the version I am developing on) is capable of doing this (or is it?).  I need some type of alternate solution to force my cross-tab to display all phones EVEN IF there is no data in the date range for some phones.

Solutions not involving a cross-tab would be welcome, but not preferred.  I really want to exhaust any and all possibilities to get this to work with a cross-tab because I'm envisioning a hideous, unreadable report if made another way.

Thanks again!
IP IP Logged
bergstein
Newbie
Newbie


Joined: 16 Nov 2009
Location: United States
Online Status: Offline
Posts: 3
Quote bergstein Replybullet Posted: 17 Nov 2009 at 5:38am
What I'm trying to do is impossible isn't it?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Nov 2009 at 7:23am

What is your data source type. Usually you can address this problem by either writing a Command for your data or use a view or a stored proc.

If you have runtime paramaters for a date range you will need to go with a stored proc that has the params written into it.
If the date ranges are static or constant based on today's date then you could do it in a Command or view.


Edited by DBlank - 17 Nov 2009 at 7:24am
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 13 Jun 2011 at 12:21pm
Try making the cross tab larger use 2 groups like one is month or week and second one is day.
IP IP Logged
CrystalUser2011
Newbie
Newbie


Joined: 14 Jun 2011
Online Status: Offline
Posts: 2
Quote CrystalUser2011 Replybullet Posted: 14 Jun 2011 at 3:06am

Could you not just put a formula relating to the phone not showing up in the display string of the cross tab.. stating that if it equals 0 it still shows up.

Might be a silly suggestion, but worth a try right?
Crystal User2011
IP IP Logged
Annette
Newbie
Newbie


Joined: 25 Jul 2011
Online Status: Offline
Posts: 13
Quote Annette Replybullet Posted: 29 Jul 2011 at 2:02am
Did you ever get this sorted as I'm having the same problem and could use some help.

Thanks,

Annette
IP IP Logged
eryclites
Newbie
Newbie


Joined: 07 Sep 2011
Online Status: Offline
Posts: 1
Quote eryclites Replybullet Posted: 07 Sep 2011 at 11:32am
I think you can solve your problem by changing the link type between the databases. Try a left outer join which will return all the data from the table on the left regardless of whether it has a corresponding link on the right.
IP IP Logged
SheliaKWood
Newbie
Newbie


Joined: 02 Feb 2012
Location: United States
Online Status: Offline
Posts: 4
Quote SheliaKWood Replybullet Posted: 02 Feb 2012 at 8:37pm
Same problem here.

I want to display my report something like this:

Date Period: 01-Jan to 03-Jan

     01-Jan  02-Jan  03-Jan
A    123.00    0.00   45.00
B      0.00    0.00    0.00
C      8.90    0.00   11.12

but the output is:

     01-Jan  03-Jan
A    123.00   45.00
C      8.90   11.12

The column data for 02-Jan and row data for B is missing. (There are no data on the said column and row.)

I am using Peachtree as the data source.


Edited by SheliaKWood - 02 Feb 2012 at 9:05pm
IP IP Logged
Page  of 2 Next >>
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