Table: dbo.Employee_W2_Rendered_Document
Table used to store pre-rendered employee W2 documents.
Columns
NameTypeConstraintsDescription
employee_w2_rendered_document_KEYint (4)NOT NULLPrimary key for table.
form_yearint (4)NOT NULLFiling year of the document
employee_KEYint (4)NOT NULLPrimary key of the employee associated with this row's documents.
report_definition_KEYint (4)Key of the associated report; a null value means the document is associated with a tax form instead of a report.
facsimile_documentvarbinary (-1)Cached ActiveReport page of a particular W2 form, the facsimile copy which includes all form graphics plus field data.
data_only_documentvarbinary (-1)Cached ActiveReport page of a particular W2 form, the pre-printed copy which only includes field data, no form graphics.
barcode_overlay_documentvarbinary (-1)Cached ActiveReport page of a W2 barcode for the w2 documents. User option to include, so we dynamically overlay when it's required.
tax_form_KEYint (4)Key of the associated tax form; a null value means the document is associated with a report instead of a tax form.
render_datesmalldatetime (4)NOT NULLDate the document was rendered.
overflow_orderint (4)NOT NULLIndicates the overflow order for employee w2 documents when data overflows into more than 1 w2 for an employee. This is zero-based.
ste_state_code_KEYnvarchar (4)Certain reports are state specific. For those reports, this column will contain the key for the corresponding state.
tax_agent_KEYint (4)Certain reports are specific to a locality. For those reports, this column will contain the key for the tax agent for that locality.
Primary key
NameColumnsDescription
PK_Employee_W2_Rendered_Documentemployee_w2_rendered_document_KEY
Unique constraints
NameColumnsDescription
UK_Employee_W2_Rendered_Document$form_year$report_definition_KEY$tax_form_KEY$employee_KEY$overflow_order$ste_state_code_KEY$taxform_year, report_definition_KEY, tax_form_KEY, employee_KEY, overflow_order, ste_state_code_KEY, tax_agent_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Employee_W2_Rendered_Document__Ste_State_Code__ste_state_code_KEYste_state_code_KEYSte_State_Code (ste_state_code_KEY)
FK_Employee_W2_Rendered_Document__Tax_Agent__tax_agent_KEYtax_agent_KEYTax_Agent (tax_agent_KEY)
FK_Employee_W2_Rendered_Document__Employee__employee_KEYemployee_KEYEmployee (employee_KEY)
FK_Employee_W2_Rendered_Document__Report_Definition__report_definition_KEYreport_definition_KEYReport_Definition (report_definition_KEY)
FK_Employee_W2_Rendered_Document__Tax_Form__tax_form_KEYtax_form_KEYTax_Form (tax_form_KEY)

Schema diagram