[rt-users] Call Report -Help required

Ralf Hack ralf.hack at gmail.com
Wed Nov 24 11:34:50 EST 2004


There are modules for perl that generate CSV files to be downloaded
into your spreadsheet. But, perhaps a low tech approach of stuffing
into the existing query the conventional methods for creating CSV
files will do just fine ?

SELECT t.id as......"11/22/2004"  INTO OUTFILE'/tmp/outfile' FIELDS
TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'
FROM
Tickets t, ...

Open the file /tmp/outfile with your favorite text editor and
cut-n-paste the into an empty excel spreadsheet. You _could_ do a http
get on /tmp/outfile if you are keen on using a web server. Don't know
which mime type to use though.

Cut 'n' paste works for me though.

On Wed, 24 Nov 2004 09:56:05 -0500, Hegde Manjunath
<manjunath_hegde at syntelinc.com> wrote:
> Hi,
> 
> I could build  some MySQL querry which would give me a call report with all
> the details i need.
> Has any one got a script to generate a .xls file for such reports - please
> help me
> The querry is given below (incase if it helps some one )
> ________________
> SELECT
> t.id as 'Call No',
> DATE_FORMAT(t.Created, "%m/%d/%Y") as 'Date',
> CASE WHEN tcf.CustomField = 4 THEN tcf.Content ELSE NULL END as 'Machine
> ID',
> DATE_FORMAT(t.Created, "%H:%i") as 'Time Reported',
> CASE WHEN tcf.CustomField = 1 THEN tcf.Content ELSE NULL END as 'Project',
> t.Subject as 'Fault Description',
> u.Name as 'Caller Name',
> t.Priority as 'Priority',
> u.Name as 'Engineer',
> "" as 'Vendor',
> DATE_FORMAT(t.Started,  "%H:%i") as 'Time Attended',
> DATE_FORMAT(t.Resolved,  "%H:%i") as 'Time Completed',
> DATE_FORMAT(t.Resolved,  "%m/%d/%Y") as 'Date Completed',
> t.Status as 'Status'
> FROM
> Tickets t,
> TicketCustomFieldValues tcf,
> Users u
> WHERE
> t.id = tcf.Ticket
> AND (t.Creator = u.id OR t.Owner = u.id)
> AND DATE_FORMAT(t.Created, "%m/%d/%Y") BETWEEN "11/20/2004" AND "11/22/2004"
> _________________
> 
> I would like to use this in a .cgi file and create a .xls file - can some
> one help me please ??
> 
> Thanks in advance
> 
> Manjunath Hegde
> 
> 
> 
> 
> -----Original Message-----
> From: Hegde Manjunath [mailto:Manjunath_Hegde at syntelinc.com]
> Sent: Tuesday, November 23, 2004 10:38 AM
> To: rt-users at lists.bestpractical.com
> Subject: [rt-users] Call Report -Help required
> 
> Hi,
> 
> I have been using rt3 with mysql and till now, it has ben a success story.
> 
> Has any one got a html / cgi  file to generate a report of the calls logged.
> 
> Thanks in advance
> 
> Manjunath hegde
> 
> ____________________________________________
> Confidential:  This electronic message and all contents contain information
> from Syntel, Inc. which may be privileged, confidential or otherwise
> protected from disclosure. The information is intended to be for the
> addressee only. If you are not the addressee, any disclosure, copy,
> distribution or use of the contents of this message is prohibited.  If you
> have received this electronic message in error, please notify the sender
> immediately and destroy the original message and all copies.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
> 
> ____________________________________________
> Confidential:  This electronic message and all contents contain information
> from Syntel, Inc. which may be privileged, confidential or otherwise
> protected from disclosure. The information is intended to be for the
> addressee only. If you are not the addressee, any disclosure, copy,
> distribution or use of the contents of this message is prohibited.  If you
> have received this electronic message in error, please notify the sender
> immediately and destroy the original message and all copies.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
>



More information about the rt-users mailing list