Solved

Crystal Reports help

Posted on 2013-10-22
6
426 Views
Last Modified: 2013-10-22
Hi,

I am trying to build a report in crystal that shows me a number of stats per anaylst in my helpdsk system.  I want to see:

A list of all analyst names
The number of calls they have logged
The number of calls they have closed
The last date that have logged in

I have two tables in my system.
The table where my analysts ID's,Names and last login dates are stored in sw_systemdb.swanalysts
swanalysts.analystid this is the unique ID of the analyst.
swanalysts.name this is the analyst name.
swanalysts.lastlogin this is the date when the user last logged in.

The table to see who has logged and closed a call is in a table called swdata.opencall,
to see who logged / closed the call, there are two fields..
opencall.loggedby this gives the analyst's ID who logged the call
opencall.closedby this gives the analyst's ID who closed the call

The statement below, joins the two tables together by the analysts ID. I have attached some sample data.

select
,a.name 'loggedby'
,b.name 'closedby'
,c.name 'completedby'
,d.name 'lastactby'
from swdata.opencall o
join sw_systemdb.swanalysts a on a.analystid = o.loggedby
join sw_systemdb.swanalysts b on b.analystid = o.closedby
join sw_systemdb.swanalysts c on c.analystid = o.completeby
join sw_systemdb.swanalysts d on d.analystid = o.lastactby

Open in new window


What I do not understand is how to build the report that shows a list of analyst names, ,the date they last logged in and the calls they have logged / closed.
I understand i need to group the anaylst, but I'm not sure on which field.

 Can anyone help me?
sample-data.xlsx
0
Comment
Question by:dan_stan
  • 3
  • 3
6 Comments
 
LVL 22

Expert Comment

by:Ido Millet
ID: 39590717
Insert group on analystid.
In the Detal section show any desired info about the calls

Create a formula that returns 1 if the call is closed and zero otherwise. SUM that formula (note: do not Count, you must use SUM) to give you the number of calls closed by that analyst.

Do the same for opened cases.

Note: you could do the same using Running Totals with a condition applied to the type of transaction. But the approach above has several advantages over Running Totals.
0
 

Author Comment

by:dan_stan
ID: 39590750
I do not think this would work as the person who logs the call doesn't always close the call.

Also how do I group all of my anaylst ID's? I could take the opencall.loggedby, but this will only show me the ID's who logged the call.
0
 
LVL 22

Accepted Solution

by:
Ido Millet earned 500 total points
ID: 39590824
Create a UNION statement (using a Command on the Crystal side or a VIEW on the DBMS side) that append all CLOSE cases to all OPEN cases with a new column that returns the Closed By for the CLOSED cases and the Opened By for Opened cases.

You can then join to that column from the Agent table.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:dan_stan
ID: 39590905
Thanks, how do you suggest I append the close cases / open cases.

So far I built the statement so that if looks like the below. I think it works, although would like to have your thoughts as well.

SELECT
FROM_UNIXTIME(logdatex)
,o.callref
,1 as loggedby
,0 as closedby
,a.name
,a.lastlogontime
FROM opencall o
join sw_systemdb.swanalysts a on a.analystid = o.loggedby
UNION ALL SELECT
FROM_UNIXTIME(logdatex)
,o.callref
,0 as loggedby
,1 as closedby
,a.name
,a.lastlogontime
FROM opencall o
join sw_systemdb.swanalysts a on a.analystid = o.closedby

Open in new window

0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 39590937
Looks OK to me.
0
 

Author Comment

by:dan_stan
ID: 39590957
Me too, many thanks for your support.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now