Solved

SSRS Expressions

Posted on 2012-03-15
2
422 Views
Last Modified: 2012-03-15
How would I rewrite this for SSRS?



if {vw_rpt_Truck_Log_Detail.USEMATERIALDESCR} = 1
then Replace ({vw_rpt_Truck_Log_Detail.MATERIALDESCRIPTION},"<BR>",ChrW (13) + ChrW (10) )
else {vw_rpt_Truck_Log_Detail.DESCRIPTION}
0
Comment
Question by:December2000
2 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
Comment Utility
How about this (assuming your dataset fields are called similar to what you've mentioned):

IIF(Fields!USEMATERIALDESCR.Value = 1, Replace(Fields!MATERIALDESCRIPTION.Value, "<BR>", vbCRLF ), Fields!DESCRIPTION.Value)

To add some explanation: char(13) + char(10) comes down to a carriage return and line feed, and SSRS knows the Visual Basic constant vbCRLF which represents exactly that character sequence.

And IIF and Replace, well, given the context I guess they're clear, right?  If not, just let me know and I'll explain!
0
 

Author Closing Comment

by:December2000
Comment Utility
Thank you!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now