最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reporting services - How do I add a character at the end of a field to get the total to 100 characters? - Stack Overflow

programmeradmin1浏览0评论

I'm writing an SSRS report for an Association directory. They would like each line to look like this: Title...........Name

The characters from the Value of Title and the dots should equal 100 characters.

This is what I have tried so far:

=Left(Fields!TITLE.Value & ".", 100) & Fields!Name.Value

=Fields!TITLE.Value & StrDup(100 - Len(Fields!TITLE.Value), ".") & Fields!Name.Value

Neither of those worked. Does anyone know how to do this?

I'm writing an SSRS report for an Association directory. They would like each line to look like this: Title...........Name

The characters from the Value of Title and the dots should equal 100 characters.

This is what I have tried so far:

=Left(Fields!TITLE.Value & ".", 100) & Fields!Name.Value

=Fields!TITLE.Value & StrDup(100 - Len(Fields!TITLE.Value), ".") & Fields!Name.Value

Neither of those worked. Does anyone know how to do this?

Share Improve this question asked Nov 20, 2024 at 11:54 Ariel CrottyAriel Crotty 31 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

This is untested as I can't try it right now but the following should work.

=Fields!TITLE.Value & StrDup(100 - (Len(Fields!TITLE.Value) + Len(Fields!Name.Value)), ".") & Fields!Name.Value

If this does not work, please edit your question and supply some sample data. You may have to wrap all the field references in a TRIM() is there are any leading/trailing spaces in the title or name fields. e.g. all instances of Fields!TITLE.Value would become TRIM(Fields!TITLE.Value)

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论