CREATE TABLE [dbo].[Reports]
(
[Prikey] [int] NOT NULL IDENTITY(1, 1),
[MenuName] [varchar] (425) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ReportName] [varchar] (425) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ReportPath] [varchar] (425) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ReportTypeFID] [smallint] NOT NULL,
[ReportRenderTypeFID] [int] NULL,
[ReportArchiveTypeFID] [int] NULL,
[ReportSystemLocationFID] [int] NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_Reports_Inactive] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Reports] ADD CONSTRAINT [PK_Reports] PRIMARY KEY CLUSTERED ([Prikey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Reports] ADD CONSTRAINT [FK_Reports_ReportArchiveType] FOREIGN KEY ([ReportArchiveTypeFID]) REFERENCES [dbo].[ReportArchiveType] ([ReportArchiveTypeID])
GO
ALTER TABLE [dbo].[Reports] ADD CONSTRAINT [FK_Reports_ReportRenderType] FOREIGN KEY ([ReportRenderTypeFID]) REFERENCES [dbo].[ReportRenderType] ([ReportRenderTypeID])
GO
ALTER TABLE [dbo].[Reports] ADD CONSTRAINT [FK_Reports_ReportSystemLocation] FOREIGN KEY ([ReportSystemLocationFID]) REFERENCES [dbo].[ReportSystemLocation] ([ReportSystemLocationID])
GO
ALTER TABLE [dbo].[Reports] ADD CONSTRAINT [FK_Reports_ReportType] FOREIGN KEY ([ReportTypeFID]) REFERENCES [dbo].[ReportType] ([ReportTypeID])
GO
GRANT SELECT ON [dbo].[Reports] TO [MssExec]
GRANT INSERT ON [dbo].[Reports] TO [MssExec]
GRANT DELETE ON [dbo].[Reports] TO [MssExec]
GRANT UPDATE ON [dbo].[Reports] TO [MssExec]
GO