简体   繁体   English

SQL 服务器报告:将数据类型 nvarchar 转换为数字时出错

[英]SQL Server Reporting : error converting data type nvarchar to numeric

We have SQL Server Reporting Services running on our live system.我们的实时系统上运行着 SQL 服务器报告服务。 But when we trying to move same reports in to new database and new reporting server, then reports starting to fail with below error.但是当我们试图将相同的报告移动到新的数据库和新的报告服务器时,报告开始失败并出现以下错误。

Highly appreciate if someone can help如果有人可以提供帮助,将不胜感激

SQL Server Reporting Services is showing this error SQL 服务器报告服务显示此错误

An error has occurred during report processing.报告处理期间发生错误。 (rsProcessingAborted) (rsProcessingAborted)
Cannot read the next data row for the dataset 'DSProductJournal'.无法读取数据集“DSProductJournal”的下一个数据行。 (rsErrorReadingNextDataRow) (rsErrorReadingNextDataRow)
Error converting data type nvarchar to numeric.将数据类型 nvarchar 转换为数字时出错。

SQL query SQL查询

SELECT     
    COMPANY, [Table], [Service Item Group],
    (CAST([Line No] AS char(10)) + [Order No_]) AS [Line No], 
    [Item No_], [Shelf No_], Quantity, [Serial No_], [Order No_], 
    Name, [Weight], Dimension, [Satus/OwnerShip], Condition,
    [E.T.A. / Rec’d Date], [Cost Amount (Actual)], [Cost Curr], 
    [Costing Completed], [Currency Code], [Exchange Rate Amount], 
    Special, [(Sales Price).(Unit Price)], [(Sales Price).(Minimum Quantity)], 
    [COSTED S/P CDN], [Location Code], [Profit _] AS [Profit],
    [Description Sales Price] AS [DescriptionSalesPrice],
    [Currency Code.Sales Price]
FROM
    dbo.V_ZItemLedgerEntryPurchLineUnionAll
WHERE  
    [Shelf No_] IN (@LOB)
ORDER BY
    [Service Item Group]

Just wanted to update.只是想更新。 this issue fixed by adding WHERE [Shelf No_] IN (SELECT Value FROM dbo.FnSplit(@LOB,','))通过添加 WHERE [Shelf No_] IN (SELECT Value FROM dbo.FnSplit(@LOB,',')) 解决了这个问题

and adding =join(Parameters.LOB,Value,",") into the parameter并将 =join(Parameters.LOB,Value,",") 添加到参数中

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

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