private void OKButton_Click(object sender, EventArgs e)
        {
            IdentificationSettings  settings;
            InvestigationSourceInfo sourceInfo;
            InvestigationReportForm repForm;

            try
            {
                //Check that a source has been selected.
                if (IdentificationComparisonSource.GetSourceName().Trim() == "")
                {
                    MessageManager.ShowInformation("Please select a valid source.", this);
                    return;
                }

                settings   = GetSettings();
                sourceInfo = GetSourceInfo(IdentificationComparisonSource);

                repForm = new InvestigationReportForm(MyConnectionString);
                repForm.GenerateIdentificationReport(sourceInfo, settings);
            }
            catch (Exception ex)
            {
                MessageManager.ShowError(ex, "Error when generating comparison report.", this);
            }
        }
        private void OKButton_Click(object sender, EventArgs e)
        {
            ComparisonSettings      settings;
            InvestigationSourceInfo sourceInfo1, sourceInfo2;
            InvestigationReportForm repForm;

            try
            {
                //Check that both sources have been selected.
                if (ComparisonSource1.GetSourceName().Trim() == "" || ComparisonSource2.GetSourceName().Trim() == "")
                {
                    MessageManager.ShowInformation("Please select two sources.", this);
                    return;
                }

                settings    = GetSettings();
                sourceInfo1 = GetSourceInfo(ComparisonSource1);
                sourceInfo2 = GetSourceInfo(ComparisonSource2);

                repForm = new InvestigationReportForm(MyConnectionString);
                repForm.GenerateComparisonReport(sourceInfo1, sourceInfo2, settings);
            }
            catch (Exception ex)
            {
                MessageManager.ShowError(ex, "Error when generating comparison report.", this);
            }
        }