Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
000017597
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"> <ApplicationData> <TraceData> <DataItem> <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"> <TraceIdentifier>Archer.Packaging</TraceIdentifier> <UserId>183</UserId> <Description>Unable to cast object of type 'ArcherTech.Common.Domain.SearchStatisticReport' to type 'ArcherTech.Common.Domain.SearchReport'.</Description> <AppDomain>ArcherTech.JobFramework.Job.exe</AppDomain> <Exception> <ExceptionType>System.InvalidCastException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> <Message>Unable to cast object of type 'ArcherTech.Common.Domain.SearchStatisticReport' to type 'ArcherTech.Common.Domain.SearchReport'.</Message> <Source>ArcherTech.Kernel</Source> <StackTrace> at ArcherTech.Kernel.DataSource.Db.SearchReportDataSource.Get(Int32 reportId, SearchReportBase& reportBase, Nullable`1& filterId) at ArcherTech.Kernel.Brokers.SearchReportBroker.GetSearchReport(Int32 reportId, SearchReportBase& searchReportBase, Nullable`1& filterId) at ArcherTech.Kernel.Brokers.SearchReportBroker.Get(Int32 reportId, Boolean checkPermissioning) at ArcherTech.Kernel.Managers.SearchReportManager.Get(SessionContext sessionContext, Int32 reportId) at ArcherTech.Packaging.Actions.Generation.GeneratePackage.<>c__DisplayClass132.<GenerateReports>b__12d(GenerateContext context, ExecuteActions`1 ignored) at ArcherTech.Packaging.Actions.ActionExecutor`1.ActionExecutorLoop(IEnumerable`1 actions) at ArcherTech.Packaging.Actions.Generation.GeneratePackage.<>c__DisplayClassa.<GetGenerateActions>b__1(GenerateContext executeContext, ExecuteActions`1 executor)</StackTrace> </Exception> </TraceRecord> </DataItem> </TraceData> </ApplicationData> </E2ETraceEvent>
SELECT rbt.report_base_id parentReportID , rbt.report_name parentReportName , rbt2.report_base_id childReportID , rbt2.report_name ChildStatsReportName , rt.report_type_desc ReportType , u.user_display_name CreatedBy FROM dbo.tblReportBase rb JOIN dbo.tblReportBaseTranslation rbt ON rbt.report_base_id = rb.report_base_id JOIN dbo.tblReportBase rb2 ON rb.drill_in_report_base_id = rb2.report_base_id JOIN dbo.tblReportBaseTranslation rbt2 ON rbt2.report_base_id = rb2.report_base_id JOIN dbo.tblReportType rt ON rt.report_type_id = rb.report_type_id JOIN dbo.tblUser u ON u.user_id = rb.create_login WHERE rb.drill_in_report_base_id IS NOT NULL AND rb2.drill_in_report_base_id IS NOT NULL;
DECLARE @reportID INT = 0; DECLARE @reportBaseXML XML; DECLARE @userToken NVARCHAR(128); SET @reportBaseXML = '<ROOT><V a="' + CAST(@reportID AS VARCHAR(20)) + '"/></ROOT>'; SELECT TOP ( 1 ) @userToken = s.sessionId FROM dbo.tblSession s; BEGIN TRAN; BEGIN TRY EXEC dbo.usp_delete_report_base @userToken =@userToken , @reportBaseXML = @reportBaseXML; END TRY BEGIN CATCH ROLLBACK; SELECT 'Delete Failed'; RETURN; END CATCH; SELECT 'Delete Successful' COMMIT;