D J Horton Consulting Ltd

Personal reference to useful tips and tricks for SQL Server, SQL Server Reporting Services and Crystal Reports.



My alternative to scraps of paper lying about.



Others may find bits of it useful!








Thursday, 30 June 2016

ssrs subreport background colour

Ssubreport properties.
Select Parameters and add a parameter.
The name column is the name of the parameter in the subreport (rowcolour) and value is the value to set it to.
Set Value to the same expression used to set the background color for the row.
background color =Parameters!rowcolour.Value into the expression builder.

Sunday, 19 July 2015

D J Horton Consulting Ltd

Not been posting much on here lately as I've been preoccupied setting up my business:
D J Horton Consulting Ltd.
http://uk.linkedin.com/in/domhorton

Offering IT services in SQL Server, T-SQL, SQL Server Reporting Services, SQL Server Integration Services, Salesforce data migrations, administration & development, Informatica Cloud Services, and AutoCAD!

Monday, 20 April 2015

combine multiple rows into one

LEFT OUTER JOIN (

SELECT ref, STUFF

((SELECT ' ' +

com_text

FROM comm

WHERE ref = q1.ref





ORDER BY comseq ASC

FOR XML PATH('')), 1, 1, '') [Comments]

FROM comm AS q1

GROUP BY ref

) AS Comm ON Comm.ref = x.ref

Tuesday, 6 May 2014

Green bar for a group header - SSRS




=IIF(RunningValue(Fields!xxx.Value,COUNTDISTINCT,NOTHING) MOD 2 = 0,

"White","PaleGreen")

Tuesday, 24 December 2013

List all Stored Procedures within a db - SQL

SELECT
*

FROM
TFSheffieldNew.INFORMATION_SCHEMA.ROUTINES

WHERE
(ROUTINE_TYPE = 'PROCEDURE')