Geeks With Blogs

News Locations of visitors to this page
The Out Campaign: Scarlet Letter of Atheism

Disclaimer
The content of this site are my own personal opinions and do not represent my employer's/Microsoft view in anyway. In addition, my thoughts and opinions often change, and as a weblog is intended to provide a semi-permanent point in time snapshot you should not consider out of date posts to reflect my current thoughts and opinions

About
Suresh Veeragoni, working as a Principal Consultant at Sogeti USA LLC (A subsidiary of Capgemini SA Group), developing SOA & BPM solutions for Businesses using Microsoft CSD products (BizTalk, WF, WCF etc)

My Company

Sogeti




QR-Code for my Blog

qrcode

Suresh Veeragoni's Blog A BizTalker's Blog

Recently I am working little bit more on SSRS.

Last week, we migrated from SSRS 2005 to SSRS 2008. The migration was smooth except few gotchas in Line charts.

The way we handle empty points (null values) is improved. for more information, look at: http://msdn.microsoft.com/en-us/library/cc281301.aspx

http://msdn.microsoft.com/en-us/library/bb934424.aspx

-------

Coming to some tips regarding formatting date time, text etc.

1) How do you persist the date format when you export the report to Excel?

In earlier version of SSRS, when we need DateTime format to be international standard dd-MMM-yy, we used convert the datetime to varchar in the query. convert(varchar,mydate,106) which gives dd MMM yy. But when you export the generated report to excel, you can’t play with sorting of that particular date column, as it exports as a string!

SSRS 2008, provides you the flexibility of identifying the type within the report and when you export it will persist the format.

Here is the screenshot where you mention the format, without converting anything the queries…

image

If you do like that, when you export the report to Excel, it will retain the date format and Excel treats it as a date. If you do string operations in Report, when you export to Excel, it doesn’t treat as a date.

2) How do we custom format text in SSRS reports?

Well, SSRS uses VB syntax to format anything inside the expressions. So, we have to use VB functions to format text.

One good function available in SSRS is Replace(). you can find a character and replace it with what you want.

for example, if you want to replace space with - (hyphen) , how do you do that in SSRS?

Replace(Fields.myValue, Chr(32),Chr(45))

Here is the wiki of list of VB characters:http://www.gtwiki.org/mwiki/index.php?title=VB_Chr_Values

Technorati Tags:

Posted on Friday, June 12, 2009 4:56 PM SSRS | Back to top


Comments on this post: SSRS 2008 - Excel Export Date Format and some other formatting tips

# re: SSRS 2008 - Excel Export Date Format and some other formatting tips
Requesting Gravatar...
Formating the datefield in Rdl, won't allow any formulae in Exported excel reports.
Left by umesh on Jul 15, 2009 12:55 AM

# re: SSRS 2008 - Excel Export Date Format and some other formatting tips
Requesting Gravatar...
can you post some othere tips so that, it will be helpful to everyone.

Any how thans for sharing
Left by duckyvideos on Jul 13, 2010 9:13 PM

# re: SSRS 2008 - Excel Export Date Format and some other formatting tips
Requesting Gravatar...
ssrs custom qr code control,
http://www.avapose.com/dotnet_barcode_reporting_service/qrcode_generator.shtml
Left by Fisher on Apr 01, 2013 8:26 PM

# re: SSRS 2008 - Excel Export Date Format and some other formatting tips
Requesting Gravatar...
Hi ,

I need to export a chart created in SSRS 2012 to excel with data , I am just able to export the chart as jpeg or GIF in a non editable format, but i need to export in a format so that my cusotmer can edit and format the chart in the excel . Any solutions is highly appreciable , Thank you .
Left by Saravanan on Sep 12, 2013 6:22 PM

Your comment:
 (will show your gravatar)


Copyright © microsoftian | Powered by: GeeksWithBlogs.net