-- INSERT SCRIPT FOR CRReports IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Bill Layout' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Bill Layout', 'billlayout.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Bill Breakdown' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Bill Breakdown', 'FEBreakdown.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'TimeDayBook' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('TimeDayBook', 'TimeDayBook.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Handler Diary Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Handler Diary Report', 'Handler Diary Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Balances as at a Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Balances as at a Date', 'Matter Balances as at a Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Fee Earner Summary' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Fee Earner Summary', 'Matter List by Fee Earner Summary.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Fee Earner' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Fee Earner', 'Matter List by Fee Earner.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Client by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Client by Period', 'Fees Issued by Client by Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Worktype by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Worktype by Period', 'FeesIssWTPeriod.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Department by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Department by Period', 'FeesIssDeptPeriod.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Department by Worktype by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Department by Worktype by Period', 'FeesIssDeptWTPeriod.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Worktype by Fe by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Worktype by Fe by Period', 'FeesIssWTFEPeriod.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Fe by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Fe by Date', 'FeesIssFEDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Fe by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Fe by Period', 'FeesIssFEPeriod.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Client by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Client by Date', 'Fees Issued by Client by Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Department by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Department by Date', 'FeesIssDeptDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Worktype by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Worktype by Date', 'FeesIssWTDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Department by Worktype by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Department by Worktype by Date', 'FeesIssDeptWTDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Worktype by Fee Earner by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Worktype by Fee Earner by Date', 'FeesIssWTFEDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt by Fee Earner' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt by Fee Earner', 'AgedDebtByFe.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt by Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt by Client', 'AgedDebtbyClient.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt by Client (Show Dates)' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt by Client (Show Dates)', 'AgedDebtbyClient(ShowDates).rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Diary Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Diary Report', 'Case Diary Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Balances as at Entry Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Balances as at Entry Date', 'Matter Balances as at Entry Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt by Client (ShowDates) Client Summary' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt by Client (ShowDates) Client Summary', 'AgedDebtbyClient(ShowDates) Client Summary.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'WIP By FE' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('WIP By FE', 'WIP By FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'WIP by F/e Last Billed' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('WIP by F/e Last Billed', 'WIP Report by FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Billing Guide' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Billing Guide', 'Billing Guide Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Statements' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Statements', 'Client Statments.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Recorder Utilisation' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Recorder Utilisation', 'TimeRecorderUtilisation.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'SupplierRemittance' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('SupplierRemittance', 'SupplierRemittance.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'KPI By Fee Earner' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('KPI By Fee Earner', 'FE KPI Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'KPI By Department' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('KPI By Department', 'KPI Report Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'KPI By Team' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('KPI By Team', 'KPI Report Team.RPT',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'KPI by Firm' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('KPI by Firm', 'KPI Report Firm.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued By Work type by Team by Fee for Month' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued By Work type by Team by Fee for Month', 'Fees Issued by Wtype by Team by Fee for Month.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Department by Team by Fee for Month.' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Department by Team by Fee for Month.', 'Fees Issued by Dept by Team by Fee for Month.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'All Cases' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('All Cases', 'ALL Cases.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Work Type', 'Matter List by WorkType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Firm Case Analysis Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Firm Case Analysis Report', 'Firm Case Analysis.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Statute Of Limitations Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Statute Of Limitations Report', 'StatuteLimitationsDates.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertaking List Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertaking List Report', 'Undertakings List.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings by UndertakingTo' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings by UndertakingTo', 'Undertakings by UndertakingTo.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings by Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings by Client', 'Undertakings by Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings by Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings by Dept', 'Undertakings by Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings by Dept by Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings by Dept by Work Type', 'Undertakings by Dept by WType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings by FE' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings by FE', 'Undertakings by Fe.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings by Matter' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings by Matter', 'Undertakings by Matter.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings by Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings by Work Type', 'Undertakings by WType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Dormant Matters Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Dormant Matters Report', 'DormantMatters.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Statute Of Limitations By FE By Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Statute Of Limitations By FE By Client', 'StatuteOfLimitations By Fe By Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Statute Of Limitations By Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Statute Of Limitations By Dept', 'StatuteOfLimitations By Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Statute Of Limitations By Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Statute Of Limitations By Work Type', 'StatuteOfLimitations By WType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Diary Time Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Diary Time Report', 'DiaryTimeReport.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Summary Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Summary Report', 'Case Summary By Matter.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings Authorised By' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings Authorised By', 'Undertakings by AuthBy.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings By Status' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings By Status', 'Undertakings by Status.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued By Department By FE By Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued By Department By FE By Date', 'FeesIssDeptFEDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Department By FE By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Department By FE By Period', 'FeesIssDeptFEPeriod.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Ledger' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Ledger', 'Time Ledger by Matter.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Ledger No Money' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Ledger No Money', 'Time Ledger by Matter No Money.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Ledger WIP' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Ledger WIP', 'Time Ledger by Matter WIP.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Activity List WIP' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Activity List WIP', 'WIP Activity List.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Entry' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Entry', 'Time Entry.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Task by FE' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Task by FE', 'TimeTasks Tasks By FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Negotiation Letter By FE (FNL)' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Negotiation Letter By FE (FNL)', 'FNL Letters By FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued By FE By Period Summary' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued By FE By Period Summary', 'FeesIssFEPeriodSummary.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Estimated Fees By Est fees Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Estimated Fees By Est fees Date', 'EstFeesByEstFeeDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Ledger for Fe between dates' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Ledger for Fe between dates', 'Time Ledger for Fe between dates.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Ledger by Matter by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Ledger by Matter by Date', 'Time Ledger by Matter by Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Ledger By Matter By FE By Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Ledger By Matter By FE By Date', 'Time Ledger By Matter By Fe By Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Billed Time for an Individual Handler' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Billed Time for an Individual Handler', 'Billed Time By FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Billed Time By Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Billed Time By Client', 'Billed Time By Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Billed Time' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Billed Time', 'Billed Time.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Client by Worktype By Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Client by Worktype By Date', 'Fees Issued by Client By WType by Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Client by Worktype By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Client by Worktype By Period', 'Fees Issued by Client By WType by Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Top WIP For Fe' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Top WIP For Fe', 'Top WIP Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Category Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Category Report', 'ClientCategories.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matters ReOpened' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matters ReOpened', 'Matters Reopened.RPT',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Current Balance Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Current Balance Report', 'Client Current Balance Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Balances By Matter Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Balances By Matter Report', 'Client Balances By Matter Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'CaseDiary - Daily' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('CaseDiary - Daily', 'CaseDiary - Daily.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'CaseDiary - Weekly' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('CaseDiary - Weekly', 'CaseDiary - Weekly.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Creditors Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Creditors Report', 'Aged Creditors Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt Breakdown' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt Breakdown', 'Aged Debt Breakdown.RPT',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt Weekly' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt Weekly', 'Aged Debt Weekly.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt By Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt By Dept', 'AgedDebtByDept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Aged Debt By Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Aged Debt By Work Type', 'AgedDebtByWType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Allocated Receipts' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Allocated Receipts', 'AllocatedReceipts.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Summary Report By Fee Earner' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Summary Report By Fee Earner', 'Matter Summary Report By Fe.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by FE By Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by FE By Work Type', 'Matter List by FE By WType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Charge Rates By FE By Matter' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Charge Rates By FE By Matter', 'Charge Rates By FE By Matter.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client List' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client List', 'Client List.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Statement By Matter' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Statement By Matter', 'Client Statement By Matter.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Outlay' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Outlay', 'Client Outlay.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Digital Dictations By Author' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Digital Dictations By Author', 'DigitalDictations By Author.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Digital Dictations By Handler' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Digital Dictations By Handler', 'DigitalDictations By Handler.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Digital Dictations By Typist' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Digital Dictations By Typist', 'DigitalDictations By Typist.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Est Fees Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Est Fees Date', 'Matter List by Est Fees Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'File Manager Report By Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('File Manager Report By Client', 'File Manager Report By Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'File Manager Report by ItemCode' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('File Manager Report by ItemCode', 'File Manager Report by ItemCode.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'File Manager Report by ItemType' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('File Manager Report by ItemType', 'File Manager Report by ItemType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Rec By FE By Client By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Rec By FE By Client By Period', 'Fees Rec By FE By Client By Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Profit and Loss Budget By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Profit and Loss Budget By Period', 'Profit and Loss Budget By Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Profit and Loss By Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Profit and Loss By Date', 'Profit and Loss By Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Profit and Loss Ledger' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Profit and Loss Ledger', 'Profit and Loss Ledger.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Profit and Loss Summary' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Profit and Loss Summary', 'Profit and Loss Summary.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Bills Profitibility Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Bills Profitibility Report', 'Bills Profitibility Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Profitibility By Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Profitibility By Client', 'Profitibility By Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Profitibility By Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Profitibility By Dept', 'Profitibility By Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Debtors Ledger Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Debtors Ledger Report', 'Debtors Ledger Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Draft Bills By Matter FE' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Draft Bills By Matter FE', 'Draft Bills By Matter FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Draft Bills By Billing FE' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Draft Bills By Billing FE', 'Draft Bills By Billing FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Expense Payments' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Expense Payments', 'Expense Payments.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Invoiced OS Fees' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Invoiced OS Fees', 'Invoiced OS Fees.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Summary Report By Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Summary Report By Work Type', 'Matter Summary Report By WType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matters With No Transactions' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matters With No Transactions', 'Matters NoTranactions.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Transfer Costs By Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Transfer Costs By Date', 'Transfer Costs By Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Transfer Costs By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Transfer Costs By Period', 'Transfer Costs By Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Trial Balance' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Trial Balance', 'Trial Balance.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Time Write Off By Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Time Write Off By Dept', 'Time Write Off By Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'UnBilled Outlay Days' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('UnBilled Outlay Days', 'UnBilled Outlay Days.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'UnBilled Outlay Years' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('UnBilled Outlay Years', 'UnBilled Outlay Years.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Undertakings By Undertaking Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Undertakings By Undertaking Date', 'Undertakings By UDate.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Rec By Matter By Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Rec By Matter By Date', 'Fees Rec By Matter By Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Rec By Matter By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Rec By Matter By Period', 'Fees Rec By Matter By Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List with No Account Values' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List with No Account Values', 'Matter List with No Account Values.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Analysis By FE' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Analysis By FE', 'Case Analysis By FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Analysis By Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Analysis By Date', 'Case Analysis By Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of Client Category' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of Client Category', 'List of Category.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of Departments' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of Departments', 'List of Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of Fee Earners' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of Fee Earners', 'List of Fee Earners.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of Handlers' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of Handlers', 'List of Handlers.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of Nominal Ac Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of Nominal Ac Type', 'List of Nominal Ac Types.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of Teams' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of Teams', 'List of Teams.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of VAT Codes' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of VAT Codes', 'List of VAT Codes.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'List of Work Types' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('List of Work Types', 'List of Work Types.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Supplier List' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Supplier List', 'Supplier List.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Partner' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Partner', 'Matter List by Partner.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Your Ref' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Your Ref', 'Matter List by Your Ref.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List Effectively Complete' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List Effectively Complete', 'Matter List Effectively Complete.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Outstanding Bills' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Outstanding Bills', 'OS Bills.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Acc Debit Bal Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Acc Debit Bal Report', 'Client Acc Debt Bal Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Balance 90 Days Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Balance 90 Days Report', 'Client Balance 90 Days Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Deposit Balances Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Deposit Balances Report', 'Client Deposit Balances Report .rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Outlay Balances as at a Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Outlay Balances as at a Date', 'Client Outlay Balances as at a Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Office Account Credit Balances by Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Office Account Credit Balances by Client', 'Office Credit Bal by Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Office Account Credit Balances' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Office Account Credit Balances', 'Office Credit Bal.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Ledger' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Ledger', 'Matter Ledger.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Ledger By FE' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Ledger By FE', 'Matter Ledger By FE.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Income Projection Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Income Projection Report', 'Income Projection Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Summary Report By Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Summary Report By Dept', 'Matter Summary Report By Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Outstanding Cases By ActionCode' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Outstanding Cases By ActionCode', 'Outstanding Cases By ActionCode.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Analysis By Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Analysis By Client', 'Case Analysis By Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Analysis By Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Analysis By Dept', 'Case Analysis By Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Analysis By Dept By Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Analysis By Dept By Work Type', 'Case Analysis By Dept By WType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Analysis By Work Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Analysis By Work Type', 'Case Analysis By WType.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Billing Guide Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Billing Guide Report', 'Billing Guide Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Unbilled Time Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Unbilled Time Report', 'Unbilled Time Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matters Not Billed' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matters Not Billed', 'MattersNotBilled.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Nominal Ledger by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Nominal Ledger by Date', 'Nominal Ledger by Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Nominal Ledger by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Nominal Ledger by Period', 'Nominal Ledger by Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter Ledger by Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter Ledger by Client', 'Matter Ledger by Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Action Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Action Report', 'diaryactionreport.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Debt Costing Ledger' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Debt Costing Ledger', 'debtcosting.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Client' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Client', 'Matter List by Client.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Dept' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Dept', 'Matter List by Dept.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List By Closed / Archived Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List By Closed / Archived Date', 'Matter List By Closed Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'BillingReport' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('BillingReport', 'BillingReport.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'New Cases Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('New Cases Report', 'New Cases Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Associates By Matter' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Associates By Matter', 'Case Associates By Matter.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Case Associates By Type' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Case Associates By Type', 'Case Associates By Type.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Phone Log Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Phone Log Report', 'Phone Log Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Client Balances Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Client Balances Report', 'Client Balances Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Strong Room Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Strong Room Report', 'StrongRoomReport.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List By Destroy Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List By Destroy Date', 'Matter List By Destroy Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Cheque Requisition' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Cheque Requisition', 'Cheque Requisition.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'File Manager Report By Destroy Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('File Manager Report By Destroy Date', 'File Manager Report By Destroy Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Workflow Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Workflow Report', 'Workflow Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Bank Acc Register' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Bank Acc Register', 'Bank Acc Register.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT Case Assoc Bank Acc Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT Case Assoc Bank Acc Report', 'EFT Case Assoc Bank Acc Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT Client Bank Acc Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT Client Bank Acc Report', 'EFT Client Bank Acc Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT Completed Transactions Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT Completed Transactions Report', 'EFT Completed Transactions Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT Nominal Bank Acc Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT Nominal Bank Acc Report', 'EFT Nominal Bank Acc Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT OS Transactions Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT OS Transactions Report', 'EFT OS Transactions Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT Supplier Bank Acc Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT Supplier Bank Acc Report', 'EFT Supplier Bank Acc Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List', 'Matter List.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Cheque Requisitions List' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Cheque Requisitions List', 'Cheque Requisitions List.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT Remittance' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT Remittance', 'EFTRemittance.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List By Team' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List By Team', 'Matter List by Team.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'EFT Audit Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('EFT Audit Report', 'J:\Case61xpBuild83\ReportsCR\EFT Audit Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'System Reconciliation Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('System Reconciliation Report', 'System Reconciliation Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Trial Balance by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Trial Balance by Date', 'Trial Balance by Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Trial Balance by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Trial Balance by Period', 'Trial Balance by Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Balance Sheet by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Balance Sheet by Date', 'Balance Sheet By Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Balance Sheet by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Balance Sheet by Period', 'Balance Sheet By Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Date' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Date', 'Fees Issued by Date.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Issued by Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Issued by Period', 'Fees Issued by Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Matter List by Branch' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Matter List by Branch', 'Matter List by Branch.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Nominal Account List' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Nominal Account List', 'Nominal Account List.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'VAT CashReceipts Branch' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('VAT CashReceipts Branch', 'VAT_CashReceiptsBranch.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'VAT CashReceipts Branch Summary' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('VAT CashReceipts Branch Summary', 'VAT_CashReceiptsBranch_Summary.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'VAT InvoiceBasis Branch' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('VAT InvoiceBasis Branch', 'VAT_InvoiceBasisBranch.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'VAT InvoiceBasis Branch Summary' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('VAT InvoiceBasis Branch Summary', 'VAT_InvoiceBasisBranch_Summary.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Balance Sheet' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Balance Sheet', 'Balance Sheet.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Profit and Loss By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Profit and Loss By Period', 'Profit and Loss By Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Fees Book By Period' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Fees Book By Period', 'Fees Book By Period.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'UD Billing Report' AND [report_type] = 'A') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('UD Billing Report', 'UD Billing Report.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReport] WHERE [name] = 'Third Party Ledger' AND [report_type] = '') Begin INSERT INTO [dbo].[CRReport]([name],[filename],[lastrundate],[lastruntime],[confrimparameter],[created_on],[modified_on],[status],[report_type],[notes],[synopsis]) VALUES ('Third Party Ledger', 'Third Party Ledger.rpt',null,null,0,GETDATE(),null,null,'A',null,'') End Go -- INSERT SCRIPT FOR CRParameter DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bill Layout' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Matter Code' AND [parametername] = 'mMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Matter Code','mMatter','','@s11','T','0',0,'0','0','Matters','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bill Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Draft Number' AND [parametername] = 'mDraftNo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Draft Number','mDraftNo','','@n8','N','0',0,'0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bill Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Matter Code' AND [parametername] = 'mMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Matter Code','mMatter','','@s11','T','0',0,'1','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='TimeDayBook' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Chargeable or NonChargeable Items' AND [parametername] = 'Chargeable') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Chargeable or NonChargeable Items','Chargeable','','@s12','T','0','All','0','0','','List','Chargeable|NonChargeable|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='TimeDayBook' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Handler' AND [parametername] = 'mHandler') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Handler','mHandler','','@s5','T','0',0,'1','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select field on which to Sort the Report' AND [parametername] = 'SortBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select field on which to Sort the Report','SortBy','','@s15','T','0','Priority','0','0','','List','Priority|Matter|From|ActionId|ActionCode|ActionType|ActionStatus','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Email Actions' AND [parametername] = 'ExcludeEmails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Email Actions','ExcludeEmails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Phone Call Actions' AND [parametername] = 'ExcludePhone') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Phone Call Actions','ExcludePhone','','@s1','T','0','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Notes and reminders' AND [parametername] = 'ExcludeNotesReminders') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Notes and reminders','ExcludeNotesReminders','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Action Type' AND [parametername] = 'ActionType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Action Type','ActionType','','@s15','T','0','All','0','0','','List','All|Email|Phone Message|Dictation|Appointment|Note|Reminder|Action','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Status' AND [parametername] = 'Status') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Status','Status','','@s15','T','0','Incomplete','0','0','','List','All|Incomplete|Complete','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','FromDate','','@d6','D','0','today()-7','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Handler' AND [parametername] = 'Handler') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Handler','Handler','','@s5','T','0',0,'1','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Client (Blank for All)' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Client (Blank for All)','Client','','@s6','T','0',0,'0','0','Contacts','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Zero balances' AND [parametername] = 'mZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Zero balances','mZeroBalance','','@s1','T','0','N','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Matter Description Grow' AND [parametername] = 'DescGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Matter Description Grow','DescGrow','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Group Totals' AND [parametername] = 'ShowTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Group Totals','ShowTotals','','@s1','T','0','Y','0','0','','Check Box','Y|N','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'Todate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','Todate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Client (or Blank)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Client (or Blank)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Client (or Blank)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Client (or Blank)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','Y','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Fee Earner (or Blank)' AND [parametername] = 'FEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Fee Earner (or Blank)','FEFrom','','@s5','T','0',0,'0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Fee Earner (or Blank)' AND [parametername] = 'FETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Fee Earner (or Blank)','FETo','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Fee Earners' AND [parametername] = 'ShowRtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Fee Earners','ShowRtd','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Earner From (Leave Blank for all)' AND [parametername] = 'FEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Earner From (Leave Blank for all)','FEFrom','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Earner To (Leave Blank for all)' AND [parametername] = 'FETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Earner To (Leave Blank for all)','FETo','','@s5','T','0',0,'0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Period' AND [parametername] = 'mPeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Period','mPeriodTo','','@n2','N','0',12,'0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Client (Leave Blank For all)' AND [parametername] = 'mClientFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Client (Leave Blank For all)','mClientFrom','','@s6','T','0','','0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Client (Leave Blank For all)' AND [parametername] = 'mClientTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Client (Leave Blank For all)','mClientTo','','@s6','T','0','','0','0','Contacts','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Period' AND [parametername] = 'mPeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Period','mPeriodFrom','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'mYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','mYear','','@n4','N','0','CON:YEAR','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Report Totals' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Report Totals','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Client' AND [parametername] = 'mNewPageClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Client','mNewPageClient','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Work Type' AND [parametername] = 'mWTFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Work Type','mWTFrom','','@s5','T','0','','1','0','Worktypes','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Work Type' AND [parametername] = 'mWTTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Work Type','mWTTo','','@s5','T','0','','1','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period From' AND [parametername] = 'mPeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period From','mPeriodFrom','','@n2','N','0','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period To' AND [parametername] = 'mPeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period To','mPeriodTo','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'mYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','mYear','','@n4','N','0','CON:YEAR','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals on a Separate Page' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals on a Separate Page','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period From' AND [parametername] = 'mPeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period From','mPeriodFrom','','@n2','N','0','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period To' AND [parametername] = 'mPeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period To','mPeriodTo','','@n2','N','0','12','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'mYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','mYear','','@n4','N','0','CON:YEAR','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals on a Separate Page' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals on a Separate Page','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank For all)' AND [parametername] = 'mDeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank For all)','mDeptFrom','','@s5','T','0',0,'1','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department (Leave Blank For all)' AND [parametername] = 'mDeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department (Leave Blank For all)','mDeptTo','','@s5','T','0',0,'1','0','Departments','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank For all)' AND [parametername] = 'mDeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank For all)','mDeptFrom','','@s5','T','0','','1','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department (Leave Blank For all)' AND [parametername] = 'mDeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department (Leave Blank For all)','mDeptTo','','@s5','T','0','','1','0','Departments','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Work Type (Leave Blank For all)' AND [parametername] = 'mWTFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Work Type (Leave Blank For all)','mWTFrom','','@s5','T','0','','0','0','Worktypes','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Work Type (Leave Blank For all)' AND [parametername] = 'mWTTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Work Type (Leave Blank For all)','mWTTo','','@s5','T','0','','0','0','Worktypes','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period From' AND [parametername] = 'mPeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period From','mPeriodFrom','','@n2','N','0','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period To' AND [parametername] = 'mPeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period To','mPeriodTo','','@n2','N','0','12','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'mYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','mYear','','@n4','N','0','CON:YEAR','0','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Dept' AND [parametername] = 'mNewPageDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Dept','mNewPageDept','','@s1','T','0','N','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page For Report Totals' AND [parametername] = 'mNewPageTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page For Report Totals','mNewPageTotal','','@s1','T','0','N','0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Fee Earner (Leave Blank For all)' AND [parametername] = 'mFEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Fee Earner (Leave Blank For all)','mFEFrom','','@s5','T','0','','0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Fee Earner (Leave Blank For all)' AND [parametername] = 'mFETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Fee Earner (Leave Blank For all)','mFETo','','@s5','T','0','','0','0','Fee Earner','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals on a Separate Page' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals on a Separate Page','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mDateTo','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'mDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','mDateFrom','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Period' AND [parametername] = 'mPeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Period','mPeriodTo','','@n2','N','0',12,'0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Fee Earner (Leave Blank For all)' AND [parametername] = 'mFEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Fee Earner (Leave Blank For all)','mFEFrom','','@s5','T','0','','0','0','Fee Earner','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Fee Earner (Leave Blank For all)' AND [parametername] = 'mFETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Fee Earner (Leave Blank For all)','mFETo','','@s5','T','0','','0','0','Fee Earner','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Period' AND [parametername] = 'mPeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Period','mPeriodFrom','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'mYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','mYear','','@n4','N','0','CON:YEAR','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals on a Separate Page' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals on a Separate Page','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Client (Leave Blank For all)' AND [parametername] = 'mClientFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Client (Leave Blank For all)','mClientFrom','','@s6','T','0','','0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Client (Leave Blank For all)' AND [parametername] = 'mClientTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Client (Leave Blank For all)','mClientTo','','@s6','T','0','','0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Client' AND [parametername] = 'mNewPageClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Client','mNewPageClient','','@s1','T','0','N','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for Report Totals' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for Report Totals','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mDateTo','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'mDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','mDateFrom','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank For all)' AND [parametername] = 'mDeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank For all)','mDeptFrom','','@s5','T','0','','0','0','Departments','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department (Leave Blank For all)' AND [parametername] = 'mDeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department (Leave Blank For all)','mDeptTo','','@s5','T','0','','0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals on a Separate Page' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals on a Separate Page','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mDateTo','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'mDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','mDateFrom','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Work Type (Leave Blank For all)' AND [parametername] = 'mWTTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Work Type (Leave Blank For all)','mWTTo','','@s5','T','0','','0','0','Worktypes','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals on a Separate Page' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals on a Separate Page','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mDateTo','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'mDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','mDateFrom','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Work Type (Leave Blank For all)' AND [parametername] = 'mWTFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Work Type (Leave Blank For all)','mWTFrom','','@s5','T','0',0,'0','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank For all)' AND [parametername] = 'mDeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank For all)','mDeptFrom','','@s5','T','0','','1','0','Departments','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department (Leave Blank For all)' AND [parametername] = 'mDeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department (Leave Blank For all)','mDeptTo','','@s5','T','0','','1','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Work Type (Leave Blank For all)' AND [parametername] = 'mWTFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Work Type (Leave Blank For all)','mWTFrom','','@s5','T','0','','0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Work Type (Leave Blank For all)' AND [parametername] = 'mWTTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Work Type (Leave Blank For all)','mWTTo','','@s5','T','0','','0','0','Worktypes','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Department' AND [parametername] = 'mNewPageDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Department','mNewPageDept','','@s1','T','0','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for Report Totals' AND [parametername] = 'mNewPageTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for Report Totals','mNewPageTotal','','@s1','T','0','N','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mDateTo','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'mDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','mDateFrom','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Work Type (Leave Blank For all)' AND [parametername] = 'mWTFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Work Type (Leave Blank For all)','mWTFrom','','@s5','T','0','','0','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To WorkType (Leave Blank For all)' AND [parametername] = 'mWTTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To WorkType (Leave Blank For all)','mWTTo','','@s5','T','0','','1','0','Worktypes','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Fee Earner (Leave Blank For all)' AND [parametername] = 'mFEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Fee Earner (Leave Blank For all)','mFEFrom','','@S5','T','0','','1','0','Fee Earner','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Fee Earner (Leave Blank For all)' AND [parametername] = 'mFETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Fee Earner (Leave Blank For all)','mFETo','','@S5','T','0','','1','0','Fee Earner','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Work Type' AND [parametername] = 'mNewPageWT') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Work Type','mNewPageWT','','@s1','T','0','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Report Totals' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Report Totals','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mDateTo','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'mDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','mDateFrom','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter Status' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter Status','Openclosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Lines' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Lines','ShowDetail','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Fee Earner' AND [parametername] = 'FromFe') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Fee Earner','FromFe','','@S5','T','0',0,'1','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Fee Earner' AND [parametername] = 'ToFe') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Fee Earner','ToFe','','@S5','T','0',0,'1','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT Matter Status' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT Matter Status','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show the Detail Lines' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show the Detail Lines','ShowDetail','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Client' AND [parametername] = 'mFromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Client','mFromClient','','@S6','T','0',0,'1','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Client' AND [parametername] = 'mToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Client','mToClient','','@S6','T','0',0,'1','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (Show Dates)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter Status' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter Status','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (Show Dates)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (Show Dates)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client (Blank for All)' AND [parametername] = 'mFromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client (Blank for All)','mFromClient','','@S6','T','0',0,'1','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (Show Dates)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client (Blank for All)' AND [parametername] = 'mToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client (Blank for All)','mToClient','','@S6','T','0',0,'1','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (Show Dates)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Diary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a Matter Case Code' AND [parametername] = 'mMatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a Matter Case Code','mMatterCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Zero balances' AND [parametername] = 'mZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Zero balances','mZeroBalance','','@s1','T','0','N','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow the Matter Description to Grow' AND [parametername] = 'DescGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow the Matter Description to Grow','DescGrow','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Group Totals' AND [parametername] = 'ShowTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Group Totals','ShowTotals','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'Todate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','Todate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Client (or Blank)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Client (or Blank)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Client (or Blank)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Client (or Blank)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Billing Matter' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Billing Matter','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (ShowDates) Client Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter Status' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter Status','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (ShowDates) Client Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter an Up To Date' AND [parametername] = 'UpToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter an Up To Date','UpToDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration (0000) Matters' AND [parametername] = 'Inc0000') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration (0000) Matters','Inc0000','','@s1','T','0',0,'0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP by F/e Last Billed' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Chargeable or NonChargeable Items' AND [parametername] = 'Chargeable') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Chargeable or NonChargeable Items','Chargeable','','@s12','T','0','All','0','0','','List','Chargeable|NonChargeable|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP by F/e Last Billed' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Option to Group by' AND [parametername] = 'Groupby') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Option to Group by','Groupby','','@s10','T','0','LastBilled','0','0','','List','LastBilled|Client|WType|MatterFE|FE|Dept','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP by F/e Last Billed' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP by F/e Last Billed' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Earner Code' AND [parametername] = 'FeCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Earner Code','FeCode','','@s5','T','0',0,'1','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billing Guide' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mdate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mdate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billing Guide' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Matter' AND [parametername] = 'mMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Matter','mMatter','','@s11','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statements' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mToDate','','@d6','D','0','today()','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statements' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Client (or Blank)' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Client (or Blank)','Client','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statements' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Client (or Blank)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Client (or Blank)','ToClient','','@s6','T','0',0,'1','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'No Bank holiday in the Period' AND [parametername] = 'BankHols') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'No Bank holiday in the Period','BankHols','','@n2','N','0',0,'0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Hours Per Day' AND [parametername] = 'HrsPerDay') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Hours Per Day','HrsPerDay','','@n2','N','0','07','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Mins Per Day' AND [parametername] = 'MinsPerDay') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Mins Per Day','MinsPerDay','','@n2','N','0','30','0','0','','List','00|05|10|15|20|25|30|35|40|45|50|55','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Partners' AND [parametername] = 'ShowPartners') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Partners','ShowPartners','','@s1','T','0','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Fee Earners' AND [parametername] = 'ShowFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Fee Earners','ShowFE','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Support Staff' AND [parametername] = 'ShowSS') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Support Staff','ShowSS','','@s1','T','0','Y','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Write Offs' AND [parametername] = 'InclWriteOff') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Write Offs','InclWriteOff','','@s1','T','0','Y','0','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'End Date' AND [parametername] = 'eDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'End Date','eDate','','@d6','D','0','today()','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Start Date' AND [parametername] = 'sDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Start Date','sDate','','@d6','D','0','today()-7','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired' AND [parametername] = 'ShowRtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired','ShowRtd','','@s1','T','0',0,'0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='SupplierRemittance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Payment Batch Number' AND [parametername] = 'PaymentBatchNo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Payment Batch Number','PaymentBatchNo','','@n14','N','0',0,'1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='KPI By Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Handler' AND [parametername] = 'Handler') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Handler','Handler','','@s5','T','0',0,'0','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='KPI By Department' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Department' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Department','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='KPI By Team' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Team' AND [parametername] = 'Team') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Team','Team','','@s5','T','0',0,'0','0','Teams','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Work type by Team by Fee for Month' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Month Number of first period' AND [parametername] = 'FirstPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Month Number of first period','FirstPeriod','','@n2','N','0','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Work type by Team by Fee for Month' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','Year','','@n4','N','0','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Team by Fee for Month.' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Month Number of First period' AND [parametername] = 'FirstPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Month Number of First period','FirstPeriod','','@n2','N','0',1,'1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Team by Fee for Month.' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Year','Year','','@n4','N','0','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='All Cases' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Closed Cases?' AND [parametername] = 'IncClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Closed Cases?','IncClosed','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Work Type (Leave Blank for all)' AND [parametername] = 'FromWorkType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Work Type (Leave Blank for all)','FromWorkType','','@s5','T','0',0,'1','0','Worktypes','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Work Type (Leave Blank for all)' AND [parametername] = 'ToWorkType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Work Type (Leave Blank for all)','ToWorkType','','@s5','T','0',0,'1','0','Worktypes','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Firm Case Analysis Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Year' AND [parametername] = 'FromYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Year','FromYear','','@n4','N','0','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Firm Case Analysis Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Year' AND [parametername] = 'ToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Year','ToYear','','@n4','N','0','CON:YEAR','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Firm Case Analysis Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Year Type' AND [parametername] = 'YearType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Year Type','YearType','','@s10','T','0','Financial','0','0','','List','Cal End Go ar|Financial','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter From date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter From date','FromDate','','@d6','D','0','today()','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter To Date','ToDate','','@d6','D','0','today()+60','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s12','T','0','All','1','0','','List','Not Discharged|Discharged|All','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Received' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Received','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Received' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Received','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'Noncomm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','Noncomm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Undertaking To' AND [parametername] = 'NewPagePerUndertakingTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Undertaking To','NewPagePerUndertakingTo','','@S2','T','0','N','1','0','','Check Box','N|Y','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@S14','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|ALL','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','OpenClosed','','@S15','T','0','Open','1','0','','List','Open|Closed|All','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the UnderTaking To' AND [parametername] = 'UndertakingTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the UnderTaking To','UndertakingTo','','@S28','T','0',0,'1','0','CaseAssociate','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Client Code To (Leave Blank for All)' AND [parametername] = 'ClientTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Client Code To (Leave Blank for All)','ClientTo','','@s6','T','0','','1','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Recieved' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Recieved','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s16','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|ALL','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Client' AND [parametername] = 'NewPagePerClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Client','NewPagePerClient','','@s1','T','0','Y','1','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Client Code From (Leave Blank for All)' AND [parametername] = 'ClientFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Client Code From (Leave Blank for All)','ClientFrom','','@s6','T','0',0,'1','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank for All)' AND [parametername] = 'DeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank for All)','DeptFrom','','@s6','T','0','','1','0','Departments','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department Code (Leave Blank for All)' AND [parametername] = 'DeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department Code (Leave Blank for All)','DeptTo','','@s6','T','0','','1','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Recieved' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Recieved','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Discharged Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Discharged Status','DischargeStatus','','@s16','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Department' AND [parametername] = 'NewPagePerDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Department','NewPagePerDept','','@s1','T','0','Y','1','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank for All)' AND [parametername] = 'DeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank for All)','DeptFrom','','@s6','T','0','001','1','0','Departments','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Received' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Received','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s16','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Department' AND [parametername] = 'NewPagePerDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Department','NewPagePerDept','','@s1','T','0','Y','1','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department (Leave Blank for All)' AND [parametername] = 'DeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department (Leave Blank for All)','DeptTo','','@s6','T','0','ZZZ','1','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Earner From (Leave Blank for All)' AND [parametername] = 'FEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Earner From (Leave Blank for All)','FEFrom','','@s5','T','0','','1','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Earner To (Leave Blank for All)' AND [parametername] = 'FETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Earner To (Leave Blank for All)','FETo','','@s5','T','0','','1','0','Fee Earner','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Received' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Received','GivenRec','','@s8','T','0','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s16','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Fee Earner' AND [parametername] = 'NewPagePerFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Fee Earner','NewPagePerFE','','@s1','T','0','Y','1','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s16','T','0','ALL','1','0','','List','Not Discharged|Discharged|ALL','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Matter Code' AND [parametername] = 'Matter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Matter Code','Matter','','@s11','T','0',0,'1','0','Matters','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Work Type (Leave Blank for All)' AND [parametername] = 'WTypeFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Work Type (Leave Blank for All)','WTypeFrom','','@s4','T','0','','1','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Work Type (Leave Blank for All)' AND [parametername] = 'WTypeTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Work Type (Leave Blank for All)','WTypeTo','','@s4','T','0','','1','0','Worktypes','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Received' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Received','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s16','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Work Type' AND [parametername] = 'NewPagePerWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Work Type','NewPagePerWType','','@s1','T','0','Y','1','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Earner (Leave Blank For All)' AND [parametername] = 'FeeEarner') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Earner (Leave Blank For All)','FeeEarner','','@s6','T','0','','1','0','Handlers','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Department (Leave Blank For All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Department (Leave Blank For All)','Dept','','@s6','T','0','','1','0','Departments','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Work Type (Leave Blank For All)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Work Type (Leave Blank For All)','WType','','@s8','T','0','','1','0','Worktypes','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Client From' AND [parametername] = 'ClientFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Client From','ClientFrom','','@s6','T','0','000000','1','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalances') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalances','','@s1','T','0','N','1','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Check Account Dates' AND [parametername] = 'DormantAccount') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Check Account Dates','DormantAccount','','@s1','T','0','Y','1','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Check Diary Dates' AND [parametername] = 'DormantDiary') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Check Diary Dates','DormantDiary','','@s1','T','0','Y','1','0','','Check Box','','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Check Time Entry Dates' AND [parametername] = 'DormantTimeEntry') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Check Time Entry Dates','DormantTimeEntry','','@s1','T','0','Y','1','0','','Check Box','','14') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Check Undertakings Dates' AND [parametername] = 'DormantUndertaking') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Check Undertakings Dates','DormantUndertaking','','@s1','T','0','Y','1','0','','Check Box','','15') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Check Other Edit Dates' AND [parametername] = 'ShowEditActions') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Check Other Edit Dates','ShowEditActions','','@s1','T','0','Y','1','0','','Check Box','Y¦N','17') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Fee Earner' AND [parametername] = 'NewPagePerFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Fee Earner','NewPagePerFE','','@s1','T','0','Y','1','0','','Check Box','','18') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Client To' AND [parametername] = 'ClientTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Client To','ClientTo','','@s6','T','0','ZZZZZZ','1','0','Contacts','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'No Actions Since' AND [parametername] = 'MatterDormantDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'No Actions Since','MatterDormantDate','','@d6','D','0','today() - 180','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By FE By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Statute Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Statute Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By FE By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Statute Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Statute Date','FromDate','','@d6','D','0','today()-3650','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By FE By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the FE Code (Blank for All)' AND [parametername] = 'FeCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the FE Code (Blank for All)','FeCode','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Statute Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Statute Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Statute Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Statute Date','FromDate','','@d6','D','0','today()-3650','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT Dept Code (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT Dept Code (Blank for All)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Statute Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Statute Date','FromDate','','@d6','D','0','today()-3650','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Statute Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Statute Date','ToDate','','@d6','D','0','today()+60','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Client (Blank for All)' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Client (Blank for All)','Client','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Statute Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Statute Date','FromDate','','@d6','D','0','today()-3650','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Statute Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Statute Date','ToDate','','@d6','D','0','today()+60','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the WType (Blank for All)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the WType (Blank for All)','WType','','@s5','T','0',0,'0','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Emails' AND [parametername] = 'IncludeEmails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Emails','IncludeEmails','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Time' AND [parametername] = 'Time') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Time','Time','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Diary' AND [parametername] = 'Diary') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Diary','Diary','','@s1','T','0','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Attachments' AND [parametername] = 'ShowAttachments') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Attachments','ShowAttachments','','@s1','T','0','Y','0','0','','Check Box','','14') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','ToDate','','@d6','D','0','today()','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','FromDate','','@d6','D','0','today()-10000','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Case Code' AND [parametername] = 'CaseCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Case Code','CaseCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Email Body' AND [parametername] = 'Includeemailbody') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Email Body','Includeemailbody','','@s1','T','0',0,'1','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Phone Calls' AND [parametername] = 'IncPhone') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Phone Calls','IncPhone','','@s1','T','0',0,'0','0','','Check Box','','15') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Phone Call Details' AND [parametername] = 'IncPhoneBody') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Phone Call Details','IncPhoneBody','','@s1','T','0',0,'0','0','','Check Box','','16') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Notes' AND [parametername] = 'IncNotes') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Notes','IncNotes','','@s1','T','0',0,'0','0','','Check Box','','17') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Reminders' AND [parametername] = 'IncReminders') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Reminders','IncReminders','','@s1','T','0',0,'0','0','','Check Box','','18') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Dictations' AND [parametername] = 'IncDict') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Dictations','IncDict','','@s1','T','0',0,'0','0','','Check Box','','19') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Summary Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Matter Code' AND [parametername] = 'MatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Matter Code','MatterCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given Or Received' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given Or Received','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s16','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Authorised By' AND [parametername] = 'NewPagePerAuthBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Authorised By','NewPagePerAuthBy','','@s1','T','0','Y','1','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'toDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','toDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Authorised By From (Leave Blank for All)' AND [parametername] = 'AuthByFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Authorised By From (Leave Blank for All)','AuthByFrom','','@s5','T','0',0,'1','0','Handlers','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Authorised By To (Leave Blank for All)' AND [parametername] = 'AuthByTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Authorised By To (Leave Blank for All)','AuthByTo','','@s5','T','0',0,'1','0','Handlers','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Undertakings Status To (Blank for All)' AND [parametername] = 'StatusTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Undertakings Status To (Blank for All)','StatusTo','','@s16','T','0','','1','0','UndertakingStatus','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Recieved' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Recieved','GivenRec','','@s8','T','0','All','0','0','','List','All|Given|Received','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s16','T','0','Not Discharged','1','0','','List','Not Discharged|Discharged|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','Openclosed','','@s7','T','0','Open','1','0','','List','Open|Closed|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Status' AND [parametername] = 'NewPagePerStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Status','NewPagePerStatus','','@s1','T','0','Y','1','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Undertakings Status From (Blank for All)' AND [parametername] = 'StatusFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Undertakings Status From (Blank for All)','StatusFrom','','@s16','T','0',0,'1','0','UndertakingStatus','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Fee Earner (Leave Blank For all)' AND [parametername] = 'mFEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Fee Earner (Leave Blank For all)','mFEFrom','','@s5','T','0','','0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Fee Earner (Leave Blank For all)' AND [parametername] = 'mFETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Fee Earner (Leave Blank For all)','mFETo','','@s5','T','0','','0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank For all)' AND [parametername] = 'mDeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank For all)','mDeptFrom','','@s5','T','0','','0','0','Departments','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department (Leave Blank For all)' AND [parametername] = 'mDeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department (Leave Blank For all)','mDeptTo','','@s5','T','0','','0','0','Departments','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for Report Total' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for Report Total','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date To' AND [parametername] = 'mDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date To','mDateTo','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date From' AND [parametername] = 'mDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date From','mDateFrom','','@d6','D','0','today() -30','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Fee Earner (Leave Blank For all)' AND [parametername] = 'mFEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Fee Earner (Leave Blank For all)','mFEFrom','','@s5','T','0','','0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Fee Earner (Leave Blank For all)' AND [parametername] = 'mFETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Fee Earner (Leave Blank For all)','mFETo','','@s5','T','0','','0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department (Leave Blank For all)' AND [parametername] = 'mDeptFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department (Leave Blank For all)','mDeptFrom','','@s5','T','0','','0','0','Departments','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department (Leave Blank For all)' AND [parametername] = 'mDeptTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department (Leave Blank For all)','mDeptTo','','@s5','T','0','','0','0','Departments','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period From' AND [parametername] = 'mPeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period From','mPeriodFrom','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period To' AND [parametername] = 'mPeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period To','mPeriodTo','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'mYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','mYear','','@n4','N','0','CON:YEAR','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for Report Totals' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for Report Totals','mNewPageRTotal','','@s1','T','0','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details for the Report' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details for the Report','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Matter Code' AND [parametername] = 'MatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Matter Code','MatterCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger No Money' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Matter Code' AND [parametername] = 'MatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Matter Code','MatterCode','','@s11','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger No Money WIP' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter Matter Code' AND [parametername] = 'MatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter Matter Code','MatterCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger WIP' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter in Matter Code' AND [parametername] = 'MatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter in Matter Code','MatterCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Activity List WIP' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter in Matter Code' AND [parametername] = 'MatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter in Matter Code','MatterCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Chargeable or NonChargeable Items' AND [parametername] = 'Chargeable') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Chargeable or NonChargeable Items','Chargeable','','@s12','T','0','All','0','0','','List','Chargeable|NonChargeable|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','All','1','0','','List','All|Open|Closed','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Time Entry Handler' AND [parametername] = 'mHandler') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Time Entry Handler','mHandler','','@s5','T','0',0,'1','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Hide the Totals Section' AND [parametername] = 'HideTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Hide the Totals Section','HideTotals','','@s1','T','1',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='FE By Time Task' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Task Type' AND [parametername] = 'TaskType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Task Type','TaskType','','@s6','T','0','All','0','0','','List','All|Admin|Time','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='FE By Time Task' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'DateTo' AND [parametername] = 'DateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'DateTo','DateTo','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='FE By Time Task' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date From' AND [parametername] = 'DateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date From','DateFrom','','@d6','D','0','today() -30','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='FE By Time Task' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Fee Earner. (Blank for all)' AND [parametername] = 'FeeEarner') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Fee Earner. (Blank for all)','FeeEarner','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='FE By Time Task' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Task Code. (Blank for all)' AND [parametername] = 'TaskCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Task Code. (Blank for all)','TaskCode','','@s8','T','0',0,'0','0','Task','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Task by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Task Type' AND [parametername] = 'TaskType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Task Type','TaskType','','@s6','T','0','All','0','0','','List','All|Admin|Time','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Task by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date To' AND [parametername] = 'DateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date To','DateTo','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Task by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date From' AND [parametername] = 'DateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date From','DateFrom','','@d6','D','0','today() -30','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Task by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Handler (Blank for all)' AND [parametername] = 'FeeEarner') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Handler (Blank for all)','FeeEarner','','@s5','T','0',0,'0','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Task by FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Task Code. (Blank for all)' AND [parametername] = 'TaskCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Task Code. (Blank for all)','TaskCode','','@s4','T','0',0,'0','0','Task','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Negotiation Letter By FE (FNL)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From FNL Date' AND [parametername] = 'FromFNLDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From FNL Date','FromFNLDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Negotiation Letter By FE (FNL)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the FNL To Date' AND [parametername] = 'ToFNLDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the FNL To Date','ToFNLDate','','@d6','D','0','today()','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Negotiation Letter By FE (FNL)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Fee Earner. (Blank for all)' AND [parametername] = 'FromFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Fee Earner. (Blank for all)','FromFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Negotiation Letter By FE (FNL)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Fee Earner. (Blank for all)' AND [parametername] = 'ToFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Fee Earner. (Blank for all)','ToFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Negotiation Letter By FE (FNL)' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Closed Matter' AND [parametername] = 'IncClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Closed Matter','IncClosed','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By FE By Period Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Period From' AND [parametername] = 'PeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Period From','PeriodFrom','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By FE By Period Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Period To' AND [parametername] = 'PeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Period To','PeriodTo','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By FE By Period Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','Year','','@n4','N','0','CON:YEAR','0','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By FE By Period Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Fee Earner. (Blank for all)' AND [parametername] = 'FEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Fee Earner. (Blank for all)','FEFrom','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By FE By Period Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Eaner To (Blank for all)' AND [parametername] = 'FETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Eaner To (Blank for all)','FETo','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Estimated Fees By Est fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Estimated Fees Date From' AND [parametername] = 'EstFeeDateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Estimated Fees Date From','EstFeeDateFrom','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Estimated Fees By Est fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Estimated Fees Date To' AND [parametername] = 'EstFeeDateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Estimated Fees Date To','EstFeeDateTo','','@d6','D','0','today() -365','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger for Fe between dates' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Chargeable or NonChargeable Items' AND [parametername] = 'Chargeable') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Chargeable or NonChargeable Items','Chargeable','','@s12','T','0','All','0','0','','List','Chargeable|NonChargeable|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger for Fe between dates' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger for Fe between dates' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today() -30','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger for Fe between dates' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Handler Code' AND [parametername] = 'Handler') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Handler Code','Handler','','@s5','T','0',0,'0','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger for Fe between dates' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Hide the Daily Totals Section' AND [parametername] = 'HideTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Hide the Daily Totals Section','HideTotals','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger by Matter by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger by Matter by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today() -30','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger by Matter by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Matter Code' AND [parametername] = 'FromMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Matter Code','FromMatter','','@s11','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger by Matter by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Matter Code' AND [parametername] = 'ToMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Matter Code','ToMatter','','@s11','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger By Matter By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger By Matter By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger By Matter By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Matter Code' AND [parametername] = 'Matter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Matter Code','Matter','','@s11','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger By Matter By FE By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Fee Earner Code (Blank for all)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Fee Earner Code (Blank for all)','FE','','@s5','T','0',0,'0','0','Handlers','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time for an Individual Handler' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'mDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','mDate','','@d6','D','0','today()','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time for an Individual Handler' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','mToDate','','@d6','D','0','today()','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time for an Individual Handler' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Handler Code' AND [parametername] = 'mFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Handler Code','mFE','','@s5','T','0',0,'1','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'mFromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','mFromDate','','@d6','D','0','today()','1','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','mToDate','','@d6','D','0','today()','1','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Matter (Leave Blank for All)' AND [parametername] = 'mMatterFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Matter (Leave Blank for All)','mMatterFrom','','@s11','T','0',0,'1','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Matter (Leave Blank for All)' AND [parametername] = 'mMatterTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Matter (Leave Blank for All)','mMatterTo','','@s11','T','0',0,'1','0','Matters','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'mFromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','mFromDate','','@d6','D','0','today()','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','mToDate','','@d6','D','0','today()','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for the Report Totals' AND [parametername] = 'NewPageReportTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for the Report Totals','NewPageReportTotal','','@s1','T','0','N','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Section' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Section','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Client' AND [parametername] = 'NewPageClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Client','NewPageClient','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'DateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','DateFrom','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'DateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','DateTo','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client Code (Blank for All)' AND [parametername] = 'ClientFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client Code (Blank for All)','ClientFrom','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client Code (Blank for All)' AND [parametername] = 'ClientTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client Code (Blank for All)','ClientTo','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Period From' AND [parametername] = 'PeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Period From','PeriodFrom','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Period To' AND [parametername] = 'PeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Period To','PeriodTo','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','Year','','@n4','N','0','CON:YEAR','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for the Report Totals' AND [parametername] = 'NewPageReportTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for the Report Totals','NewPageReportTotal','','@s1','T','0','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show the Matter Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show the Matter Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Client' AND [parametername] = 'NewPageClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Client','NewPageClient','','@s1','T','0','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client Code (Blank for All)' AND [parametername] = 'ClientFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client Code (Blank for All)','ClientFrom','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client Code (Blank for All)' AND [parametername] = 'ClientTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client Code (Blank for All)','ClientTo','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Chargeable, Non-Chargeable or All' AND [parametername] = 'Chargeable') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Chargeable, Non-Chargeable or All','Chargeable','','@s15','T','0','Chargeable','0','0','','List','Chargeable|NonChargeable|All','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Item to Group By' AND [parametername] = 'GroupBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Item to Group By','GroupBy','','@s15','T','0','TimeHandler','0','0','','List','Client|Dept|WType|MatterFE|InvoicedFE|TimeHandler|Matters','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details (Sorted By Value' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details (Sorted By Value','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a FE' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a FE','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Matter (Blank for all)' AND [parametername] = 'MatterFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Matter (Blank for all)','MatterFrom','','@s11','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Matter (Blank for all)' AND [parametername] = 'MatterTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Matter (Blank for all)','MatterTo','','@s11','T','0',0,'0','0','Matters','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Work Type (Blank for all)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Work Type (Blank for all)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a Dept (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a Dept (or Blank)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Group' AND [parametername] = 'NewPagePerGroup') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Group','NewPagePerGroup','','@s1','T','0',0,'0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Category Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Category Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'Todate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','Todate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Category Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Client Category Type (Blank for All)' AND [parametername] = 'CategoryType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Client Category Type (Blank for All)','CategoryType','','@s6','T','0',0,'0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters ReOpened' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a Group by Field' AND [parametername] = 'GroupBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a Group by Field','GroupBy','','@s10','T','0','NoDays','1','0','','List','FeeEarner|NoDays|Matter','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters ReOpened' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Client (Blank for All)' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Client (Blank for All)','ClientCode','','@s6','T','0',0,'1','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters ReOpened' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter a Fee Earner (Blank for all)' AND [parametername] = 'Fe') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter a Fee Earner (Blank for all)','Fe','','@s4','T','0',0,'1','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Transaction Value' AND [parametername] = 'FirstValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Transaction Value','FirstValue','','@n-20','N','0',-999999999,'0','0','','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Transaction Value' AND [parametername] = 'SecondValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Transaction Value','SecondValue','','@n-20','N','0',999999999,'0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'As At Date' AND [parametername] = 'AsAtDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'As At Date','AsAtDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Section' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Section','ShowDetail','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','0',0,'0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Transaction Value' AND [parametername] = 'FirstValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Transaction Value','FirstValue','','@n-20','N','0',-999999999,'0','0','','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Transaction Value' AND [parametername] = 'SecondValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Transaction Value','SecondValue','','@n-20','N','0',999999999,'0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'Todate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','Todate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','0',0,'0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Round to Nearest Miniute' AND [parametername] = 'RoundMins') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Round to Nearest Miniute','RoundMins','','@n2','N','0',15,'0','0','','List','05|10|15|20|30|60','14') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Critical Dates' AND [parametername] = 'IncludeCriticalDates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Critical Dates','IncludeCriticalDates','','@s1','T','0','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Dictations' AND [parametername] = 'IncludeDictations') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Dictations','IncludeDictations','','@s1','T','0','N','0','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Reminders' AND [parametername] = 'IncludeReminders') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Reminders','IncludeReminders','','@s1','T','0','N','0','0','','Check Box','','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Appointments' AND [parametername] = 'IncludeApp') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Appointments','IncludeApp','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Actions' AND [parametername] = 'IncludeActions') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Actions','IncludeActions','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Court Dates' AND [parametername] = 'IncludeCourtDates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Court Dates','IncludeCourtDates','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From date','FromDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Fee Earner' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Fee Earner','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Team' AND [parametername] = 'Team') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Team','Team','','@s5','T','0',0,'0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Email, Notes, Phone Msgs' AND [parametername] = 'IncludeOthers') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Email, Notes, Phone Msgs','IncludeOthers','','@s1','T','0',0,'0','0','','Check Box','','15') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Round to Nearest Min' AND [parametername] = 'RoundMins') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Round to Nearest Min','RoundMins','','@n2','N','0',15,'0','0','','List','05|10|15|20|30|60','14') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Appointments' AND [parametername] = 'IncludeApp') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Appointments','IncludeApp','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Actions' AND [parametername] = 'IncludeActions') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Actions','IncludeActions','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Fee Earner' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Fee Earner','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the team' AND [parametername] = 'Team') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the team','Team','','@s5','T','0',0,'0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Critical Dates' AND [parametername] = 'IncludeCriticalDates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Critical Dates','IncludeCriticalDates','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Court Dates' AND [parametername] = 'IncludeCourtDates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Court Dates','IncludeCourtDates','','@s1','T','0',0,'0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Dictations' AND [parametername] = 'IncludeDictations') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Dictations','IncludeDictations','','@s1','T','0',0,'0','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Reminders' AND [parametername] = 'IncludeReminders') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Reminders','IncludeReminders','','@s1','T','0',0,'0','0','','Check Box','','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Email, Notes, Phone Msgs' AND [parametername] = 'IncludeOthers') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Email, Notes, Phone Msgs','IncludeOthers','','@s1','T','0',0,'0','0','','Check Box','','15') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Creditors Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Up To Date' AND [parametername] = 'Date') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Up To Date','Date','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT Matter Status' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT Matter Status','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Fees Lines' AND [parametername] = 'ShowFees') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Fees Lines','ShowFees','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Outlay Lines' AND [parametername] = 'ShowOutlay') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Outlay Lines','ShowOutlay','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show VAT lines' AND [parametername] = 'ShowVAT') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show VAT lines','ShowVAT','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Totals' AND [parametername] = 'ShowTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Totals','ShowTotals','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT Up To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT Up To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Client' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Client','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Client' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Client','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Report Grouping' AND [parametername] = 'GroupBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Report Grouping','GroupBy','','@s10','T','0','Client','0','0','','List','Client|FE|Dept|WType|Branch','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter Status' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter Status','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details Lines' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details Lines','ShowDetail','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Up To Date' AND [parametername] = 'UpToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Up To Date','UpToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Department (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Department (Blank for All)','Dept','','@s4','T','0',0,'0','0','Departments','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Work Type (Blank for All)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Work Type (Blank for All)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Client (Blank for All)' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Client (Blank for All)','Client','','@s6','T','0',0,'0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Fee Earner (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Fee Earner (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter Status' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter Status','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show the Detail Lines' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show the Detail Lines','ShowDetail','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Up To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Up To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Dept (Blank for All)' AND [parametername] = 'FromDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Dept (Blank for All)','FromDept','','@s5','T','0',0,'0','0','Departments','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Dept (Blank for All)' AND [parametername] = 'ToDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Dept (Blank for All)','ToDept','','@s5','T','0',0,'0','0','Departments','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter Status' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter Status','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Lines' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Lines','ShowDetail','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Up To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Up To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Work Type (Blank for All)' AND [parametername] = 'FromWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Work Type (Blank for All)','FromWType','','@s5','T','0',0,'0','0','Worktypes','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select theTo Work Type (Blank for All)' AND [parametername] = 'ToWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select theTo Work Type (Blank for All)','ToWType','','@s5','T','0',0,'0','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Allocated Receipts' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Period','FromPeriod','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Allocated Receipts' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Period','ToPeriod','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Allocated Receipts' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Year' AND [parametername] = 'FromYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Year','FromYear','','@n4','N','0','CON:YEAR','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Allocated Receipts' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Year' AND [parametername] = 'ToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Year','ToYear','','@n4','N','0','CON:YEAR','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Allocated Receipts' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Totals for Each Period Section' AND [parametername] = 'ShowPeriodTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Totals for Each Period Section','ShowPeriodTotals','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Departments' AND [parametername] = 'IncRtdDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Departments','IncRtdDept','','@s1','T','0',0,'0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Fee Earners' AND [parametername] = 'IncRtdFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Fee Earners','IncRtdFE','','@s1','T','0',0,'0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Fee Earner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Work Types' AND [parametername] = 'IncRtdWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Work Types','IncRtdWType','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Fee Earner' AND [parametername] = 'FEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Fee Earner','FEFrom','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Fee Earner' AND [parametername] = 'FETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Fee Earner','FETo','','@s5','T','0',0,'0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Work Type' AND [parametername] = 'WTypeFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Work Type','WTypeFrom','','@s6','T','0',0,'0','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Work Type' AND [parametername] = 'WTypeTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Work Type','WTypeTo','','@s6','T','0',0,'0','0','Worktypes','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page After Fee Eaner' AND [parametername] = 'NewPageAfterFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page After Fee Eaner','NewPageAfterFE','','@s1','T','0',0,'0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Charge Rates By FE By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals' AND [parametername] = 'ShowTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals','ShowTotals','','@s1','T','0','Y','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Charge Rates By FE By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the FE (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the FE (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Charge Rates By FE By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Client (Blank for All)' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Client (Blank for All)','Client','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','All','0','0','','List','All|Open|Closed','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show InActive Clients' AND [parametername] = 'ShowInActive') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show InActive Clients','ShowInActive','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details','ShowDetails','','@s1','T','0','y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statement By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statement By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter' AND [parametername] = 'Matter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter','Matter','','@s13','T','13',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','All','0','0','','List','All|Open|Closed','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Author' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Retired FE' AND [parametername] = 'ExcludeRetiredFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Retired FE','ExcludeRetiredFE','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Author' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Support Staff' AND [parametername] = 'ExcludeSupportStaff') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Support Staff','ExcludeSupportStaff','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Author' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()','0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Author' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Author' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Matter Code (Blank For All)' AND [parametername] = 'mattercode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Matter Code (Blank For All)','mattercode','','@s11','T','0',0,'0','0','Matters','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Handler' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Retired Fee Earners' AND [parametername] = 'ExcludeRetiredFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Retired Fee Earners','ExcludeRetiredFE','','@s1','T','0','Y','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Handler' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Support Staff' AND [parametername] = 'ExcludeSupportStaff') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Support Staff','ExcludeSupportStaff','','@s1','T','0','y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Handler' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Handler' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Typist' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Outstanding Status' AND [parametername] = 'OutstandingStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Outstanding Status','OutstandingStatus','','@s15','T','0','Outstanding','0','0','','List','All|Outstanding|NotOutstanding','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Typist' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Retired Fee Earners' AND [parametername] = 'ExcludeRetiredFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Retired Fee Earners','ExcludeRetiredFE','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Typist' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Authors' AND [parametername] = 'ExcludeAuthors') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Authors','ExcludeAuthors','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Typist' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Typist' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Typist' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter a Matter (Blank for All)' AND [parametername] = 'Mattercode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter a Matter (Blank for All)','Mattercode','','@s11','T','0',0,'0','0','Matters','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Est Fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Est Fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Estimated Fees Date' AND [parametername] = 'ToEstDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Estimated Fees Date','ToEstDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Est Fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Estimated Fees Date' AND [parametername] = 'FromEstDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Estimated Fees Date','FromEstDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Est Fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Fee Earner (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Fee Earner (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Est Fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Estimated Fees Balance' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Estimated Fees Balance','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Est Fees Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow 0000 Matters' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow 0000 Matters','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'File Manager Item is IN or OUT' AND [parametername] = 'InOut') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'File Manager Item is IN or OUT','InOut','','@s5','T','0','ALL','0','0','','List','OUT|IN|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All File Manager Items' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All File Manager Items','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Item type (Blank for All)' AND [parametername] = 'ItemType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Item type (Blank for All)','ItemType','','@s15','T','0',0,'0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Only Show Items Requiring Attention' AND [parametername] = 'ReqAttn') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Only Show Items Requiring Attention','ReqAttn','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'File Manager Item is IN or OUT' AND [parametername] = 'InOut') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'File Manager Item is IN or OUT','InOut','','@s5','T','0','ALL','0','0','','List','OUT|IN|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All File Manager Items' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All File Manager Items','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client (blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client (blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Item Type' AND [parametername] = 'ItemType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Item Type','ItemType','','@s15','T','0',0,'0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Only Show Items Requiring Attention' AND [parametername] = 'ReqAttn') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Only Show Items Requiring Attention','ReqAttn','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'File Manager Item is IN or OUT' AND [parametername] = 'InOut') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'File Manager Item is IN or OUT','InOut','','@s5','T','0','ALL','0','0','','List','OUT|IN|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All File Manager Items' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All File Manager Items','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Item Type' AND [parametername] = 'ItemType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Item Type','ItemType','','@s15','T','0',0,'0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Only Show Items Requiring Attention' AND [parametername] = 'ReqAttn') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Only Show Items Requiring Attention','ReqAttn','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Period To Display First' AND [parametername] = 'Period') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Period To Display First','Period','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Financial Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Financial Year','Year','','@n4','N','0','CON:YEAR','0','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Fee Earner Type' AND [parametername] = 'FeType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Fee Earner Type','FeType','','@s10','T','0','InvoicedFE','0','0','','List','InvoicedFE|MatterFE','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Hide Details Sections' AND [parametername] = 'HideDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Hide Details Sections','HideDetail','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Start of Year Date' AND [parametername] = 'StartOfYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Start of Year Date','StartOfYear','','@d6','D','0','today()','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Fee Earner (blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Fee Earner (blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for all)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for all)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Budget By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period' AND [parametername] = 'Period') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period','Period','','@s2','T','2','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Budget By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Budget By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Forward Postings' AND [parametername] = 'IncludeForwardPostings') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Forward Postings','IncludeForwardPostings','','@s1','T','1','N','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Budget By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Adjust for Accruals/Prepayments' AND [parametername] = 'AdjustForAccruals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Adjust for Accruals/Prepayments','AdjustForAccruals','','@s1','T','1','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Budget By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','1','0','Branch','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Budget By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Nominals' AND [parametername] = 'ShowRetired') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Nominals','ShowRetired','','@s1','T','1',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Up to Year' AND [parametername] = 'UpToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Up to Year','UpToYear','','@n4','N','4','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date Type' AND [parametername] = 'DateType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date Type','DateType','','@s16','T','16','Transaction Date','1','0','','List','Transaction Date|Entry Date','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','FromDate','','@d6','D','10','LOC:StartOfYear','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','ToDate','','@d6','D','10','today()','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Nominals' AND [parametername] = 'ShowRetired') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Nominals','ShowRetired','','@s1','T','1',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Transaction Date or Entry Date' AND [parametername] = 'DateType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Transaction Date or Entry Date','DateType','','@d12','T','0','Transaction Date','0','0','','List','Transaction Date|Entry Date','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Nominal Account' AND [parametername] = 'NominalAcc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Nominal Account','NominalAcc','','@s15','T','0',0,'0','0','Nominals','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Period' AND [parametername] = 'Period') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Period','Period','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Adjust For Accruals' AND [parametername] = 'AdjForAccruals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Adjust For Accruals','AdjForAccruals','','@s1','T','0','y','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Fwd Postings' AND [parametername] = 'IncFwdPosting') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Fwd Postings','IncFwdPosting','','@s1','T','0','Y','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Recovery is ShortFall/Surplus' AND [parametername] = 'Recovery') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Recovery is ShortFall/Surplus','Recovery','','@s10','T','0','All','0','0','','List','All|ShortFall|Surplus','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','All','1','0','','List','All|Open|Closed','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter Department (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter Department (Blank for All)','Dept','','@s6','T','0',0,'1','0','Departments','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter Worktype (Blank for All)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter Worktype (Blank for All)','WType','','@s6','T','0',0,'1','0','Worktypes','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Recovery is Shortfall or Surplus' AND [parametername] = 'Recovery') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Recovery is Shortfall or Surplus','Recovery','','@s10','T','0','All','0','0','','List','All|Shortfall|Surplus','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Use Date Filters Below' AND [parametername] = 'FilterDates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Use Date Filters Below','FilterDates','','@s14','T','0','LastBilledDate','0','0','','List','LastBilledDate|InvoiceDate','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0','N','0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client (Blank for all)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client (Blank for all)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (Blank for all)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (Blank for all)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a FE (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a FE (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Dept (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Dept (Blank for All)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Work Type (or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Work Type (or Blank)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Recovery is Shortfall or Surplus' AND [parametername] = 'Recovery') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Recovery is Shortfall or Surplus','Recovery','','@s10','T','0','All','0','0','','List','All|Shortfall|Surplus','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Filter on the Date Range' AND [parametername] = 'FilterDates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Filter on the Date Range','FilterDates','','@s14','T','0','LastBilledDate','0','0','','List','LastBilledDate|InvoiceDate','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0','N','0','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the FE (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the FE (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Dept (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Dept (Blank for All)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Work Type (or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Work Type (or Blank)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Debtors Ledger Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Matter (required)' AND [parametername] = 'Matter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Matter (required)','Matter','','@s11','T','0',' ','1','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Debtors Ledger Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Date' AND [parametername] = 'Date') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Date','Date','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Debtors Ledger Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Matter FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Matter FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Matter FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Fee Earner' AND [parametername] = 'FromFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Fee Earner','FromFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Matter FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the ToFee Earner' AND [parametername] = 'ToFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the ToFee Earner','ToFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Billing FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Billing FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Billing FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Billing Logon User Name' AND [parametername] = 'UserFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Billing Logon User Name','UserFrom','','@s10','T','0',0,'0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Billing FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Billing Logon User Name' AND [parametername] = 'UserTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Billing Logon User Name','UserTo','','@s10','T','0',0,'0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Expense Payments' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Up To Period' AND [parametername] = 'PeriodUpTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Up To Period','PeriodUpTo','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Expense Payments' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Expense Payments' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Expenses' AND [parametername] = 'ShowZeroExpenses') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Expenses','ShowZeroExpenses','','@s1','T','0','N','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Expense Payments' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Invoiced OS Fees' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Invoiced OS Fees' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'DateFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','DateFrom','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Invoiced OS Fees' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'DateTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','DateTo','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Invoiced OS Fees' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Matter (Blank for All)' AND [parametername] = 'MatterFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Matter (Blank for All)','MatterFrom','','@s11','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Invoiced OS Fees' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Matter (Blank for All)' AND [parametername] = 'MatterTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Matter (Blank for All)','MatterTo','','@s11','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Departments' AND [parametername] = 'IncRtdDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Departments','IncRtdDept','','@s1','T','0',0,'0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Fee Earners' AND [parametername] = 'IncRtdFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Fee Earners','IncRtdFE','','@s1','T','0',0,'0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Work Types' AND [parametername] = 'IncRtdWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Work Types','IncRtdWType','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters With No Transactions' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter Client Code (Blank for All)' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter Client Code (Blank for All)','ClientCode','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Client Bank (optional)' AND [parametername] = 'ClientBank') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Client Bank (optional)','ClientBank','','@s15','T','0',0,'0','0','Bank','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Period','FromPeriod','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Period','ToPeriod','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','Year','','@n4','N','0','CON:YEAR','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Client Bank (optional)' AND [parametername] = 'ClientBank') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Client Bank (optional)','ClientBank','','@s15','T','0',0,'0','0','Bank','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Forward Postings' AND [parametername] = 'IncludeFwdPostings') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Forward Postings','IncludeFwdPostings','','@s1','T','1','N','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Adjust for Accruals/Prepayments' AND [parametername] = 'AdjustForAccruals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Adjust for Accruals/Prepayments','AdjustForAccruals','','@s1','T','1','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','1','Y','1','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetail','','@s1','T','1',0,'0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Write Off By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Write Off By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Write Off By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Write Off By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Dept' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Dept','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or all' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or all','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Up To Date' AND [parametername] = 'UpToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Up To Date','UpToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Matter (Blank for All)' AND [parametername] = 'FromMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Matter (Blank for All)','FromMatter','','@s11','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Matter (Blank for All)' AND [parametername] = 'ToMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Matter (Blank for All)','ToMatter','','@s11','T','0',0,'0','0','Matters','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matters with Zero Unbilled Outlay Value' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matters with Zero Unbilled Outlay Value','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or all' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or all','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'As At Date' AND [parametername] = 'AsAtDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'As At Date','AsAtDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Matter(Blank for All)' AND [parametername] = 'FromMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Matter(Blank for All)','FromMatter','','@s11','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Matter(Blank for All)' AND [parametername] = 'ToMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Matter(Blank for All)','ToMatter','','@s11','T','0',0,'0','0','Matters','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matters with Zero Unbilled Outlay Value' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matters with Zero Unbilled Outlay Value','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Given or Received' AND [parametername] = 'GivenRec') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Given or Received','GivenRec','','@s8','T','8','All','0','0','','List','All|Given|Received','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Financial or Documentation' AND [parametername] = 'FinDoc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Financial or Documentation','FinDoc','','@s12','T','0','All','0','0','','List','All|FinanceOnly|DocumentOnly','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Commercial or Non Commercial' AND [parametername] = 'NonComm') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Commercial or Non Commercial','NonComm','','@s8','T','8','All','0','0','','List','All|Comm|NonComm','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Discharge Status' AND [parametername] = 'DischargeStatus') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Discharge Status','DischargeStatus','','@s15','T','0','Not Discharged','0','0','','List','Not Discharged|Discharged|All','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Reporting Lavel' AND [parametername] = 'ReportingLevel') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Reporting Lavel','ReportingLevel','','@s11','T','0','Full Details','0','0','','List','Summary Level|Matter Level|Full Details','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT an Option To Group By' AND [parametername] = 'Groupby') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT an Option To Group By','Groupby','','@s15','T','0','InvoicedFE','0','0','','List','Client|Dept|WType|Matters|MatterFE|InvoicedFE|Branch','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select an additional Option To Group By' AND [parametername] = 'Groupby2') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select an additional Option To Group By','Groupby2','','@s15','T','0','InvoicedFE','0','0','','List','Client|Dept|WType|Matters|MatterFE|InvoicedFE|Branch','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s10','T','10','GLO:Branch','1','0','Branch','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (Blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Matter FE (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Matter FE (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Period','FromPeriod','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Period','ToPeriod','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Year','Year','','@n4','N','0','CON:YEAR','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Level of Detail for the Report' AND [parametername] = 'ReportingLevel') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Level of Detail for the Report','ReportingLevel','','@s15','T','0','Full Details','0','0','','List','Summary Level|Matter Level|Full Details','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT an Option To Group By' AND [parametername] = 'GroupBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT an Option To Group By','GroupBy','','@s15','T','0','InvoicedFE','0','0','','List','Client|Dept|WType|Matters|MatterFE|InvoicedFE|Branch','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select an Additional Option to Group By' AND [parametername] = 'GroupBy2') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select an Additional Option to Group By','GroupBy2','','@s15','T','0','InvoicedFE','0','0','','List','Client|Dept|WType|Matters|MatterFE|InvoicedFE|Branch','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s10','T','10','GLO:Branch','1','0','Branch','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Client (Blank for All)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Client (Blank for All)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Client (blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Client (blank for All)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Matter FE (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Matter FE (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalance','','@s1','T','0','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Fee Earners' AND [parametername] = 'IncRtdFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Fee Earners','IncRtdFE','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Fee Earner (or Blank)' AND [parametername] = 'Fee') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Fee Earner (or Blank)','Fee','','@s5','T','0',0,'0','0','Fee Earner','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Dept (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Dept (Blank for All)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Work Type (or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Work Type (or Blank)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Client Code (or Blank)' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Client Code (or Blank)','Client','','@s6','T','0',0,'0','0','Contacts','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balance' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balance','ShowZeroBalance','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Retired Fee Earners' AND [parametername] = 'ShowRtdFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Retired Fee Earners','ShowRtdFE','','@s1','T','0','Y','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Fields to Grow' AND [parametername] = 'AllowFieldsGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Fields to Grow','AllowFieldsGrow','','@s1','T','0','Y','0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Lines' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Lines','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Fee Earner (or Blank)' AND [parametername] = 'FromFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Fee Earner (or Blank)','FromFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Fee Earner (or Blank)' AND [parametername] = 'ToFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Fee Earner (or Blank)','ToFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Dept (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Dept (or Blank)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Worktype' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Worktype','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Fee Earner (or Blank)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Fee Earner (or Blank)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Dept (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Dept (Blank for All)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Work Type' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Work Type','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Departments' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show retired Depts' AND [parametername] = 'Showrtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show retired Depts','Showrtd','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Fee Earners' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Fee Earners' AND [parametername] = 'ShowRtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Fee Earners','ShowRtd','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Handlers' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Handlers' AND [parametername] = 'ShowRtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Handlers','ShowRtd','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Teams' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired' AND [parametername] = 'ShowRtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired','ShowRtd','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Teams' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Handlers' AND [parametername] = 'ShowFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Handlers','ShowFE','@s1','','T','0','Y','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Work Types' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Work Types' AND [parametername] = 'ShowRtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Work Types','ShowRtd','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Third Party or Not' AND [parametername] = 'ThirdParty') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Third Party or Not','ThirdParty','','@s10','T','0','All','0','0','','List','All|ThirdPartyOnly|NotThirdParty','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Address to Grow' AND [parametername] = 'AddressGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Address to Grow','AddressGrow','','@s1','T','0','N','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Suppliers' AND [parametername] = 'IncRetired') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Suppliers','IncRetired','','@s1','T','0','N','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Forward Balances' AND [parametername] = 'IncFwdBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Forward Balances','IncFwdBal','','@s1','T','0','N','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Order the Results By' AND [parametername] = 'OrderBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Order the Results By','OrderBy','','@s10','T','0','SupplierCode','0','0','','List','Service|SupplierCode|SupplierName','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the As At a Date' AND [parametername] = 'AsAtDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the As At a Date','AsAtDate','','@d6','D','0','today()','0','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Matter Partner (Blank for all)' AND [parametername] = 'PartnerFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Matter Partner (Blank for all)','PartnerFrom','','@s5','T','0',0,'0','0','Partner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Matter Partner (Blank for all)' AND [parametername] = 'PartnerTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Matter Partner (Blank for all)','PartnerTo','','@s5','T','0',0,'0','0','Partner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Your Ref From' AND [parametername] = 'YourRefFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Your Ref From','YourRefFrom','','@s15','T','0',0,'0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Your Ref To (or Blank)' AND [parametername] = 'YourRefTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Your Ref To (or Blank)','YourRefTo','','@s15','T','0',0,'0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Client Code (or Blank)' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Client Code (or Blank)','ClientCode','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalances') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalances','','@s1','T','0',0,'0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List Effectively Complete' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalances') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalances','','@s1','T','0','N','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Client' AND [parametername] = 'NewPagePerClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Client','NewPagePerClient','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'mToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','mToDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the from Client' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the from Client','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Hide Report Totals' AND [parametername] = 'HideTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Hide Report Totals','HideTotals','','@s1','T','0',0,'0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Transaction Value' AND [parametername] = 'FirstValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Transaction Value','FirstValue','','@n-20','N','0',-999999999,'0','0','','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Transaction Value' AND [parametername] = 'SecondValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Transaction Value','SecondValue','','@n-20','N','0',999999999,'0','0','','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Section' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Section','ShowDetail','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the As At Date' AND [parametername] = 'AsAtDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the As At Date','AsAtDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client (or Blank)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client (or Blank)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (or Blank)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (or Blank)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Deposit Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','All','0','0','','List','Open|Closed|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Deposit Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Zero Balances' AND [parametername] = 'IncZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Zero Balances','IncZeroBals','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Deposit Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for all)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for all)','Branch','','@s10','T','10',0,'0','0','Branch','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalance','','@s1','T','0','N','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Report Totals' AND [parametername] = 'ShowTotals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Report Totals','ShowTotals','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow the Description to Grow' AND [parametername] = 'DescGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow the Description to Grow','DescGrow','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Up To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Up To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client (or Blank)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client (or Blank)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (or Blank)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (or Blank)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Client Code (Blank for All)' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Client Code (Blank for All)','ClientCode','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Forward Balance' AND [parametername] = 'IncFwdBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Forward Balance','IncFwdBal','','@s1','T','0','N','0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Empty/NonEmpty Matter Ledgers' AND [parametername] = 'FilledEmpty') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Empty/NonEmpty Matter Ledgers','FilledEmpty','','@s6','T','0','All','0','0','','List','All|Filled|Empty','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Closed Matters' AND [parametername] = 'IncClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Closed Matters','IncClosed','','@s1','T','0','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Ignore Date Filters Below' AND [parametername] = 'Alldates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Ignore Date Filters Below','Alldates','','@s1','T','0','Y','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Client Details' AND [parametername] = 'ShowClientDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Client Details','ShowClientDetails','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Matter Code (Blank for All)' AND [parametername] = 'Matter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Matter Code (Blank for All)','Matter','','@s11','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Empty/NonEmpty Matter Ledgers' AND [parametername] = 'FilledEmpty') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Empty/NonEmpty Matter Ledgers','FilledEmpty','','@s6','T','0','Filled','0','0','','List','All|Filled|Empty','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Closed Matters' AND [parametername] = 'IncClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Closed Matters','IncClosed','','@s1','T','0','N','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Ignore Date Filters Below' AND [parametername] = 'AllDates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Ignore Date Filters Below','AllDates','','@s1','T','0','Y','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Client Details' AND [parametername] = 'ShowClientDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Client Details','ShowClientDetails','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From FE (Blank for All)' AND [parametername] = 'FromFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From FE (Blank for All)','FromFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To FE (Blank for All)' AND [parametername] = 'ToFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To FE (Blank for All)','ToFE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Income Projection Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Start Month Number' AND [parametername] = 'StartMonth') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Start Month Number','StartMonth','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Income Projection Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Year','Year','','@n4','N','0','CON:YEAR','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Income Projection Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Fee Type' AND [parametername] = 'FeeType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Fee Type','FeeType','','@s10','T','0','Est','0','0','','List','FixedOnly|Est|Value','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Departments' AND [parametername] = 'IncRtdDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Departments','IncRtdDept','','@s1','T','0',0,'0','0','','Check Box','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Fee Earners' AND [parametername] = 'IncRtdFE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Fee Earners','IncRtdFE','','@s1','T','0',0,'0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Work Types' AND [parametername] = 'IncRtdWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Work Types','IncRtdWType','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Cases By ActionCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Critical Actions Only' AND [parametername] = 'CriticalAction') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Critical Actions Only','CriticalAction','','@s1','T','0','N','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Cases By ActionCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Unassigned Actions' AND [parametername] = 'ShowUnassigned') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Unassigned Actions','ShowUnassigned','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Cases By ActionCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Diary Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Diary Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Cases By ActionCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Diary Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Diary Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Cases By ActionCode' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Diary ActionCode (or Blank)' AND [parametername] = 'DiaryActionCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Diary ActionCode (or Blank)','DiaryActionCode','','@s15','T','0',0,'1','0','Action','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalance','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Description Fields to Grow' AND [parametername] = 'AllowFieldsGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Description Fields to Grow','AllowFieldsGrow','','@s1','T','0','Y','0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Lines' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Lines','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Client(or Blank)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Client(or Blank)','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Client (or Blank)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Client (or Blank)','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Fee Earner (or Blank)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Fee Earner (or Blank)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter a Dept (Blank for All )' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter a Dept (Blank for All )','Dept','','@s6','T','0',0,'0','0','Departments','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter a Work Type (Blank for All)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter a Work Type (Blank for All)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balance Matters' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balance Matters','ShowZeroBalance','','@s1','T','0','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Desc Fields to Grow' AND [parametername] = 'AllowFieldsGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Desc Fields to Grow','AllowFieldsGrow','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Lines' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Lines','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Fee Earner (or Blank)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Fee Earner (or Blank)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Dept (or Blank)' AND [parametername] = 'FromDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Dept (or Blank)','FromDept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Dept (or Blank)' AND [parametername] = 'ToDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Dept (or Blank)','ToDept','','@s5','T','0',0,'0','0','Departments','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Work Type' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Work Type','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balance' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balance','ShowZeroBalance','','@s1','T','0','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Description Fields to Grow' AND [parametername] = 'AllowFieldsGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Description Fields to Grow','AllowFieldsGrow','','@s1','T','0','Y','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Lines' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Lines','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Fee Earner(Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Fee Earner(Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the From Dept (or Blank)' AND [parametername] = 'FromDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the From Dept (or Blank)','FromDept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the To Dept (Blank for All)' AND [parametername] = 'ToDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the To Dept (Blank for All)','ToDept','','@s5','T','0',0,'0','0','Departments','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Work Type (or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Work Type (or Blank)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0','N','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalance','','@s1','T','0','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Description Fields to Grow' AND [parametername] = 'AllowFieldsGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Description Fields to Grow','AllowFieldsGrow','','@s1','T','0','Y','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Detail Lines' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Detail Lines','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Work Type (or Blank)' AND [parametername] = 'FromWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Work Type (or Blank)','FromWType','','@s6','T','0',0,'0','0','Worktypes','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Work Type (or Blank)' AND [parametername] = 'ToWType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Work Type (or Blank)','ToWType','','@s6','T','0',0,'0','0','Worktypes','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Dept (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Dept (or Blank)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the FE (Blank for All)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the FE (Blank for All)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billing Guide Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'mDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','mDate','','@d6','D','0','today()','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billing Guide Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Matter code' AND [parametername] = 'mMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Matter code','mMatter','','@s15','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Chargeable, NonChargeable or All' AND [parametername] = 'Chargeable') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Chargeable, NonChargeable or All','Chargeable','','@s14','T','0','Chargeable','0','0','','List','All|Chargeable|NonChargeable','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT an Option to Group By' AND [parametername] = 'GroupBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT an Option to Group By','GroupBy','','@s15','T','0','TimeHandler','0','0','','List','Client|Matters|Dept|WType|MatterFELastBilled|TimeHandler','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Exclude Administrative (0000) Matters' AND [parametername] = 'Exclude0000') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Exclude Administrative (0000) Matters','Exclude0000','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details Section' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details Section','ShowDetails','','@s1','T','0','Y','0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please enter the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Matter' AND [parametername] = 'FromMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Matter','FromMatter','','@s11','T','0',0,'0','0','Matters','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Matter' AND [parametername] = 'ToMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Matter','ToMatter','','@s11','T','0',0,'0','0','Matters','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a FE (or Blank)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a FE (or Blank)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a Dept (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a Dept (or Blank)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a WType [ (or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a WType [ (or Blank)','WType','','@s5','T','0',0,'0','0','Worktypes','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances Matters' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances Matters','ShowZeroBal','','@s1','T','0',0,'0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters Not Billed' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Client Code' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Client Code','ClientCode','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','0','today() -365','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Nominal (leave Blank for All)' AND [parametername] = 'FromNom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Nominal (leave Blank for All)','FromNom','','@s25','T','25',0,'0','0','Nominals','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Nominal (leave Blank for All)' AND [parametername] = 'ToNom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Nominal (leave Blank for All)','ToNom','','@s25','T','25',0,'0','0','Nominals','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Period' AND [parametername] = 'PeriodFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Period','PeriodFrom','','@n2','N','0','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Period' AND [parametername] = 'PeriodTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Period','PeriodTo','','@n2','N','0','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Nominal (leave Blank for All)' AND [parametername] = 'FromNom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Nominal (leave Blank for All)','FromNom','','@s25','T','25',0,'0','0','Nominals','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Nominal (leave Blank for All)' AND [parametername] = 'ToNom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Nominal (leave Blank for All)','ToNom','','@s25','T','25',0,'0','0','Nominals','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Empty/NonEmpty Matter Ledgers' AND [parametername] = 'FilledEmpty') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Empty/NonEmpty Matter Ledgers','FilledEmpty','','@s6','T','0','Filled','0','0','','List','All|Filled|Empty','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Ignore Date Filters Below' AND [parametername] = 'Alldates') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Ignore Date Filters Below','Alldates','','@s1','T','0','Y','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Closed Matters' AND [parametername] = 'IncClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Closed Matters','IncClosed','','@s1','T','0','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Client Details' AND [parametername] = 'ShowClientDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Client Details','ShowClientDetails','','@s1','T','0','Y','0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Date','FromDate','','@d6','D','0','today()-30','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Client Code (Blank for all)' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Client Code (Blank for all)','ClientCode','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Action Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Action ID' AND [parametername] = 'ActionId') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Action ID','ActionId','','@n12','N','0',0,'1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Debt Costing Ledger' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Matter Code' AND [parametername] = 'matter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Matter Code','matter','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or all' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or all','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Client' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Client','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Client' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Client','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Client' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Department' AND [parametername] = 'FromDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Department','FromDept','','@s5','T','0',0,'0','0','Departments','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Department' AND [parametername] = 'ToDept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Department','ToDept','','@s5','T','0',0,'0','0','Departments','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Dept' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the To Closed Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the To Closed Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the From Closed Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the From Closed Date','FromDate','','@d6','D','0','today()-365','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a FE (Blank for All)' AND [parametername] = 'Fee') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a FE (Blank for All)','Fee','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Department (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Department (Blank for All)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select a Work Type (Blank for All)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select a Work Type (Blank for All)','WType','','@s6','T','0',0,'0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Administration Matters (0000)' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Administration Matters (0000)','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Archived Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Archived Details','ShowDetails','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Destroy Date Details' AND [parametername] = 'ShowDestroyDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Destroy Date Details','ShowDestroyDate','','@s1','T','0',0,'0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='BillingReport' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Invoice Number' AND [parametername] = 'pInvoiceNo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Invoice Number','pInvoiceNo','','@n9','N','9',0,'1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='BillingReport' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date To' AND [parametername] = 'pToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date To','pToDate','','@d6','D','0','today()','1','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='BillingReport' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'pFromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','pFromDate','','@d6','D','0','today() -365','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='BillingReport' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Matter Code' AND [parametername] = 'pMatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Matter Code','pMatterCode','','@s11','T','0',0,'1','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Group By option' AND [parametername] = 'GroupBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Group By option','GroupBy','','@s10','T','0','Matters','0','0','','List','FE|Dept|WType|Matters','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the FE (or Blank)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the FE (or Blank)','FE','','@s5','T','0',0,'0','0','Fee Earner','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Dept (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Dept (or Blank)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Work type(or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Work type(or Blank)','WType','','@s5','T','0',0,'0','0','Fee Earner','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show the Matter Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show the Matter Details','ShowDetails','','@s1','T','0',0,'0','0','','Check Box','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Administration Matters' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Administration Matters','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show the Report Summary' AND [parametername] = 'ShowSummary') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show the Report Summary','ShowSummary','','@s1','T','0',0,'0','0','','Check Box','','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Matter Details' AND [parametername] = 'ShowMatterDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Matter Details','ShowMatterDetails','','@s1','T','0','Y','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Matter' AND [parametername] = 'FromMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Matter','FromMatter','','@s12','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Matter' AND [parametername] = 'ToMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Matter','ToMatter','','@s12','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Case Associate Type Code Search Box' AND [parametername] = 'CaseAssocType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Case Associate Type Code Search Box','CaseAssocType','','@s12','T','0',0,'0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Matter' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Alow Description to Grow' AND [parametername] = 'AllowDescGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Alow Description to Grow','AllowDescGrow','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Matter' AND [parametername] = 'FromMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Matter','FromMatter','','@s11','T','0',0,'0','0','Matters','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Matter' AND [parametername] = 'ToMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Matter','ToMatter','','@s11','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Description To Grow' AND [parametername] = 'AllowDescGrow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Description To Grow','AllowDescGrow','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Type' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Case Associate Type Code Search Box' AND [parametername] = 'CaseAssocType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Case Associate Type Code Search Box','CaseAssocType','','@s12','T','0',0,'0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Status' AND [parametername] = 'Status') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Status','Status','','@s10','T','0','Complete','0','0','','List','All|Complete|Incomplete','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetails') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetails','','@s7','T','7','Full','1','0','','List','Full|Summary|Hidden','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the field to Group By' AND [parametername] = 'GroupBy') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the field to Group By','GroupBy','','@s15','T','0','Priority','0','0','','List','Priority|Matter|ActionId|ActionCode|Date','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'Todate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','Todate','','@d6','D','0','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Handler' AND [parametername] = 'Handler') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Handler','Handler','','@s5','T','0',0,'0','0','Handlers','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Handlers' AND [parametername] = 'ShowRtd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Handlers','ShowRtd','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Matter' AND [parametername] = 'FromMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Matter','FromMatter','','@s11','T','0',0,'0','0','Matters','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Matter' AND [parametername] = 'ToMatter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Matter','ToMatter','','@s11','T','0',0,'0','0','Matters','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Group' AND [parametername] = 'NewPagePerGroup') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Group','NewPagePerGroup','','@s1','T','1',0,'0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Transaction Value' AND [parametername] = 'FirstValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Transaction Value','FirstValue','','@n-20','N','0',-999999999,'0','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Transaction Value' AND [parametername] = 'SecondValue') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Transaction Value','SecondValue','','@n-20','N','0',999999999,'0','0','','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or all' AND [parametername] = 'Openclosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or all','Openclosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Check Office Balances' AND [parametername] = 'OfficeBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Check Office Balances','OfficeBals','','@s1','T','0','Y','0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Check Client Balances' AND [parametername] = 'ClientBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Check Client Balances','ClientBal','','@s1','T','0','Y','0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Client code' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Client code','ClientCode','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','0',0,'0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Sort Report By' AND [parametername] = 'Sort') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Sort Report By','Sort','','@s10','T','0','Date','0','0','','List','Number|Client|Date','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter The From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter The From Date','FromDate','','@d6','D','0','today() - 365','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Client Code (or Blank)' AND [parametername] = 'ClientCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Client Code (or Blank)','ClientCode','','@s6','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Matter Code (or Blank)' AND [parametername] = 'MatterCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Matter Code (or Blank)','MatterCode','','@s11','T','0',0,'0','0','Matters','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Fee Earner (or blank)' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Fee Earner (or blank)','FE','','@s5','T','0',0,'0','0','Handlers','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Apply the Date Filters Above' AND [parametername] = 'DateFilter') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Apply the Date Filters Above','DateFilter','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Item Type Code (Blank for All)' AND [parametername] = 'ItemType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Item Type Code (Blank for All)','ItemType','','@s10','T','0',0,'0','0','','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'File Manager Item Status' AND [parametername] = 'Status') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'File Manager Item Status','Status','','@n1','T','0',0,'0','0','','Entry','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Location (Blank for all)' AND [parametername] = 'Location') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Location (Blank for all)','Location','','@s10','T','0',0,'0','0','','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter a BOX NUMBER (or Blank)' AND [parametername] = 'BoxNo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter a BOX NUMBER (or Blank)','BoxNo','','@s10','T','0',0,'0','0','','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Search Code (or Blank)' AND [parametername] = 'SearchCode') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Search Code (or Blank)','SearchCode','','@s20','T','0',0,'0','0','','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open or Closed Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open or Closed Matters','OpenClosed','','@s6','T','6','All','1','0','','List','All|Open|Closed','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Date Type' AND [parametername] = 'DateType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Date Type','DateType','','@s22','T','22','Expected Destroy Date','1','0','','List','Expected Destroy Date|Destroy Date|Archive Date','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'Todate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','Todate','','@d6','D','0','today()+365','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the FE (or Blank)' AND [parametername] = 'Fee') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the FE (or Blank)','Fee','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Dept (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Dept (or Blank)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Work Type (or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Work Type (or Blank)','WType','','@s5','T','0',0,'0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Client (or Blank)' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Client (or Blank)','Client','','@s10','T','10',0,'0','0','Contacts','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Cheque Requisition' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Enter the Cheque Requisition Number' AND [parametername] = 'ReqNo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Enter the Cheque Requisition Number','ReqNo','','@n15','N','0',0,'0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'File Manager Item is IN or OUT' AND [parametername] = 'InOut') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'File Manager Item is IN or OUT','InOut','','@s5','T','0','ALL','0','0','','List','OUT|IN|ALL','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Fee Earner' AND [parametername] = 'Fee') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Fee Earner','Fee','','@s5','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Department (or blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Department (or blank)','Dept','','@s5','T','0',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Work type (or blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Work type (or blank)','WType','','@s5','T','0',0,'0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Only Show Items Requiring Attention' AND [parametername] = 'ReqAttn') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Only Show Items Requiring Attention','ReqAttn','','@s1','T','0',0,'0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Workflow Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Workflow (or Blank)' AND [parametername] = 'Workflow') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Workflow (or Blank)','Workflow','','@s4','T','0',0,'0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bank Acc Register' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'pYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','pYear','','@n4','N','4','CON:YEAR','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bank Acc Register' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Bank Accounts' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Bank Accounts','OpenClosed','','@s6','T','0','Open','0','0','','List','All|Open|Closed','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Case Assoc Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Bank Account Status' AND [parametername] = 'Status') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Bank Account Status','Status','','@s10','T','0','InComplete','0','0','','List','All|InComplete|Complete','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Case Assoc Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select Case Associate Type (or Blank)' AND [parametername] = 'Type') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select Case Associate Type (or Blank)','Type','','@s20','T','0',0,'0','0','Associate Types','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Case Assoc Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Deceased Case Associates' AND [parametername] = 'IncDescd') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Deceased Case Associates','IncDescd','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Client Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Bank Account Status' AND [parametername] = 'Status') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Bank Account Status','Status','','@s10','T','0','InComplete','0','0','','List','All|InComplete|Complete','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Client Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Client' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Client','FromClient','','@s6','T','0',0,'0','0','Contacts','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Client Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To Client' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To Client','ToClient','','@s6','T','0',0,'0','0','Contacts','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Completed Transactions Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Completed Transactions Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Completed Transactions Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Bank Acc (or Blank)' AND [parametername] = 'BankAcc') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Bank Acc (or Blank)','BankAcc','','@s20','T','0',0,'0','0','Bank','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Nominal Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Bank Account Status' AND [parametername] = 'Status') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Bank Account Status','Status','','@s10','T','0','InComplete','0','0','','List','All|InComplete|Complete','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT OS Transactions Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Bank Acc (or Blank)' AND [parametername] = 'Bank') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Bank Acc (or Blank)','Bank','','@s20','T','0',0,'0','0','Bank','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Supplier Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Third Party Suppliers' AND [parametername] = 'ThirdParty') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Third Party Suppliers','ThirdParty','','@s10','T','0','All','0','0','','List','All|ThirdPartyOnly|NotThirdParty','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Supplier Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Bank Account Status' AND [parametername] = 'Status') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Bank Account Status','Status','','@s10','T','0','InComplete','0','0','','List','All|InComplete|Complete','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Supplier Bank Acc Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Retired Suppliers' AND [parametername] = 'IncRetired') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Retired Suppliers','IncRetired','','@s1','T','0',0,'0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBalance') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBalance','','@s1','T','1','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Zero Matters' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Zero Matters','AllowZeroMatters','','@s1','T','1','N','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|Closed|All','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the To date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the To date','ToDate','','@d6','D','10','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the From Date','FromDate','','@d6','D','10','today()-365','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter a Fee Earner (or Blank)' AND [parametername] = 'Fee') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter a Fee Earner (or Blank)','Fee','','@s5','T','5',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter a Department (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter a Department (or Blank)','Dept','','@s5','T','5',0,'0','0','Departments','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter a Work Type (or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter a Work Type (or Blank)','WType','','@s5','T','5',0,'0','0','Worktypes','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Cheque Requisitions List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Client Code' AND [parametername] = 'Client') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Client Code','Client','','@s10','T','0',0,'0','0','Contacts','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Cheque Requisitions List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the Bank Code' AND [parametername] = 'Bank') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the Bank Code','Bank','','@s6','T','0',0,'0','0','Bank','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Cheque Requisitions List' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please Enter the FE Code' AND [parametername] = 'FE') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please Enter the FE Code','FE','','@s5','T','0',0,'0','0','Handlers','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Remittance' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'BatchNo' AND [parametername] = 'PaymentBatchNo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'BatchNo','PaymentBatchNo','','@n14','N','0',0,'1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Team' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','OpenClosed','','@s6','T','0','Open','0','0','','List','Open|All|Closed','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Team' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Team (or Blank)' AND [parametername] = 'Team') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Team (or Blank)','Team','','@s4','T','0',0,'0','0','Teams','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Team' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From FE (or Blank)' AND [parametername] = 'FEFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From FE (or Blank)','FEFrom','','@s4','T','0',0,'0','0','Fee Earner','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Team' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To FE (or Blank)' AND [parametername] = 'FETo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To FE (or Blank)','FETo','','@s4','T','0',0,'0','0','Fee Earner','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Team' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balance Matters' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balance Matters','ShowZeroBals','','@s1','T','0',0,'0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Team' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow 0000 Admin Matters' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow 0000 Admin Matters','AllowZeroMatters','','@s1','T','0',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Audit Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','0','today()','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Audit Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','0','today()','0','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='System Reconciliation Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='System Reconciliation Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Up to Year' AND [parametername] = 'UpToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Up to Year','UpToYear','','@n4','N','4','CON:YEAR','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetail','','@s1','T','1','N','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','1','N','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date Type' AND [parametername] = 'DateType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date Type','DateType','','@s16','T','16','Transaction Date','0','0','','List','Transaction Date|Entry Date','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for all)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for all)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','FromDate','','@d6','D','10','LOC:StartOfYear','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','ToDate','','@d6','D','10','today()','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Period','FromPeriod','','@s2','T','2','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Period','ToPeriod','','@s2','T','2','12','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Details' AND [parametername] = 'ShowDetail') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Details','ShowDetail','','@s1','T','1','N','0','0','','Check Box','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBal','','@s1','T','1','N','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5',0,'0','0','Branch','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Up to Year' AND [parametername] = 'UpToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Up to Year','UpToYear','','@n4','N','4','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Date Type' AND [parametername] = 'DateType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Date Type','DateType','','@s16','T','16','Transaction Date','1','0','','List','Transaction Date|Entry Date','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Date','FromDate','','@d6','D','10','LOC:StartOfYear','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Date','ToDate','','@d6','D','10','today()','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'From Period','FromPeriod','','@n2','T','2','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Period','ToPeriod','','@n2','T','2','12','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the First Group By Option' AND [parametername] = 'GroupBy1') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the First Group By Option','GroupBy1','','@s10','T','10','Client','0','0','','List','MatterFE|Client|Dept|WType|InvoicedFE|Branch|Matters','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Second Group By Option' AND [parametername] = 'GroupBy2') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Second Group By Option','GroupBy2','','@s10','T','10','Client','0','0','','List','MatterFE|Client|Dept|WType|InvoicedFE|Branch|Matters','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Reporting Level' AND [parametername] = 'ReportingLevel') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Reporting Level','ReportingLevel','','@s20','T','20','Group','0','0','','List','Group|Details','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or all' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or all','OpenClosed','','@s6','T','6','Open','0','0','','List','All|Open|Closed','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Date' AND [parametername] = 'FromDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Date','FromDate','','@d6','D','10','today()','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Date' AND [parametername] = 'ToDate') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Date','ToDate','','@d6','D','10','today()','0','0','','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Client (or Blank)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Client (or Blank)','FromClient','','@s6','T','6',0,'0','0','Contacts','Entry','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Client (or Blank)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Client (or Blank)','ToClient','','@s6','T','6',0,'0','0','Contacts','Entry','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page on change of Main Group' AND [parametername] = 'NewPageGroup1') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page on change of Main Group','NewPageGroup1','','@s1','T','1',0,'0','0','','Check Box','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for the Overall Report Totals' AND [parametername] = 'NewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for the Overall Report Totals','NewPageRTotal','','@s1','T','1',0,'0','0','','Check Box','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a Department (or Blank)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a Department (or Blank)','Dept','','@s3','T','3',0,'0','0','Departments','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a Work type (Blank for All)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a Work type (Blank for All)','WType','','@s5','T','5',0,'0','0','Worktypes','Entry','','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT a Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT a Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Period' AND [parametername] = 'FromPer') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Period','FromPer','','@n2','N','2','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','12') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Period' AND [parametername] = 'ToPer') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Period','ToPer','','@n2','T','2','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12|13','13') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the First Group By Option' AND [parametername] = 'GroupBy1') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the First Group By Option','GroupBy1','','@s15','T','15','Client','0','0','','List','MatterFE|Client|Dept|WType|InvoicedFE|Branch|Matters','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Select the Second Group By Option' AND [parametername] = 'GroupBy2') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Select the Second Group By Option','GroupBy2','','@s15','T','0','Client','0','0','','List','MatterFE|Client|Dept|WType|InvoicedFE|Branch|Matters','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Year','Year','','@n4','N','4','CON:YEAR','0','0','','Entry','','14') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Reporting Level' AND [parametername] = 'ReportingLevel') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Reporting Level','ReportingLevel','','@s15','T','0','Group','0','0','','List','Group|Details','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or All Matters' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or All Matters','OpenClosed','','@s6','T','6','Open','0','0','','List','Open|Closed|All','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page Per Group1' AND [parametername] = 'NewPageGroup1') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page Per Group1','NewPageGroup1','','@s1','T','1','Y','0','0','','Check Box','','7') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'New Page for Report Totals' AND [parametername] = 'mNewPageRTotal') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'New Page for Report Totals','mNewPageRTotal','','@s1','T','1','Y','0','0','','Check Box','','8') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Client (or Blank)' AND [parametername] = 'FromClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Client (or Blank)','FromClient','','@s6','T','6',0,'0','0','Contacts','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Client (Blank for All)' AND [parametername] = 'ToClient') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Client (Blank for All)','ToClient','','@s6','T','6',0,'0','0','Contacts','Entry','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Dept (Blank for All)' AND [parametername] = 'Dept') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Dept (Blank for All)','Dept','','@s3','T','3',0,'0','0','Departments','Entry','','9') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Work Type ( or Blank)' AND [parametername] = 'WType') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Work Type ( or Blank)','WType','','@s5','T','5',0,'0','0','Worktypes','Entry','','10') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (Blank for All)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','11') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Open, Closed or all' AND [parametername] = 'OpenClosed') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Open, Closed or all','OpenClosed','','@s6','T','6','Open','0','0','','List','Open|Closed|All','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Allow Matters with Zero Balances' AND [parametername] = 'AllowZeroMatters') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Allow Matters with Zero Balances','AllowZeroMatters','','@s1','T','1','Y','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Branch (or Blank)' AND [parametername] = 'FromBranch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Branch (or Blank)','FromBranch','','@s3','T','3',0,'0','0','Branch','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Branch (or Blank)' AND [parametername] = 'ToBranch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Branch (or Blank)','ToBranch','','@s3','T','3',0,'0','0','Branch','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Zero Balances' AND [parametername] = 'ShowZeroBals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Zero Balances','ShowZeroBals','','@s3','T','3',0,'0','0','Branch','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Period','FromPeriod','','@n2','N','2','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Period','ToPeriod','','@n2','N','2','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Plese SELECT the To Year' AND [parametername] = 'ToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Plese SELECT the To Year','ToYear','','@n4','N','4','CON:YEAR','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (or Blank)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (or Blank)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Period','FromPeriod','','@n2','N','2','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Period','ToPeriod','','@n2','N','2','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Year' AND [parametername] = 'ToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Year','ToYear','','@n4','N','4','CON:YEAR','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (or Blank)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (or Blank)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Period','FromPeriod','','@n2','N','2','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Period','ToPeriod','','@n2','N','2','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Year' AND [parametername] = 'ToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Year','ToYear','','@n4','N','4','CON:YEAR','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (or Blank)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (or Blank)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the From Period' AND [parametername] = 'FromPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the From Period','FromPeriod','','@n2','N','2','01','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Period' AND [parametername] = 'ToPeriod') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Period','ToPeriod','','@n2','N','2','12','0','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the To Year' AND [parametername] = 'ToYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the To Year','ToYear','','@n4','N','4','CON:YEAR','0','0','','Entry','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch Summary' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Please SELECT the Branch (or Blank)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Please SELECT the Branch (or Blank)','Branch','','@s3','T','3',0,'0','0','Branch','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Forward Postings' AND [parametername] = 'IncludeFwdPostings') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Forward Postings','IncludeFwdPostings','','@s1','T','1','N','0','0','','Check Box','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Adjust for Accruals/Prepayments' AND [parametername] = 'AdjustForAccruals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Adjust for Accruals/Prepayments','AdjustForAccruals','','@s1','T','1','N','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period' AND [parametername] = 'Period') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period','Period','','@s2','T','2','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Include Forward Postings' AND [parametername] = 'IncludeForwardPostings') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Include Forward Postings','IncludeForwardPostings','','@s1','T','1','N','0','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Adjust for Accruals/Prepayments' AND [parametername] = 'AdjustForAccruals') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Adjust for Accruals/Prepayments','AdjustForAccruals','','@s1','T','1','N','0','0','','Check Box','','5') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Branch (Blank for All)' AND [parametername] = 'Branch') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Branch (Blank for All)','Branch','','@s5','T','5','GLO:Branch','0','0','Branch','Entry','','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Show Retired Nominals' AND [parametername] = 'ShowRetired') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Show Retired Nominals','ShowRetired','','@s1','T','1',0,'0','0','','Check Box','','6') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Book By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'To Period' AND [parametername] = 'pPerTo') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'To Period','pPerTo','','@n2','N','0',12,'1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','3') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Book By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Period From' AND [parametername] = 'pPerFrom') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Period From','pPerFrom','','@n2','N','0','01','1','0','','List','01|02|03|04|05|06|07|08|09|10|11|12','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Book By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'pYear') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','pYear','','@n4','N','0','CON:YEAR','0','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Book By Period' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Summary' AND [parametername] = 'pSummary') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Summary','pSummary','','@s1','T','0','Y','1','0','','Check Box','','4') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UD Billing Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Billing Guide ID' AND [parametername] = 'BgId') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Billing Guide ID','BgId','','@n10','N','10',0,'1','0','','Entry','','1') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UD Billing Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Year' AND [parametername] = 'Year') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Year','Year','','@n4','N','4','CON:YEAR','1','0','','Entry','','2') End Go DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UD Billing Report' and [report_type]='A' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRParameter] WHERE [reportid] = @reportId AND [userprompt] = 'Supplier Code (Blank for all)' AND [parametername] = 'Supplier') Begin INSERT INTO [dbo].[CRParameter] ([reportid],[userprompt],[parametername],[parametervalue],[parameterformat],[parametertype],[parameterlength],[defaultvalue],[requiredfield],[userrequest],[infile],[controltype],[listoption],[Seqno]) VALUES (@reportId,'Supplier Code (Blank for all)','Supplier','','@s10','T','10',0,'0','0','Supplier','Entry','','1') End Go -- INSERT SCRIPT FOR CRGroup DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bill Layout' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Billing Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bill Breakdown' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Billing Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='TimeDayBook' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Handler Diary Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at a Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Fee Earner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fe by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Fe by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Worktype by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Worktype by Fee Earner by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Fee Earner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (Show Dates)' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (Show Dates)' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Diary Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Balances as at Entry Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (ShowDates) Client Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt by Client (ShowDates) Client Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='No Branching' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP By FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Unbilled/WIP)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='WIP by F/e Last Billed' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Unbilled/WIP)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billing Guide' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statements' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statements' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Recorder Utilisation' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='SupplierRemittance' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Other' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='KPI By Fee Earner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='KPI Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='KPI By Department' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='KPI Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='KPI By Team' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='KPI Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='KPI by Firm' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='KPI Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Work type by Team by Fee for Month' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department by Team by Fee for Month.' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='All Cases' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Firm Case Analysis Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='PI Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='PI Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Statute of Limitations' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertaking List Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by UndertakingTo' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Dept by Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Matter' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings by Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='PI Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Dormant Matters Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By FE By Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Statute of Limitations' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Statute of Limitations' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Statute of Limitations' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Statute Of Limitations By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Statute of Limitations' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Diary Time Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Summary Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings Authorised By' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Status' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By Department By FE By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Department By FE By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger No Money' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger No Money WIP' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger WIP' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Activity List WIP' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Entry' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='FE By Time Task' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Task by FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Negotiation Letter By FE (FNL)' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued By FE By Period Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Estimated Fees By Est fees Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger for Fe between dates' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger by Matter by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Ledger By Matter By FE By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time for an Individual Handler' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Billed)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time By Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Billed)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billed Time' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Billed)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Client by Worktype By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Top WIP For Fe' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Unbilled/WIP)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Category Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters ReOpened' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Current Balance Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances By Matter Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Daily' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='CaseDiary - Weekly' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Creditors Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Creditors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Creditors Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Breakdown' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt Weekly' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Aged Debt By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Allocated Receipts' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Received Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Fee Earner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by FE By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Charge Rates By FE By Matter' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Other' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client List' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Statement By Matter' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Author' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Dictation Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Handler' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Dictation Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Digital Dictations By Typist' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Dictation Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Est Fees Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='File Manager' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemCode' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='File Manager' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report by ItemType' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='File Manager' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Received Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By FE By Client By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Budget By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profit And Loss Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profit And Loss Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Ledger' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profit And Loss Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profit And Loss Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profitibility Report' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bills Profitibility Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profitibility Report' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profitibility Report' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profitibility By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Debtors Ledger Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Debtors Ledger Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Matter FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Billing Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Matter FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Billing FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Billing Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Draft Bills By Billing FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Expense Payments' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Invoiced OS Fees' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters With No Transactions' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Transfer Costs By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Time Write Off By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Unbilled/WIP)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Days' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Unbilled/WIP)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UnBilled Outlay Years' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Undertakings By Undertaking Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Undertakings' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Received Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Received Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Rec By Matter By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List with No Account Values' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Client Category' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Departments' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Fee Earners' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Handlers' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Nominal Ac Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Teams' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of VAT Codes' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='List of Work Types' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Other' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Supplier List' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Code List Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Partner' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Your Ref' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List Effectively Complete' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Billing Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Debtors Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Bills' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Acc Debit Bal Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Acc Debit Bal Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balance 90 Days Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Deposit Balances Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Outlay Balances as at a Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Office Account Credit Balances' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger By FE' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Income Projection Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Summary Report By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Outstanding Cases By ActionCode' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Dept By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Analysis By Work Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Billing Guide Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Billing Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Unbilled Time Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Time Reports (Unbilled/WIP)' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matters Not Billed' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Exception Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Ledger by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter Ledger Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter Ledger by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Action Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Debt Costing Ledger' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Client' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Dept' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Closed / Archived Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='BillingReport' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='New Cases Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Matter' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Case Associates By Type' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Phone Log Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Client Balances Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Client Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='File Manager' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Strong Room Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Case Detail Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Destroy Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Cheque Requisition' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='File Manager Report By Destroy Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='File Manager' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Workflow Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Diary/Task Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Bank Acc Register' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Case Assoc Bank Acc Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Client Bank Acc Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Completed Transactions Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT OS Transactions Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Supplier Bank Acc Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Cheque Requisitions List' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Remittance' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List By Team' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='EFT Audit Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='EFT Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='System Reconciliation Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='System Reconciliation Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Trial Balance by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Month End Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Date' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Fees Issued Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Issued by Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Branch' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Matter List' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Matter List by Branch' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Nominal Account List' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT CashReceipts Branch Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='VAT InvoiceBasis Branch Summary' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Branching Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Balance Sheet' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Profit and Loss By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Profit And Loss Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Fees Book By Period' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='UD Billing Report' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go DECLARE @groupId INT; DECLARE @reportId INT; SELECT @reportId = [ReportId] FROM CrReport WHERE [name]='Third Party Ledger' and [report_type]='A' SELECT @groupId = [groupid] FROM crgroup WHERE [groupname]='Accounts Reports' IF NOT EXISTS(SELECT TOP 1 1 FROM [CRReportGroup] WHERE [Reportid] = @reportId AND [groupid] = @groupId) Begin INSERT INTO [dbo].[CRReportGroup]([Reportid],[groupid])VALUES (@reportId,@groupId) End Go -- Update Script for CRParameter Value mismatch IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [ParameterType] = 'N') Begin Update CRParameter set ParameterType = 'Number' where ParameterType = 'N' End Go IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [ParameterType] = 'D') Begin Update CRParameter set ParameterType = 'Date' where ParameterType = 'D' End Go IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [ParameterType] = 'T') Begin Update CRParameter set ParameterType = 'Text' where ParameterType = 'T' End Go IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [requiredfield] = '1') Begin Update CRParameter set requiredfield = 'Yes' where requiredfield = '1' End Go IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [userrequest] = '0') Begin Update CRParameter set userrequest = 'No' where userrequest = '0' End Go IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [controltype] = 'List') Begin UPDATE CRParameter SET listoption = REPLACE(CAST(listoption as nVarchar(4000)), '|', ';') where controltype = 'List' End Go IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [infile] = 'Fee Earner') Begin Update CRParameter set infile = 'Fee Earners' where infile = 'Fee Earner' End Go IF EXISTS(SELECT TOP 1 1 FROM CRParameter WHERE [infile] = 'Branch') Begin Update CRParameter set infile = 'Branches' where infile = 'Branch' End Go