Отчет "Нормативные затраты на изготовление" выдал ошибку:
VOGBIT v1.1.56071.2102
Error: Имя столбца или число предоставленных значений не соответствует определению таблицы.
Ошибка при выполнении:
UserQuery DS
SET DATEFORMAT ymd; Cre ate table #TEMP ([Idx] int,[StockSum] float,[ProductNmkId] bigint,[ProductComponentId] bigint,[ProductNotation] nvarchar(max),[ProductQuantity] float,[ComponentNotation] nvarchar(max),[ComponentId] bigint,[Id] bigint,[IsMultiComp] nvarchar(max),[ExpensesType] nvarchar(max),[ExpType] nvarchar(max),[Name] nvarchar(max),[NmkId] bigint,[DivisionNotation] nvarchar(max),[Quantity] float,[MeasureId] bigint,[MeasureNotation] nvarchar(max),[Cost] float,[K3] float,[SourceMeasureNotation] nvarchar(max),[CalcDocId] bigint,[RegCardId] bigint,[WorkRateParId] bigint,[WorkTypeParId] bigint,[OperationPlaceId] bigint,[Price] float,[Sum] float,[CounteragentId] bigint,[CounteragentNotation] nvarchar(max)) declare @qs nvarchar(max) set @qs = (sel ect top 1 op.stringvalue fr om [Views].[ObjectParameters] as op where op.id =(SEL ECT TOP(1) ID FR OM (SELECT
[Views].[ObjectParameters].[ID]
FR OM
[Views].[ObjectParameters]
WH ERE
[Views].[ObjectParameters].[ID] = 158667) AS CQ)) ins ert #Temp execute (@qs) SELECT ProductNotation, ProductQuantity, SA.ProductNmkId, SA.ProductComponentId, ProductComponent.[OwnerID], SUM (SA.[Sum]) AS PriceSum, ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, LTRIM(ISNULL([OrderCard].[Notation],'') + ' ' + ISNULL([OrderCard].[Name],'')) as [Technology], LTRIM(ISNULL([OrderCard].[NomenclatureNotation],'') + ' ' + ISNULL([OrderCard].[NomenclatureName],'')) as [Nomenclature] INTO #TEMP2 FR OM #TEMP AS SA LEFT JOIN [Views].[Components] AS ProductComponent ON ProductComponent.ID = SA.ProductComponentId LEFT JOIN [Views].[ComponentCollections] AS [OrderCard] ON ProductComponent.[OwnerID] = [OrderCard].[ID] GROUP BY SA.ProductNotation, SA.ProductComponentId, SA.ProductNmkId, SA.ProductQuantity, ProductComponent.[OwnerID], ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, [OrderCard].Notation, [OrderCard].[Name], [OrderCard].[NomenclatureNotation], [OrderCard].[NomenclatureName] SELECT ROW_NUMBER() OVER (partition BY SA.OwnerId ORDER BY SA.ProductNotation ) AS id, CONVERT (varchar, GETDATE(),104) AS Curr_Date, SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature, SUM(SA.ProductQuantity) AS ProductQuantity, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) AS Price, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) * SUM(SA.ProductQuantity) AS SumPrice FROM #TEMP2 AS SA GROUP BY SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature ORDER BY SA.OwnerId, SA.ProductNotation DR OP TABLE #TEMP2 DR OP TABLE #TEMP
Сообщение:
Имя столбца или число предоставленных значений не соответствует определению таблицы.
Ошибка при выполнении:
UserQuery DS
SE T DATEFORMAT ymd; Cre ate table #TEMP ([Idx] int,[StockSum] float,[ProductNmkId] bigint,[ProductComponentId] bigint,[ProductNotation] nvarchar(max),[ProductQuantity] float,[ComponentNotation] nvarchar(max),[ComponentId] bigint,[Id] bigint,[IsMultiComp] nvarchar(max),[ExpensesType] nvarchar(max),[ExpType] nvarchar(max),[Name] nvarchar(max),[NmkId] bigint,[DivisionNotation] nvarchar(max),[Quantity] float,[MeasureId] bigint,[MeasureNotation] nvarchar(max),[Cost] float,[K3] float,[SourceMeasureNotation] nvarchar(max),[CalcDocId] bigint,[RegCardId] bigint,[WorkRateParId] bigint,[WorkTypeParId] bigint,[OperationPlaceId] bigint,[Price] float,[Sum] float,[CounteragentId] bigint,[CounteragentNotation] nvarchar(max)) declare @qs nvarchar(max) set @qs = (sel ect top 1 op.stringvalue fr om [Views].[ObjectParameters] as op wh ere op.id =(SEL ECT TOP(1) ID FR OM (SELECT
[Views].[ObjectParameters].[ID]
FR OM
[Views].[ObjectParameters]
WH ERE
[Views].[ObjectParameters].[ID] = 158667) AS CQ)) ins ert #Temp execute (@qs) SELE CT ProductNotation, ProductQuantity, SA.ProductNmkId, SA.ProductComponentId, ProductComponent.[OwnerID], SUM (SA.[Sum]) AS PriceSum, ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, LTRIM(ISNULL([OrderCard].[Notation],'') + ' ' + ISNULL([OrderCard].[Name],'')) as [Technology], LTRIM(ISNULL([OrderCard].[NomenclatureNotation],'') + ' ' + ISNULL([OrderCard].[NomenclatureName],'')) as [Nomenclature] INTO #TEMP2 FROM #TEMP AS SA LEFT JOIN [Views].[Components] AS ProductComponent ON ProductComponent.ID = SA.ProductComponentId LEFT JOIN [Views].[ComponentCollections] AS [OrderCard] ON ProductComponent.[OwnerID] = [OrderCard].[ID] GROUP BY SA.ProductNotation, SA.ProductComponentId, SA.ProductNmkId, SA.ProductQuantity, ProductComponent.[OwnerID], ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, [OrderCard].Notation, [OrderCard].[Name], [OrderCard].[NomenclatureNotation], [OrderCard].[NomenclatureName] SELECT ROW_NUMBER() OVER (partition BY SA.OwnerId ORDER BY SA.ProductNotation ) AS id, CONVERT (varchar, GETDATE(),104) AS Curr_Date, SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature, SUM(SA.ProductQuantity) AS ProductQuantity, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) AS Price, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) * SUM(SA.ProductQuantity) AS SumPrice FROM #TEMP2 AS SA GROUP BY SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature ORDER BY SA.OwnerId, SA.ProductNotation DR OP TABLE #TEMP2 DR OP TABLE #TEMP
Исключение:
System.Exception
Источник:
Csdn.Vogbit.Reporter
Версия 1.1.56071 сборка 2102
Список вызовов:
в Csdn.Vogbit.Reporter.Reporter.GetDataSource_UserQuery(ExpressionItem expr)
в Csdn.Vogbit.Reporter.Reporter.GetDataSource(BlankItem blank)
в Csdn.Vogbit.Reporter.Reporter.ExecuteReport()
в Csdn.Vogbit.Reporter.Reporter.ExecReport(IExtensibleApplication vogbitApplication, String fileName, SqlQuery sqlCurrentQuery, DataTable currentItems)
VOGBIT v1.1.56071.2102
Error: Имя столбца или число предоставленных значений не соответствует определению таблицы.
Ошибка при выполнении:
UserQuery DS
SET DATEFORMAT ymd; Cre ate table #TEMP ([Idx] int,[StockSum] float,[ProductNmkId] bigint,[ProductComponentId] bigint,[ProductNotation] nvarchar(max),[ProductQuantity] float,[ComponentNotation] nvarchar(max),[ComponentId] bigint,[Id] bigint,[IsMultiComp] nvarchar(max),[ExpensesType] nvarchar(max),[ExpType] nvarchar(max),[Name] nvarchar(max),[NmkId] bigint,[DivisionNotation] nvarchar(max),[Quantity] float,[MeasureId] bigint,[MeasureNotation] nvarchar(max),[Cost] float,[K3] float,[SourceMeasureNotation] nvarchar(max),[CalcDocId] bigint,[RegCardId] bigint,[WorkRateParId] bigint,[WorkTypeParId] bigint,[OperationPlaceId] bigint,[Price] float,[Sum] float,[CounteragentId] bigint,[CounteragentNotation] nvarchar(max)) declare @qs nvarchar(max) set @qs = (sel ect top 1 op.stringvalue fr om [Views].[ObjectParameters] as op where op.id =(SEL ECT TOP(1) ID FR OM (SELECT
[Views].[ObjectParameters].[ID]
FR OM
[Views].[ObjectParameters]
WH ERE
[Views].[ObjectParameters].[ID] = 158667) AS CQ)) ins ert #Temp execute (@qs) SELECT ProductNotation, ProductQuantity, SA.ProductNmkId, SA.ProductComponentId, ProductComponent.[OwnerID], SUM (SA.[Sum]) AS PriceSum, ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, LTRIM(ISNULL([OrderCard].[Notation],'') + ' ' + ISNULL([OrderCard].[Name],'')) as [Technology], LTRIM(ISNULL([OrderCard].[NomenclatureNotation],'') + ' ' + ISNULL([OrderCard].[NomenclatureName],'')) as [Nomenclature] INTO #TEMP2 FR OM #TEMP AS SA LEFT JOIN [Views].[Components] AS ProductComponent ON ProductComponent.ID = SA.ProductComponentId LEFT JOIN [Views].[ComponentCollections] AS [OrderCard] ON ProductComponent.[OwnerID] = [OrderCard].[ID] GROUP BY SA.ProductNotation, SA.ProductComponentId, SA.ProductNmkId, SA.ProductQuantity, ProductComponent.[OwnerID], ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, [OrderCard].Notation, [OrderCard].[Name], [OrderCard].[NomenclatureNotation], [OrderCard].[NomenclatureName] SELECT ROW_NUMBER() OVER (partition BY SA.OwnerId ORDER BY SA.ProductNotation ) AS id, CONVERT (varchar, GETDATE(),104) AS Curr_Date, SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature, SUM(SA.ProductQuantity) AS ProductQuantity, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) AS Price, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) * SUM(SA.ProductQuantity) AS SumPrice FROM #TEMP2 AS SA GROUP BY SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature ORDER BY SA.OwnerId, SA.ProductNotation DR OP TABLE #TEMP2 DR OP TABLE #TEMP
Сообщение:
Имя столбца или число предоставленных значений не соответствует определению таблицы.
Ошибка при выполнении:
UserQuery DS
SE T DATEFORMAT ymd; Cre ate table #TEMP ([Idx] int,[StockSum] float,[ProductNmkId] bigint,[ProductComponentId] bigint,[ProductNotation] nvarchar(max),[ProductQuantity] float,[ComponentNotation] nvarchar(max),[ComponentId] bigint,[Id] bigint,[IsMultiComp] nvarchar(max),[ExpensesType] nvarchar(max),[ExpType] nvarchar(max),[Name] nvarchar(max),[NmkId] bigint,[DivisionNotation] nvarchar(max),[Quantity] float,[MeasureId] bigint,[MeasureNotation] nvarchar(max),[Cost] float,[K3] float,[SourceMeasureNotation] nvarchar(max),[CalcDocId] bigint,[RegCardId] bigint,[WorkRateParId] bigint,[WorkTypeParId] bigint,[OperationPlaceId] bigint,[Price] float,[Sum] float,[CounteragentId] bigint,[CounteragentNotation] nvarchar(max)) declare @qs nvarchar(max) set @qs = (sel ect top 1 op.stringvalue fr om [Views].[ObjectParameters] as op wh ere op.id =(SEL ECT TOP(1) ID FR OM (SELECT
[Views].[ObjectParameters].[ID]
FR OM
[Views].[ObjectParameters]
WH ERE
[Views].[ObjectParameters].[ID] = 158667) AS CQ)) ins ert #Temp execute (@qs) SELE CT ProductNotation, ProductQuantity, SA.ProductNmkId, SA.ProductComponentId, ProductComponent.[OwnerID], SUM (SA.[Sum]) AS PriceSum, ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, LTRIM(ISNULL([OrderCard].[Notation],'') + ' ' + ISNULL([OrderCard].[Name],'')) as [Technology], LTRIM(ISNULL([OrderCard].[NomenclatureNotation],'') + ' ' + ISNULL([OrderCard].[NomenclatureName],'')) as [Nomenclature] INTO #TEMP2 FROM #TEMP AS SA LEFT JOIN [Views].[Components] AS ProductComponent ON ProductComponent.ID = SA.ProductComponentId LEFT JOIN [Views].[ComponentCollections] AS [OrderCard] ON ProductComponent.[OwnerID] = [OrderCard].[ID] GROUP BY SA.ProductNotation, SA.ProductComponentId, SA.ProductNmkId, SA.ProductQuantity, ProductComponent.[OwnerID], ProductComponent.NomenclatureNotation, ProductComponent.NomenclatureName, ProductComponent.MeasureNotation, [OrderCard].Notation, [OrderCard].[Name], [OrderCard].[NomenclatureNotation], [OrderCard].[NomenclatureName] SELECT ROW_NUMBER() OVER (partition BY SA.OwnerId ORDER BY SA.ProductNotation ) AS id, CONVERT (varchar, GETDATE(),104) AS Curr_Date, SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature, SUM(SA.ProductQuantity) AS ProductQuantity, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) AS Price, ROUND(SUM(SA.PriceSum)/SUM(SA.ProductQuantity),2) * SUM(SA.ProductQuantity) AS SumPrice FROM #TEMP2 AS SA GROUP BY SA.ProductNotation, SA.OwnerId, SA.MeasureNotation, SA.Technology, SA.Nomenclature ORDER BY SA.OwnerId, SA.ProductNotation DR OP TABLE #TEMP2 DR OP TABLE #TEMP
Исключение:
System.Exception
Источник:
Csdn.Vogbit.Reporter
Версия 1.1.56071 сборка 2102
Список вызовов:
в Csdn.Vogbit.Reporter.Reporter.GetDataSource_UserQuery(ExpressionItem expr)
в Csdn.Vogbit.Reporter.Reporter.GetDataSource(BlankItem blank)
в Csdn.Vogbit.Reporter.Reporter.ExecuteReport()
в Csdn.Vogbit.Reporter.Reporter.ExecReport(IExtensibleApplication vogbitApplication, String fileName, SqlQuery sqlCurrentQuery, DataTable currentItems)