<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Edwin M Sarmiento&gt;Fancy up your reports &#8211; SQL Server 2005 Reporting Services:alternating colors on table rows &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/fancy-up-your-reports-sql-server-2005-reporting-servicesalternating-colors-on-table-rows/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Mon, 13 Apr 2026 21:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>&gt;Fancy up your reports &#8211; SQL Server 2005 Reporting Services:alternating colors on table rows</title>
		<link>https://www.edwinmsarmiento.com/fancy-up-your-reports-sql-server-2005-reporting-servicesalternating-colors-on-table-rows/</link>
		<comments>https://www.edwinmsarmiento.com/fancy-up-your-reports-sql-server-2005-reporting-servicesalternating-colors-on-table-rows/#respond</comments>
		<pubDate>Thu, 25 Oct 2007 07:52:00 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://bassplayerdoc.wordpress.com/2007/10/25/fancy-up-your-reports-sql-server-2005-reporting-servicesalternating-colors-on-table-rows</guid>

				<description><![CDATA[&#62;I&#8217;m not a good graphics guy. In fact, I&#8217;d hire somebody to do web design if I have a web application project. For me, anything to do with aesthetics is totally out of the picture. I wouldn&#8217;t want to spend a couple of hours designing and mixing colors and pictures. In reality, anything that has [&#8230;]]]></description>
					<content:encoded><![CDATA[<p>&gt;<span style="font-family:arial;">I&#8217;m not a good graphics guy.  In fact, I&#8217;d hire somebody to do web design if I have a web application </span><span style="font-family:arial;">project.  For me, anything to do with aesthetics is totally out of the picture.  I wouldn&#8217;t want to spend a couple of hours designing and mixing colors and pictures.  In reality, anything that has something to do with web requires visual arts.  Same thing with reports. You really have to find the right color combination and layout for your reports.  I was struggling with how to do this on tables which display results of my dataset queries. All I know is that I can display my resultsets with a single color. I know I can do this in the dataGrid control in ASP.NET 1.1 but I am creating my reports in SQL Server 2005 Reporting Services. After searching thru my favourite (and everybody&#8217;s probably) search engine, I found the answer.  You can use expressions in just about any property in your reports. To do alternating background colors in a table, you can simply use an expression like this: <span style="font-size:85%;"><span style="font-family:georgia;color:#000099;"><strong>=IFF(RowNumber(Nothing) Mod 2,&#8221;color1&#8243;,&#8221;color2&#8243;) </strong><span style="font-family:arial;font-size:100%;color:#000000;">where <strong><span style="font-size:85%;">color1</span></strong> and <strong><span style="font-size:85%;">color2</span></strong> are the names which you can get from the list of colors</span></span></span>  I don&#8217;t guarantee that it will look nice &#8211; that depends on your visual aesthetics and how you appreciate color combination.  What I did in my case was to extend this expression since I had a different color for my column header to identify the column names. My new expression would be <strong><span style="font-family:georgia;font-size:85%;color:#000066;">=IIF((RowNumber(Nothing)+1) Mod 2,&#8221;color1&#8243;,&#8221;color2&#8243;)</span></strong> so that the new color would start on the second row after the column header instead of the first one. I might be needing this in other functionalities like generating a report using the Matrix control so I better start looking for alternatives as early as now</span></p>
<div class="blogger-post-footer"><img width='1' height='1' src='' alt='' /></div>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/fancy-up-your-reports-sql-server-2005-reporting-servicesalternating-colors-on-table-rows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">41</post-id>	</item>
	</channel>
</rss>