简体   繁体   English

SSRS订阅在第1000个字符周围添加空格

[英]SSRS Subscription adding a space around the 1000th character

I have an SSRS subscription that runs off a stored procedure. 我有一个运行存储过程的SSRS订阅。

When the email is sent it is adding a space around the 1000th character of the email. 发送电子邮件时,它将在电子邮件的第1000个字符周围添加一个空格。

Unfortunately, there is a href in that space causing the link to fail. 不幸的是,该空间中存在href,导致链接失败。

The email has a few dynamic parts so the space comes up in different parts of the link. 电子邮件包含一些动态部分,因此该空间出现在链接的不同部分。 My users are very strict about formatting and want the link in that exact position. 我的用户对格式非常严格,并希望链接位于该确切位置。

Does anyone know of a way to stop the space from appearing? 有人知道阻止该空间出现的方法吗? I have tried using a no-wrap tag but it still fails. 我尝试使用无包装标签,但仍然失败。

I apologize for the messy code. 我为乱码表示歉意。 I havent posted to StackOverflow much. 我还没有发布到StackOverflow太多。

 declare @Instructions nvarchar(max) = '<a style="white-space:nowrap;" href         ="http://www.uab.edu/research/administration/offices/OSP/Guidance/Pages/Instruct    ions-VAMOU.aspx">Instructions</a>'


'DATE: ' + CONVERT(varchar(10),@parmReportDate, 101) + '

To: ' + r.pi_name + '

From: nameaa aaaaaaaaaa

The UAB/VA Memorandum of Understanding (VA-MOU) defines the formal          arrangement between UAB and the Birmingham VAMC when a UAB investigator receives or applies for NIH funding, directly or by subaward through a UAB appointment, and that investigator also has a VA appointment.

Per the '+ @NIHPolicy+ ', the MOU must be updated with each significant change or at least one year from the last revision if there were no 
significant changes.  Significant changes include such things as a change in VA appointment or a change in research commitment of 25% or greater.'
+
'<b> This notification is a reminder that annual certification of your VA-MOU is due in ' +
CASE 
    WHEN @parmreportdate = DATEADD (Day, -60, p.app_end_dt) THEN '60' --and p.app_end_dt
    WHEN @parmreportdate = DATEADD (Day, -30, p.app_end_dt) THEN '30'
    WHEN @parmreportdate = DATEADD (Day, -15, p.app_end_dt) THEN '15'
    WHEN @parmreportdate = DATEADD (Day, 0, p.app_end_dt)   THEN '0'
END
+ ' days. Use the ' + @Instructions+ ' below to complete the annual certification '+ @VAMOUForm+ '. (This MOU is maintained in IRAP by OSP with an OSP Assigned Number of ' + r.inst_no + '.  You will need to reference this number when you complete the form.)

<b>Please direct any questions to the Office of Sponsored Programs at email or phonenumber.</b>'

Your code has some hidden characters / white space in. Remove and all will be fine.. 您的代码中包含一些隐藏字符/空格。将其删除就可以了。

declare @Instructions nvarchar(max) = '<a style="white-space:nowrap;" href         ="http://www.uab.edu/research/administration/offices/OSP/Guidance/Pages/Instruct    ions-VAMOU.aspx">Instructions</a>'

becomes 变成

declare @Instructions nvarchar(max) = '<a href ="http://www.uab.edu/research/administration/offices/OSP/Guidance/Pages/Instructions-VAMOU.aspx">Instructions</a>'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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