Getting SQL Report Server usage

Posted by beakersoft | Posted in SQL Server | Posted on 03-12-2006

0

A couple of days ago some of our users were complaining about the speed at witch the reports were running.

I suspected that they were running some huge reports to get some year end data, but of course they denide that. I had seen a couple of tables that reporting services uses, and started poking about in those.

After a bit i managed to come up with the following sql that gave me a list of what reports had been run, who ran them, what parameters they used and how long they took to run:

SELECT TOP (100) PERCENT dbo.Catalog.Name, dbo.ExecutionLog.UserName, DATEDIFF(mi, dbo.ExecutionLog.TimeStart, dbo.ExecutionLog.TimeEnd)
AS Proc_time, dbo.ExecutionLog.Parameters, dbo.ExecutionLog.TimeStart
FROM dbo.ExecutionLog RIGHT OUTER JOIN
dbo.Catalog ON dbo.ExecutionLog.ReportID = dbo.Catalog.ItemID
WHERE (dbo.ExecutionLog.TimeStart > CONVERT(DATETIME, ’2006-12-01 00:00:01′, 102))
ORDER BY Proc_time

Please note that this works in SQL 2005 reporting services, i’m not sure if it will in previous versions. To run for different dates, just change TimeStart’s parameter

Converting RTF files to PDF using OpenOffice

Posted by beakersoft | Posted in Programming | Posted on 03-12-2006

0

Something really cool I found a while ago, and have started to use again recently is the ability to programmatically control OpenOffice (http://www.openoffice.org)

I have used this in a VB.NET application I wrote that will look into a drop folder for a .RTF file, and convert it to a .PDF file. It took me a long while to work out how to (for free) convert a variety of office type documents to a pdf, this was by far the best.

If you would like the main source code for the function I wrote I can post it up here if anyone wants, alternatively check out this article on the code project website http://www.codeproject.com/vb/net/oo2html.asp This was the article the originally helped me out, there is also quite good developer documentation on the OpenOffice web site.