简体   繁体   中英

SSRS Report published on Sharepoint not displaying Regex as expected

I am trying to publish a report on SharePoint 2010 (integrated mode) that was installed with SQL Server 2012. The report was created in Visual Studio 2010. The data source is a SharePoint list of items with due dates and an "Assigned To" field. The items may have one or more person assigned to handle it and Sharepoint returns the results as one field looking something like:

1234;#Person 1;#2345;#Person 2;#444;#Person 3

I want to strip the numbers (which are IDs assigned by SharePoint and vary in length), as well as the ";#" and return the names on separate lines in a single cell of the report's tablix.

Person 1
Person 2
Person 3
I use this expression in the report:

=replace(System.text.regularExpressions.regex.replace(Fields!Assigned_To.Value,"[0-9]+;#",""),";#",VBCRLF)

When I preview the report, it displays the way I want it to, but when the report is deployed to Sharepoint it duplicates the record, displaying it 3 times if there are 3 people assigned to the item (or twice if there are 2, etc.), with only one person in the "Assigned To" field.

I haven't been able to find a solution for this, and am not sure how to get it to render the way I want it to when it's deployed. Any help is appreciated!

怎么办

.replace(Fields!Assigned_To.Value, "([0-9]+;#|)([^#][^;]*);#[0-9]+;#", "$2\n")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM