/// <summary> /// Generates a pdf report of all the information relevant to that machine /// </summary> public void PrintReport() { var propDic = new Dictionary<String, String>(); propDic.Add("ComputerName", "Computer Name: "); propDic.Add("AssetTag", "Asset Number: "); propDic.Add("UpdateGroup", "Update Policy: "); propDic.Add("EPPositionName", "EP Title: "); propDic.Add("IPStatic", "Static IP Address: "); try { using (var assocConn = new Model.EoF_Configuration_Database_TEST_REGIONDataSetTableAdapters.MachinesSoftwareTableAdapter()) { using (var softConn = new Model.EoF_Configuration_Database_TEST_REGIONDataSetTableAdapters.SoftwareTableAdapter()) { // grab the software relevant to the machine var _software = from _soft in softConn.GetData() join _assoc in assocConn.GetData() on _soft.ID equals _assoc.SoftwareId where SelectedMachine.ID == _assoc.MachineId select _soft; int i = 0; foreach (var software in _software) { propDic.Add("Software Number " + i.ToString() + ": ", software.SoftwareName); i++; } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } Helpers.Reports.PDFIndividualReport.GenerateReport<Model.EoF_Configuration_Database_TEST_REGIONDataSet.MachinesRow>(SelectedMachine, propDic, SelectedMachine.ComputerName); }