Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: making a working link between 2 excel sheets Post Reply Post New Topic
Page  of 2 Next >>
Author Message
JennyLynn
Newbie
Newbie
Avatar

Joined: 07 Jul 2009
Location: United States
Online Status: Offline
Posts: 12
Quote JennyLynn Replybullet Topic: making a working link between 2 excel sheets
    Posted: 12 Aug 2009 at 7:25am
I'm trying to make a report from two excel sheets which have common information in them. Each excel spreadsheet is comprised of a column with the date (week by week) and a second column containing the # of tickets opened or closed (depending on spreadsheet, this is a helpdesk system).

The problem occurs when there are 0 tickets either opened or closed in that given week the field does not get exported into the excel spreadsheet, and then when the spreadsheet is re-imported into Crystal it ignores weeks that do not have a value for each open and closed. Angry

Example:

This is the "opened" spreadsheet:

Week Opened
April 20, 2008 1
May 4, 2008 3
May 18, 2008 2
May 25, 2008 2
June 1, 2008 141
June 8, 2008 63
June 15, 2008 71
June 22, 2008 7


This is the closed spreadsheet:

Week Closed
June 1, 2008 91
June 8, 2008 60
June 15, 2008 71
June 22, 2008 62


As you can see the opened spreadsheet contains more values than the closed.

When I combine the two reports in Crystal it links the two databases based on the "Week" field and then outputs the report but starts on June 1,2008, the first week in which they have data in common.


How can I get Crystal to not ignore the values where only one table has data???? I've tried to add another column that uses a combination of week# and year to act as a key but the same problem continues. Any ideas?

THX!!!!Smile
~~~~Jenny Lynn
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2009 at 8:01am
Use a full outer join
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2009 at 8:05am
I assume once you get it all into Crystal you will want to group on the week. These date fields will still be seperated and cannot be grouped on to get them allo together.
You will have to create a formula for that:
if isnull(Opened.week) then closed.week else opened.week
IP IP Logged
JennyLynn
Newbie
Newbie
Avatar

Joined: 07 Jul 2009
Location: United States
Online Status: Offline
Posts: 12
Quote JennyLynn Replybullet Posted: 12 Aug 2009 at 8:23am
Beautiful!

Thanks again DBlank!
~~~~Jenny Lynn
IP IP Logged
JennyLynn
Newbie
Newbie
Avatar

Joined: 07 Jul 2009
Location: United States
Online Status: Offline
Posts: 12
Quote JennyLynn Replybullet Posted: 13 Aug 2009 at 8:25am
When i tried to go in to the database expert and set up this link full outer join is disabled as an option, possibly due to being excel databases. I had some success in using a left outer join as most of the holes lied in the closed table, however there are times when the open table is null for the week. Hence the full outer join is definitely what i need.

Is there a strategy to change the database to enable the full outer join. Or... Since the two excel databases are produced in crystal using an SQL database is there a way to enforce group creation even if there is no data found to be grouped in to that week? So for ex. the closed table will have a group called "April 20, 2008" even though there is no data for that week. I can't insert data in to the database without a TON of hassle. I've tried using a formula for group names but that doesn't enfore printing, what I really need is a way to make a formula for grouping but as far as I can see that isn't available in version 10.

~~Thanks!!!
~~~~Jenny Lynn
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Aug 2009 at 8:39am
Hmmm, I know certain join types are not available based on the Data source type but I thought excel allowed the full outer join.
 
Crystal won't let you create data rows, only manipulate what already exists. You need a way to get all of the data in.
Is there a third sheet that these 2 are getting populated from that you can use directly?
IP IP Logged
JennyLynn
Newbie
Newbie
Avatar

Joined: 07 Jul 2009
Location: United States
Online Status: Offline
Posts: 12
Quote JennyLynn Replybullet Posted: 13 Aug 2009 at 12:26pm
Both these sheets are getting populated from a huuuuuge database, what i'm trying to achieve is finding the amount of tickets opened during a certain time period, and then the amount of tickets closed during that same period. Since I have to group by either open or closed to get an accurate count I made one report for each, export them and re-import both excel tables then use an eq to take the difference and then graph it - it's a lengthy procedure but better than what I was doing before which used arrays to read through all the records and add values to arrays depending on their open/close time. This method works when I run the report for all sites, but once it's drilled down to the site level where tickets may or may not be opening/closing every week I start to lose data!

Maybe there's a much simpler way that I'm just missing!!! Big%20smile
~~~~Jenny Lynn
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Aug 2009 at 1:12pm

Let me think about this one a little more.

Is this SQL data and if so do you have access to adding in views or stored procedures?


Edited by DBlank - 13 Aug 2009 at 1:13pm
IP IP Logged
JennyLynn
Newbie
Newbie
Avatar

Joined: 07 Jul 2009
Location: United States
Online Status: Offline
Posts: 12
Quote JennyLynn Replybullet Posted: 13 Aug 2009 at 1:38pm
THANK YOU SO MUCH!!!! Big%20smile

It's SQL. And yes I think so, I'm not the DB guru around here but I can ask those in charge if you let me know what to tell them!
~~~~Jenny Lynn
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Aug 2009 at 12:02pm
Still not sure but this is what I am thinking so far and not sure what you think on this (or others think if they are reading) ...
What about a Stored Proc as a UNION of the table on itself with start and end dates as variables using a where clause table1 start date in parm1 to param2 and table2 end date in param1 to param2.
Thoughts?
IP IP Logged
Page  of 2 Next >>
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.012 seconds.