├── .gitignore ├── CSObject Classes ├── csReporter2.cs ├── csReporter3.cs └── csReporter4.cs ├── Excel ├── DocumentFormat.OpenXml.dll └── ExcelWriter.cs ├── Forms ├── FrmFilterDate.Designer.cs ├── FrmFilterDate.cs ├── FrmFilterDate.resx ├── frmCSExamples.Designer.cs ├── frmCSExamples.cs ├── frmCSExamples.resx ├── frmError.Designer.cs ├── frmError.cs ├── frmError.resx ├── frmFilter.Designer.cs ├── frmFilter.cs ├── frmFilter.resx ├── frmGetData.Designer.cs ├── frmGetData.cs ├── frmGetData.resx ├── frmProgressBar.Designer.cs ├── frmProgressBar.cs ├── frmProgressBar.resx ├── frmReport.Designer.cs ├── frmReport.cs └── frmReport.resx ├── Helper Classes ├── HelperClasses2.cs ├── HelperClasses3.cs └── HelperClasses4.cs ├── Icon ├── csr.ico └── csrLogo.png ├── LICENSE ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── README.md ├── app.config ├── bin ├── Debug │ ├── csReporter.exe │ ├── csReporter.pdb │ ├── csReporter.vshost.exe │ ├── csReporter.vshost.exe.manifest │ ├── csReporter_net4.exe │ └── csReporter_net4.pdb └── Release │ ├── csReporter.exe │ ├── csReporter.instr.pdb │ ├── csReporter.pdb │ ├── csReporter.vshost.exe │ ├── csReporter_net4.exe │ └── csReporter_net4.pdb ├── csReporter.csproj ├── csReporter.csproj.user ├── csReporter.sln ├── csReporter.v11.suo ├── frmOpenReport.Designer.cs ├── frmOpenReport.cs ├── frmOpenReport.resx ├── images ├── ADData.png ├── ADData_2.png ├── CSV.png ├── Examples.png ├── ExcelReport.png ├── ExcelReport_2.png ├── ExcelVertical.png ├── Filter.png ├── Filter_2.png ├── Filter_3.png ├── GetData.png ├── GetDataExamples.png ├── GetData_2.png ├── GetData_3.png ├── HTML.png ├── MemWarning.png ├── ReportSettings.png ├── SystemAttributes.png ├── Warning.png └── csexport.png └── obj ├── Debug ├── DesignTimeResolveAssemblyReferences.cache ├── DesignTimeResolveAssemblyReferencesInput.cache ├── csReporter.FrmFilterDate.resources ├── csReporter.Properties.Resources.resources ├── csReporter.csproj.CoreCompileInputs.cache ├── csReporter.csproj.GenerateResource.Cache ├── csReporter.exe ├── csReporter.frmCSExamples.resources ├── csReporter.frmError.resources ├── csReporter.frmFilter.resources ├── csReporter.frmGetData.resources ├── csReporter.frmProgressBar.resources ├── csReporter.frmReport.resources └── csReporter.pdb └── Release ├── DesignTimeResolveAssemblyReferences.cache ├── DesignTimeResolveAssemblyReferencesInput.cache ├── csReporter.FrmFilterDate.resources ├── csReporter.Properties.Resources.resources ├── csReporter.csproj.FileListAbsolute.txt ├── csReporter.csproj.GenerateResource.Cache ├── csReporter.exe ├── csReporter.frmCSExamples.resources ├── csReporter.frmError.resources ├── csReporter.frmFilter.resources ├── csReporter.frmGetData.resources ├── csReporter.frmProgressBar.resources ├── csReporter.frmReport.resources ├── csReporter.instr.pdb └── csReporter.pdb /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | 3 | ## files generated by popular Visual Studio add-ons. 4 | 5 | ## 6 | 7 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 8 | 9 | 10 | 11 | # User-specific files 12 | 13 | *.suo 14 | 15 | *.user 16 | 17 | *.userosscache 18 | 19 | *.sln.docstates 20 | 21 | 22 | 23 | # User-specific files (MonoDevelop/Xamarin Studio) 24 | 25 | *.userprefs 26 | 27 | 28 | 29 | # Build results 30 | 31 | [Dd]ebug/ 32 | 33 | [Dd]ebugPublic/ 34 | 35 | [Rr]elease/ 36 | 37 | [Rr]eleases/ 38 | 39 | x64/ 40 | 41 | x86/ 42 | 43 | bld/ 44 | 45 | [Bb]in/ 46 | 47 | [Oo]bj/ 48 | 49 | [Ll]og/ 50 | 51 | 52 | 53 | # Visual Studio 2015 cache/options directory 54 | 55 | .vs/ 56 | 57 | # Uncomment if you have tasks that create the project's static files in wwwroot 58 | 59 | #wwwroot/ 60 | 61 | 62 | 63 | # MSTest test Results 64 | 65 | [Tt]est[Rr]esult*/ 66 | 67 | [Bb]uild[Ll]og.* 68 | 69 | 70 | 71 | # NUNIT 72 | 73 | *.VisualState.xml 74 | 75 | TestResult.xml 76 | 77 | 78 | 79 | # Build Results of an ATL Project 80 | 81 | [Dd]ebugPS/ 82 | 83 | [Rr]eleasePS/ 84 | 85 | dlldata.c 86 | 87 | 88 | 89 | # Benchmark Results 90 | 91 | BenchmarkDotNet.Artifacts/ 92 | 93 | 94 | 95 | # .NET Core 96 | 97 | project.lock.json 98 | 99 | project.fragment.lock.json 100 | 101 | artifacts/ 102 | 103 | **/Properties/launchSettings.json 104 | 105 | 106 | 107 | *_i.c 108 | 109 | *_p.c 110 | 111 | *_i.h 112 | 113 | *.ilk 114 | 115 | *.meta 116 | 117 | *.obj 118 | 119 | *.pch 120 | 121 | *.pdb 122 | 123 | *.pgc 124 | 125 | *.pgd 126 | 127 | *.rsp 128 | 129 | *.sbr 130 | 131 | *.tlb 132 | 133 | *.tli 134 | 135 | *.tlh 136 | 137 | *.tmp 138 | 139 | *.tmp_proj 140 | 141 | *.log 142 | 143 | *.vspscc 144 | 145 | *.vssscc 146 | 147 | .builds 148 | 149 | *.pidb 150 | 151 | *.svclog 152 | 153 | *.scc 154 | 155 | 156 | 157 | # Chutzpah Test files 158 | 159 | _Chutzpah* 160 | 161 | 162 | 163 | # Visual C++ cache files 164 | 165 | ipch/ 166 | 167 | *.aps 168 | 169 | *.ncb 170 | 171 | *.opendb 172 | 173 | *.opensdf 174 | 175 | *.sdf 176 | 177 | *.cachefile 178 | 179 | *.VC.db 180 | 181 | *.VC.VC.opendb 182 | 183 | 184 | 185 | # Visual Studio profiler 186 | 187 | *.psess 188 | 189 | *.vsp 190 | 191 | *.vspx 192 | 193 | *.sap 194 | 195 | 196 | 197 | # TFS 2012 Local Workspace 198 | 199 | $tf/ 200 | 201 | 202 | 203 | # Guidance Automation Toolkit 204 | 205 | *.gpState 206 | 207 | 208 | 209 | # ReSharper is a .NET coding add-in 210 | 211 | _ReSharper*/ 212 | 213 | *.[Rr]e[Ss]harper 214 | 215 | *.DotSettings.user 216 | 217 | 218 | 219 | # JustCode is a .NET coding add-in 220 | 221 | .JustCode 222 | 223 | 224 | 225 | # TeamCity is a build add-in 226 | 227 | _TeamCity* 228 | 229 | 230 | 231 | # DotCover is a Code Coverage Tool 232 | 233 | *.dotCover 234 | 235 | 236 | 237 | # AxoCover is a Code Coverage Tool 238 | 239 | .axoCover/* 240 | 241 | !.axoCover/settings.json 242 | 243 | 244 | 245 | # Visual Studio code coverage results 246 | 247 | *.coverage 248 | 249 | *.coveragexml 250 | 251 | 252 | 253 | # NCrunch 254 | 255 | _NCrunch_* 256 | 257 | .*crunch*.local.xml 258 | 259 | nCrunchTemp_* 260 | 261 | 262 | 263 | # MightyMoose 264 | 265 | *.mm.* 266 | 267 | AutoTest.Net/ 268 | 269 | 270 | 271 | # Web workbench (sass) 272 | 273 | .sass-cache/ 274 | 275 | 276 | 277 | # Installshield output folder 278 | 279 | [Ee]xpress/ 280 | 281 | 282 | 283 | # DocProject is a documentation generator add-in 284 | 285 | DocProject/buildhelp/ 286 | 287 | DocProject/Help/*.HxT 288 | 289 | DocProject/Help/*.HxC 290 | 291 | DocProject/Help/*.hhc 292 | 293 | DocProject/Help/*.hhk 294 | 295 | DocProject/Help/*.hhp 296 | 297 | DocProject/Help/Html2 298 | 299 | DocProject/Help/html 300 | 301 | 302 | 303 | # Click-Once directory 304 | 305 | publish/ 306 | 307 | 308 | 309 | # Publish Web Output 310 | 311 | *.[Pp]ublish.xml 312 | 313 | *.azurePubxml 314 | 315 | # Note: Comment the next line if you want to checkin your web deploy settings, 316 | 317 | # but database connection strings (with potential passwords) will be unencrypted 318 | 319 | *.pubxml 320 | 321 | *.publishproj 322 | 323 | 324 | 325 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 326 | 327 | # checkin your Azure Web App publish settings, but sensitive information contained 328 | 329 | # in these scripts will be unencrypted 330 | 331 | PublishScripts/ 332 | 333 | 334 | 335 | # NuGet Packages 336 | 337 | *.nupkg 338 | 339 | # The packages folder can be ignored because of Package Restore 340 | 341 | **/packages/* 342 | 343 | # except build/, which is used as an MSBuild target. 344 | 345 | !**/packages/build/ 346 | 347 | # Uncomment if necessary however generally it will be regenerated when needed 348 | 349 | #!**/packages/repositories.config 350 | 351 | # NuGet v3's project.json files produces more ignorable files 352 | 353 | *.nuget.props 354 | 355 | *.nuget.targets 356 | 357 | 358 | 359 | # Microsoft Azure Build Output 360 | 361 | csx/ 362 | 363 | *.build.csdef 364 | 365 | 366 | 367 | # Microsoft Azure Emulator 368 | 369 | ecf/ 370 | 371 | rcf/ 372 | 373 | 374 | 375 | # Windows Store app package directories and files 376 | 377 | AppPackages/ 378 | 379 | BundleArtifacts/ 380 | 381 | Package.StoreAssociation.xml 382 | 383 | _pkginfo.txt 384 | 385 | *.appx 386 | 387 | 388 | 389 | # Visual Studio cache files 390 | 391 | # files ending in .cache can be ignored 392 | 393 | *.[Cc]ache 394 | 395 | # but keep track of directories ending in .cache 396 | 397 | !*.[Cc]ache/ 398 | 399 | 400 | 401 | # Others 402 | 403 | ClientBin/ 404 | 405 | ~$* 406 | 407 | *~ 408 | 409 | *.dbmdl 410 | 411 | *.dbproj.schemaview 412 | 413 | *.jfm 414 | 415 | *.pfx 416 | 417 | *.publishsettings 418 | 419 | orleans.codegen.cs 420 | 421 | 422 | 423 | # Since there are multiple workflows, uncomment next line to ignore bower_components 424 | 425 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 426 | 427 | #bower_components/ 428 | 429 | 430 | 431 | # RIA/Silverlight projects 432 | 433 | Generated_Code/ 434 | 435 | 436 | 437 | # Backup & report files from converting an old project file 438 | 439 | # to a newer Visual Studio version. Backup files are not needed, 440 | 441 | # because we have git ;-) 442 | 443 | _UpgradeReport_Files/ 444 | 445 | Backup*/ 446 | 447 | UpgradeLog*.XML 448 | 449 | UpgradeLog*.htm 450 | 451 | 452 | 453 | # SQL Server files 454 | 455 | *.mdf 456 | 457 | *.ldf 458 | 459 | *.ndf 460 | 461 | 462 | 463 | # Business Intelligence projects 464 | 465 | *.rdl.data 466 | 467 | *.bim.layout 468 | 469 | *.bim_*.settings 470 | 471 | 472 | 473 | # Microsoft Fakes 474 | 475 | FakesAssemblies/ 476 | 477 | 478 | 479 | # GhostDoc plugin setting file 480 | 481 | *.GhostDoc.xml 482 | 483 | 484 | 485 | # Node.js Tools for Visual Studio 486 | 487 | .ntvs_analysis.dat 488 | 489 | node_modules/ 490 | 491 | 492 | 493 | # Typescript v1 declaration files 494 | 495 | typings/ 496 | 497 | 498 | 499 | # Visual Studio 6 build log 500 | 501 | *.plg 502 | 503 | 504 | 505 | # Visual Studio 6 workspace options file 506 | 507 | *.opt 508 | 509 | 510 | 511 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 512 | 513 | *.vbw 514 | 515 | 516 | 517 | # Visual Studio LightSwitch build output 518 | 519 | **/*.HTMLClient/GeneratedArtifacts 520 | 521 | **/*.DesktopClient/GeneratedArtifacts 522 | 523 | **/*.DesktopClient/ModelManifest.xml 524 | 525 | **/*.Server/GeneratedArtifacts 526 | 527 | **/*.Server/ModelManifest.xml 528 | 529 | _Pvt_Extensions 530 | 531 | 532 | 533 | # Paket dependency manager 534 | 535 | .paket/paket.exe 536 | 537 | paket-files/ 538 | 539 | 540 | 541 | # FAKE - F# Make 542 | 543 | .fake/ 544 | 545 | 546 | 547 | # JetBrains Rider 548 | 549 | .idea/ 550 | 551 | *.sln.iml 552 | 553 | 554 | 555 | # CodeRush 556 | 557 | .cr/ 558 | 559 | 560 | 561 | # Python Tools for Visual Studio (PTVS) 562 | 563 | __pycache__/ 564 | 565 | *.pyc 566 | 567 | 568 | 569 | # Cake - Uncomment if you are using it 570 | 571 | # tools/** 572 | 573 | # !tools/packages.config 574 | 575 | 576 | 577 | # Tabs Studio 578 | 579 | *.tss 580 | 581 | 582 | 583 | # Telerik's JustMock configuration file 584 | 585 | *.jmconfig 586 | 587 | 588 | 589 | # BizTalk build output 590 | 591 | *.btp.cs 592 | 593 | *.btm.cs 594 | 595 | *.odx.cs 596 | 597 | *.xsd.cs 598 | 599 | 600 | 601 | # OpenCover UI analysis results 602 | 603 | OpenCover/ -------------------------------------------------------------------------------- /Excel/DocumentFormat.OpenXml.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/Excel/DocumentFormat.OpenXml.dll -------------------------------------------------------------------------------- /Excel/ExcelWriter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | using System.Threading; 8 | //Namespaces needed for Excel processing 9 | using DocumentFormat.OpenXml; 10 | using DocumentFormat.OpenXml.Packaging; 11 | using DocumentFormat.OpenXml.Spreadsheet; 12 | 13 | namespace csReporter 14 | { 15 | class ExcelWriter 16 | { 17 | private SpreadsheetDocument doc; 18 | private WorkbookPart wbp; 19 | private WorksheetPart wsp; 20 | private Sheets shts; 21 | private Sheet sht; 22 | private SharedStringTablePart ssp; 23 | SheetData sd; 24 | Worksheet ws; 25 | private enum columnNames { A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF, AG, AH, AI, AJ, AK, AL, AM, AN, AO, AP, AQ, AR, AS, AT, AU, AV, AW, AX, AY, AZ, BA, BB, BC, BD, BE, BF, BG, BH, BI, BJ, BK, BL, BM, BN, BO, BP, BQ, BR, BS, BT, BU, BV, BW, BX, BY, BZ, CA, CB, CC, CD, CE, CF, CG, CH, CI, CJ, CK, CL, CM, CN, CO, CP, CQ, CR, CS, CT, CU, CV, CW, CX, CY, CZ, DA, DB, DC, DD, DE, DF, DG, DH, DI, DJ, DK, DL, DM, DN, DO, DP, DQ, DR, DS, DT, DU, DV, DW, DX, DY, DZ, EA, EB, EC, ED, EE, EF, EG, EH, EI, EJ, EK, EL, EM, EN, EO, EP, EQ, ER, ES, ET, EU, EV, EW, EX, EY, EZ, FA, FB, FC, FD, FE, FF, FG, FH, FI, FJ, FK, FL, FM, FN, FO, FP, FQ, FR, FS, FT, FU, FV, FW, FX, FY, FZ, GA, GB, GC, GD, GE, GF, GG, GH, GI, GJ, GK, GL, GM, GN, GO, GP, GQ, GR, GS, GT, GU, GV, GW, GX, GY, GZ, HA, HB, HC, HD, HE, HF, HG, HH, HI, HJ, HK, HL, HM, HN, HO, HP, HQ, HR, HS, HT, HU, HV, HW, HX, HY, HZ, IA, IB, IC, ID, IE, IF, IG, IH, II, IJ, IK, IL, IM, IN, IO, IP, IQ, IR, IS, IT, IU, IV, IW, IX, IY, IZ, JA, JB, JC, JD, JE, JF, JG, JH, JI, JJ, JK, JL, JM, JN, JO, JP, JQ, JR, JS, JT, JU, JV, JW, JX, JY, JZ, KA, KB, KC, KD, KE, KF, KG, KH, KI, KJ, KK, KL, KM, KN, KO, KP, KQ, KR, KS, KT, KU, KV, KW, KX, KY, KZ } 26 | private uint currentRow; 27 | Dictionary sharedString; 28 | Dictionary myRows; 29 | Stylesheet ss; 30 | 31 | public ExcelWriter(string filePath, int fontSize) 32 | { 33 | doc = SpreadsheetDocument.Create(filePath, SpreadsheetDocumentType.Workbook); 34 | wbp = doc.AddWorkbookPart(); 35 | wbp.Workbook = new Workbook(); 36 | wsp = wbp.AddNewPart(); 37 | wsp.Worksheet = new Worksheet(new SheetData()); 38 | shts = doc.WorkbookPart.Workbook.AppendChild(new Sheets()); 39 | sht = new Sheet() { Id = doc.WorkbookPart.GetIdOfPart(wsp), SheetId = 1, Name = "test" }; 40 | shts.Append(sht); 41 | ws = wsp.Worksheet; 42 | sd = ws.GetFirstChild(); 43 | ssp = doc.WorkbookPart.AddNewPart(); 44 | currentRow = 1; 45 | sharedString = new Dictionary(); 46 | myRows = new Dictionary(); 47 | 48 | ss = GenerateStylesheet(fontSize); 49 | wbp.AddNewPart(); 50 | wbp.WorkbookStylesPart.Stylesheet = ss; 51 | wbp.WorkbookStylesPart.Stylesheet.Save(); 52 | } 53 | 54 | public void Dispose() 55 | { 56 | Save(); 57 | doc.Close(); 58 | doc.Dispose(); 59 | } 60 | 61 | public void Save() 62 | { 63 | // Save the new worksheet 64 | ssp.SharedStringTable.Save(); 65 | ws.Save(); 66 | wbp.Workbook.Save(); 67 | } 68 | 69 | public void WriteNextRow(List dataValues) 70 | { 71 | columnNames col = columnNames.A; 72 | //needed to reset row when there's multiple rows for single cs object 73 | //any columns after large multivalue column needs to be back on top row. 74 | uint startRow = currentRow; 75 | uint lastRow = currentRow; 76 | Dictionary leadingValsWritten = new Dictionary(); 77 | bool previousLargeMV = false; 78 | foreach (string val in dataValues) 79 | { 80 | if (val != "") 81 | { 82 | //greater than 600-700 seems to cause issues with string table and opening in Excel 83 | //if greater than 100, break into multiple rows 84 | if (val.Count(f => f == '\n') > 100 || (previousLargeMV && val.Count(f => f == '\n') > 1)) 85 | { 86 | previousLargeMV = true; 87 | string[] vals = val.Split(new char[] { '\n' }, StringSplitOptions.None); 88 | for (int i = 0; i < vals.Length; i++) 89 | { 90 | //prevents Cells A and B from getting re-written 91 | //Re-writing Cells means extra lookups and time 92 | if (i != 0 && (!leadingValsWritten.ContainsKey(currentRow) || leadingValsWritten[currentRow] != true)) 93 | { 94 | //dataValues[0] should always be DN unless >250 attributes in report 95 | WriteCell(dataValues[0], columnNames.A, currentRow); 96 | //dataValues[1] should always be object type unless >250 attributes in report 97 | WriteCell(dataValues[1], columnNames.B, currentRow); 98 | leadingValsWritten.Add(currentRow, true); 99 | } 100 | WriteCell(vals[i], col, currentRow++); 101 | } 102 | //save last row for later 103 | //don't need advance, added below 104 | if (lastRow < currentRow - 1) 105 | { 106 | lastRow = currentRow - 1; 107 | } 108 | currentRow = startRow; 109 | } 110 | else 111 | { 112 | WriteCell(val, col, currentRow); 113 | } 114 | } 115 | col++; 116 | } 117 | //advance and reset 118 | currentRow = ++lastRow; 119 | } 120 | 121 | public void WriteNextRow(string dataValue) 122 | { 123 | columnNames col = columnNames.A; 124 | if (dataValue != "") 125 | { 126 | WriteCell(dataValue, col++, currentRow); 127 | } 128 | currentRow++; 129 | } 130 | 131 | public void WriteNextRow(string colValue1, string colValue2) 132 | { 133 | columnNames col = columnNames.A; 134 | if (colValue1 != "") 135 | { 136 | WriteCell(colValue1, col++, currentRow); 137 | } 138 | if (colValue2 != "") 139 | { 140 | WriteCell(colValue2, col++, currentRow); 141 | } 142 | currentRow++; 143 | } 144 | 145 | public void WriteNextRow(string colValue1, string colValue2, string colValue3) 146 | { 147 | columnNames col = columnNames.A; 148 | if (colValue1 != "") 149 | { 150 | WriteCell(colValue1, col++, currentRow); 151 | } 152 | if (colValue2 != "") 153 | { 154 | WriteCell(colValue2, col++, currentRow); 155 | } 156 | if (colValue3 != "") 157 | { 158 | WriteCell(colValue3, col++, currentRow); 159 | } 160 | currentRow++; 161 | } 162 | 163 | // Given text and a SharedStringTablePart, creates a SharedStringItem with the specified text 164 | // and inserts it into the SharedStringTablePart. If the item already exists, returns its index. 165 | private int InsertSharedStringItem(string text) 166 | { 167 | // If the part does not contain a SharedStringTable, create one. 168 | if (ssp.SharedStringTable == null) 169 | { 170 | ssp.SharedStringTable = new SharedStringTable(); 171 | } 172 | 173 | int i = 0; 174 | 175 | //Dictionary is fastest 176 | if (sharedString.Keys.Contains(text)) 177 | { 178 | return sharedString[text]; 179 | } 180 | else 181 | { 182 | i = sharedString.Count; 183 | sharedString.Add(text, i); 184 | ssp.SharedStringTable.AppendChild(new SharedStringItem(new DocumentFormat.OpenXml.Spreadsheet.Text(text))); 185 | } 186 | 187 | return i; 188 | } 189 | // Given a column name, a row index, and a WorksheetPart, inserts a cell into the worksheet. 190 | // If the cell already exists, returns it. 191 | private Cell InsertCellInWorksheet(columnNames columnName, uint rowIndex) 192 | { 193 | //empty string converts columnName to string 194 | string cellReference = columnName.ToString() + rowIndex; 195 | 196 | // If the worksheet does not contain a row with the specified row index, insert one. 197 | Row row; 198 | 199 | // If the worksheet does not contain a row with the specified row index, insert one. 200 | if (myRows.Keys.Contains(rowIndex)) 201 | { 202 | row = myRows[rowIndex]; 203 | } 204 | else 205 | { 206 | row = new Row() { RowIndex = rowIndex }; 207 | sd.Append(row); 208 | myRows.Add(rowIndex, row); 209 | } 210 | 211 | //Avoid re-writing Cells. Means extra lookups and time. Lookups vary by row length/number of columns 212 | //if (row.Elements().Where(c => c.CellReference.Value == cellReference).Count() > 0) 213 | //{ 214 | // string a = cellReference; 215 | // return row.Elements().Where(c => c.CellReference.Value == cellReference).First(); 216 | //} 217 | //else 218 | //{ 219 | Cell newCell = new Cell() { CellReference = cellReference }; 220 | newCell.StyleIndex = 1; 221 | row.InsertAfter(newCell, row.LastChild); 222 | return newCell; 223 | //} 224 | } 225 | 226 | private void WriteCell(string value, columnNames column, uint row) 227 | { 228 | int index = InsertSharedStringItem(value); 229 | Cell cell = InsertCellInWorksheet(column, row); 230 | cell.CellValue = new CellValue(index.ToString()); 231 | cell.DataType = new EnumValue(CellValues.SharedString); 232 | } 233 | 234 | private Stylesheet GenerateStylesheet(int fontSize) 235 | { 236 | Stylesheet styleSheet = null; 237 | Fonts fonts = new Fonts(new Font(new FontSize() { Val = fontSize })); 238 | Fills fills = new Fills(new Fill(new PatternFill() { PatternType = PatternValues.None })); 239 | Borders borders = new Borders(new Border()); 240 | CellFormat cf = new CellFormat() { FontId = 0, FillId = 0, BorderId = 0 }; 241 | CellFormat cfW = new CellFormat() { FontId = 0, FillId = 0, BorderId = 0, ApplyAlignment = true }; 242 | cfW.Append(new Alignment() { Vertical = VerticalAlignmentValues.Top, Horizontal = HorizontalAlignmentValues.Left, WrapText = true }); 243 | CellFormats cellFormats = new CellFormats(cf, cfW); 244 | styleSheet = new Stylesheet(fonts, fills, borders, cellFormats); 245 | return styleSheet; 246 | } 247 | } 248 | } 249 | -------------------------------------------------------------------------------- /Forms/FrmFilterDate.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace csReporter 2 | { 3 | partial class FrmFilterDate 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFilterDate)); 32 | this.dtpFilterDate = new System.Windows.Forms.DateTimePicker(); 33 | this.btnOk = new System.Windows.Forms.Button(); 34 | this.btnCancel = new System.Windows.Forms.Button(); 35 | this.SuspendLayout(); 36 | // 37 | // dtpFilterDate 38 | // 39 | this.dtpFilterDate.Location = new System.Drawing.Point(18, 17); 40 | this.dtpFilterDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 41 | this.dtpFilterDate.Name = "dtpFilterDate"; 42 | this.dtpFilterDate.Size = new System.Drawing.Size(298, 24); 43 | this.dtpFilterDate.TabIndex = 0; 44 | this.dtpFilterDate.Value = new System.DateTime(2017, 8, 2, 0, 0, 0, 0); 45 | // 46 | // btnOk 47 | // 48 | this.btnOk.Location = new System.Drawing.Point(18, 69); 49 | this.btnOk.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 50 | this.btnOk.Name = "btnOk"; 51 | this.btnOk.Size = new System.Drawing.Size(112, 32); 52 | this.btnOk.TabIndex = 1; 53 | this.btnOk.Text = "OK"; 54 | this.btnOk.UseVisualStyleBackColor = true; 55 | this.btnOk.Click += new System.EventHandler(this.btnOk_Click); 56 | // 57 | // btnCancel 58 | // 59 | this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 60 | this.btnCancel.Location = new System.Drawing.Point(204, 69); 61 | this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 62 | this.btnCancel.Name = "btnCancel"; 63 | this.btnCancel.Size = new System.Drawing.Size(112, 32); 64 | this.btnCancel.TabIndex = 2; 65 | this.btnCancel.Text = "Cancel"; 66 | this.btnCancel.UseVisualStyleBackColor = true; 67 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 68 | // 69 | // FrmFilterDate 70 | // 71 | this.AcceptButton = this.btnOk; 72 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); 73 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 74 | this.CancelButton = this.btnCancel; 75 | this.ClientSize = new System.Drawing.Size(334, 112); 76 | this.Controls.Add(this.btnCancel); 77 | this.Controls.Add(this.btnOk); 78 | this.Controls.Add(this.dtpFilterDate); 79 | this.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 80 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 81 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 82 | this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 83 | this.MaximizeBox = false; 84 | this.MinimizeBox = false; 85 | this.Name = "FrmFilterDate"; 86 | this.Text = "Select Date"; 87 | this.ResumeLayout(false); 88 | 89 | } 90 | 91 | #endregion 92 | 93 | private System.Windows.Forms.DateTimePicker dtpFilterDate; 94 | private System.Windows.Forms.Button btnOk; 95 | private System.Windows.Forms.Button btnCancel; 96 | } 97 | } -------------------------------------------------------------------------------- /Forms/FrmFilterDate.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | using System; 26 | using System.Collections.Generic; 27 | using System.ComponentModel; 28 | using System.Data; 29 | using System.Drawing; 30 | using System.Linq; 31 | using System.Text; 32 | using System.Windows.Forms; 33 | 34 | namespace csReporter 35 | { 36 | public partial class FrmFilterDate : Form 37 | { 38 | public FrmFilterDate() 39 | { 40 | InitializeComponent(); 41 | } 42 | 43 | private void btnOk_Click(object sender, EventArgs e) 44 | { 45 | this.DialogResult = System.Windows.Forms.DialogResult.OK; 46 | frmFilter parent = (frmFilter)this.Owner; 47 | parent.SetDateFilter(dtpFilterDate.Value.Date); 48 | } 49 | 50 | private void btnCancel_Click(object sender, EventArgs e) 51 | { 52 | this.DialogResult = System.Windows.Forms.DialogResult.Cancel; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Forms/frmCSExamples.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace csReporter 2 | { 3 | partial class frmCSExamples 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCSExamples)); 32 | this.lblExportInfo = new System.Windows.Forms.Label(); 33 | this.lblExampleHeader = new System.Windows.Forms.Label(); 34 | this.rtbDocumentation = new System.Windows.Forms.RichTextBox(); 35 | this.SuspendLayout(); 36 | // 37 | // lblExportInfo 38 | // 39 | this.lblExportInfo.AutoSize = true; 40 | this.lblExportInfo.Font = new System.Drawing.Font("Lucida Console", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 41 | this.lblExportInfo.Location = new System.Drawing.Point(18, 83); 42 | this.lblExportInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 43 | this.lblExportInfo.Name = "lblExportInfo"; 44 | this.lblExportInfo.Size = new System.Drawing.Size(998, 418); 45 | this.lblExportInfo.TabIndex = 2; 46 | this.lblExportInfo.Text = resources.GetString("lblExportInfo.Text"); 47 | // 48 | // lblExampleHeader 49 | // 50 | this.lblExampleHeader.AutoSize = true; 51 | this.lblExampleHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 52 | this.lblExampleHeader.Location = new System.Drawing.Point(18, 35); 53 | this.lblExampleHeader.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 54 | this.lblExampleHeader.Name = "lblExampleHeader"; 55 | this.lblExampleHeader.Size = new System.Drawing.Size(211, 26); 56 | this.lblExampleHeader.TabIndex = 3; 57 | this.lblExampleHeader.Text = "csexport examples"; 58 | // 59 | // rtbDocumentation 60 | // 61 | this.rtbDocumentation.BackColor = System.Drawing.SystemColors.Control; 62 | this.rtbDocumentation.BorderStyle = System.Windows.Forms.BorderStyle.None; 63 | this.rtbDocumentation.Font = new System.Drawing.Font("Lucida Console", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 64 | this.rtbDocumentation.Location = new System.Drawing.Point(22, 450); 65 | this.rtbDocumentation.Margin = new System.Windows.Forms.Padding(4); 66 | this.rtbDocumentation.Multiline = false; 67 | this.rtbDocumentation.Name = "rtbDocumentation"; 68 | this.rtbDocumentation.ReadOnly = true; 69 | this.rtbDocumentation.Size = new System.Drawing.Size(966, 33); 70 | this.rtbDocumentation.TabIndex = 4; 71 | this.rtbDocumentation.Text = "https://docs.microsoft.com/en-us/previous-versions/mim/jj590346(v=ws.10)"; 72 | this.rtbDocumentation.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtbDocumentation_LinkClicked); 73 | // 74 | // frmCSExamples 75 | // 76 | this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F); 77 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 78 | this.ClientSize = new System.Drawing.Size(1006, 500); 79 | this.Controls.Add(this.rtbDocumentation); 80 | this.Controls.Add(this.lblExampleHeader); 81 | this.Controls.Add(this.lblExportInfo); 82 | this.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 83 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 84 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 85 | this.Margin = new System.Windows.Forms.Padding(4); 86 | this.MaximizeBox = false; 87 | this.MinimizeBox = false; 88 | this.Name = "frmCSExamples"; 89 | this.Text = "Examples"; 90 | this.ResumeLayout(false); 91 | this.PerformLayout(); 92 | 93 | } 94 | 95 | #endregion 96 | 97 | private System.Windows.Forms.Label lblExportInfo; 98 | private System.Windows.Forms.Label lblExampleHeader; 99 | private System.Windows.Forms.RichTextBox rtbDocumentation; 100 | } 101 | } -------------------------------------------------------------------------------- /Forms/frmCSExamples.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | using System.ComponentModel; 29 | using System.Data; 30 | using System.Diagnostics; 31 | using System.Drawing; 32 | using System.Linq; 33 | using System.Text; 34 | using System.Windows.Forms; 35 | 36 | namespace csReporter 37 | { 38 | public partial class frmCSExamples : Form 39 | { 40 | public frmCSExamples() 41 | { 42 | InitializeComponent(); 43 | } 44 | 45 | private void rtbDocumentation_LinkClicked(object sender, LinkClickedEventArgs e) 46 | { 47 | Process.Start(e.LinkText); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Forms/frmError.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace csReporter 2 | { 3 | partial class frmError 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmError)); 32 | this.tbErrorInfo = new System.Windows.Forms.TextBox(); 33 | this.tbErrorBanner = new System.Windows.Forms.TextBox(); 34 | this.SuspendLayout(); 35 | // 36 | // tbErrorInfo 37 | // 38 | this.tbErrorInfo.BackColor = System.Drawing.SystemColors.Control; 39 | this.tbErrorInfo.BorderStyle = System.Windows.Forms.BorderStyle.None; 40 | this.tbErrorInfo.Location = new System.Drawing.Point(18, 123); 41 | this.tbErrorInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 42 | this.tbErrorInfo.Multiline = true; 43 | this.tbErrorInfo.Name = "tbErrorInfo"; 44 | this.tbErrorInfo.ReadOnly = true; 45 | this.tbErrorInfo.Size = new System.Drawing.Size(406, 39); 46 | this.tbErrorInfo.TabIndex = 0; 47 | this.tbErrorInfo.TabStop = false; 48 | // 49 | // tbErrorBanner 50 | // 51 | this.tbErrorBanner.BackColor = System.Drawing.SystemColors.Control; 52 | this.tbErrorBanner.BorderStyle = System.Windows.Forms.BorderStyle.None; 53 | this.tbErrorBanner.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 54 | this.tbErrorBanner.Location = new System.Drawing.Point(18, 17); 55 | this.tbErrorBanner.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 56 | this.tbErrorBanner.Multiline = true; 57 | this.tbErrorBanner.Name = "tbErrorBanner"; 58 | this.tbErrorBanner.ReadOnly = true; 59 | this.tbErrorBanner.Size = new System.Drawing.Size(406, 39); 60 | this.tbErrorBanner.TabIndex = 1; 61 | this.tbErrorBanner.TabStop = false; 62 | this.tbErrorBanner.WordWrap = false; 63 | // 64 | // frmError 65 | // 66 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); 67 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 68 | this.AutoSize = true; 69 | this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 70 | this.ClientSize = new System.Drawing.Size(514, 186); 71 | this.Controls.Add(this.tbErrorBanner); 72 | this.Controls.Add(this.tbErrorInfo); 73 | this.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 74 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 75 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 76 | this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 77 | this.MaximizeBox = false; 78 | this.MinimizeBox = false; 79 | this.Name = "frmError"; 80 | this.Text = "Error"; 81 | this.ResumeLayout(false); 82 | this.PerformLayout(); 83 | 84 | } 85 | 86 | #endregion 87 | 88 | private System.Windows.Forms.TextBox tbErrorInfo; 89 | private System.Windows.Forms.TextBox tbErrorBanner; 90 | 91 | 92 | 93 | } 94 | } -------------------------------------------------------------------------------- /Forms/frmError.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | using System; 26 | using System.Collections.Generic; 27 | using System.ComponentModel; 28 | using System.Data; 29 | using System.Drawing; 30 | using System.Linq; 31 | using System.Text; 32 | using System.Windows.Forms; 33 | 34 | namespace csReporter 35 | { 36 | public partial class frmError : Form 37 | { 38 | public frmError(string errorBanner, string errorMessage) 39 | { 40 | InitializeComponent(); 41 | errorBanner = errorBanner.Replace(". ", ".\r\n"); 42 | tbErrorBanner.Text = errorBanner; 43 | Size bannerSize = TextRenderer.MeasureText(tbErrorBanner.Text, tbErrorBanner.Font); 44 | if (bannerSize.Width < tbErrorBanner.ClientSize.Width) 45 | { 46 | bannerSize.Width = tbErrorBanner.ClientSize.Width; 47 | } 48 | tbErrorBanner.ClientSize = new Size(bannerSize.Width, bannerSize.Height); 49 | 50 | 51 | tbErrorInfo.Text = errorMessage; 52 | Size textSize = TextRenderer.MeasureText(tbErrorInfo.Text, tbErrorInfo.Font); 53 | tbErrorInfo.ClientSize = new Size(bannerSize.Width, textSize.Height); 54 | bool needSB = tbErrorInfo.ClientSize.Width < textSize.Width; 55 | if (needSB) 56 | { 57 | tbErrorInfo.ScrollBars = ScrollBars.Vertical; 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Forms/frmGetData.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace csReporter 2 | { 3 | partial class frmGetData 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmGetData)); 32 | this.gbSource = new System.Windows.Forms.GroupBox(); 33 | this.btnShowExamples = new System.Windows.Forms.Button(); 34 | this.btnGenerate = new System.Windows.Forms.Button(); 35 | this.gbDataSelection = new System.Windows.Forms.GroupBox(); 36 | this.cbSystem = new System.Windows.Forms.CheckBox(); 37 | this.rbImportError = new System.Windows.Forms.RadioButton(); 38 | this.rbExportError = new System.Windows.Forms.RadioButton(); 39 | this.rbExport = new System.Windows.Forms.RadioButton(); 40 | this.rbImport = new System.Windows.Forms.RadioButton(); 41 | this.rbAll = new System.Windows.Forms.RadioButton(); 42 | this.cbbMAs = new System.Windows.Forms.ComboBox(); 43 | this.lblMAname = new System.Windows.Forms.Label(); 44 | this.tbFile = new System.Windows.Forms.TextBox(); 45 | this.btnOpenFile = new System.Windows.Forms.Button(); 46 | this.rbFile = new System.Windows.Forms.RadioButton(); 47 | this.rbGenerate = new System.Windows.Forms.RadioButton(); 48 | this.ofdCSfile = new System.Windows.Forms.OpenFileDialog(); 49 | this.sfdReport = new System.Windows.Forms.SaveFileDialog(); 50 | this.cbForceMemory = new System.Windows.Forms.CheckBox(); 51 | this.gbSource.SuspendLayout(); 52 | this.gbDataSelection.SuspendLayout(); 53 | this.SuspendLayout(); 54 | // 55 | // gbSource 56 | // 57 | this.gbSource.Controls.Add(this.cbForceMemory); 58 | this.gbSource.Controls.Add(this.btnShowExamples); 59 | this.gbSource.Controls.Add(this.btnGenerate); 60 | this.gbSource.Controls.Add(this.gbDataSelection); 61 | this.gbSource.Controls.Add(this.cbbMAs); 62 | this.gbSource.Controls.Add(this.lblMAname); 63 | this.gbSource.Controls.Add(this.tbFile); 64 | this.gbSource.Controls.Add(this.btnOpenFile); 65 | this.gbSource.Controls.Add(this.rbFile); 66 | this.gbSource.Controls.Add(this.rbGenerate); 67 | this.gbSource.Location = new System.Drawing.Point(18, 17); 68 | this.gbSource.Margin = new System.Windows.Forms.Padding(4); 69 | this.gbSource.Name = "gbSource"; 70 | this.gbSource.Padding = new System.Windows.Forms.Padding(4); 71 | this.gbSource.Size = new System.Drawing.Size(992, 382); 72 | this.gbSource.TabIndex = 0; 73 | this.gbSource.TabStop = false; 74 | this.gbSource.Text = "Report Source"; 75 | // 76 | // btnShowExamples 77 | // 78 | this.btnShowExamples.Location = new System.Drawing.Point(590, 309); 79 | this.btnShowExamples.Margin = new System.Windows.Forms.Padding(4); 80 | this.btnShowExamples.Name = "btnShowExamples"; 81 | this.btnShowExamples.Size = new System.Drawing.Size(112, 57); 82 | this.btnShowExamples.TabIndex = 9; 83 | this.btnShowExamples.Text = "csexport examples"; 84 | this.btnShowExamples.UseVisualStyleBackColor = true; 85 | this.btnShowExamples.Click += new System.EventHandler(this.btnShowExamples_Click); 86 | // 87 | // btnGenerate 88 | // 89 | this.btnGenerate.Enabled = false; 90 | this.btnGenerate.Location = new System.Drawing.Point(831, 83); 91 | this.btnGenerate.Margin = new System.Windows.Forms.Padding(4); 92 | this.btnGenerate.Name = "btnGenerate"; 93 | this.btnGenerate.Size = new System.Drawing.Size(136, 32); 94 | this.btnGenerate.TabIndex = 8; 95 | this.btnGenerate.Text = "Generate File"; 96 | this.btnGenerate.UseVisualStyleBackColor = true; 97 | this.btnGenerate.Click += new System.EventHandler(this.btnGenerate_Click); 98 | // 99 | // gbDataSelection 100 | // 101 | this.gbDataSelection.Controls.Add(this.cbSystem); 102 | this.gbDataSelection.Controls.Add(this.rbImportError); 103 | this.gbDataSelection.Controls.Add(this.rbExportError); 104 | this.gbDataSelection.Controls.Add(this.rbExport); 105 | this.gbDataSelection.Controls.Add(this.rbImport); 106 | this.gbDataSelection.Controls.Add(this.rbAll); 107 | this.gbDataSelection.Enabled = false; 108 | this.gbDataSelection.Location = new System.Drawing.Point(614, 40); 109 | this.gbDataSelection.Margin = new System.Windows.Forms.Padding(4); 110 | this.gbDataSelection.Name = "gbDataSelection"; 111 | this.gbDataSelection.Padding = new System.Windows.Forms.Padding(4); 112 | this.gbDataSelection.Size = new System.Drawing.Size(195, 213); 113 | this.gbDataSelection.TabIndex = 7; 114 | this.gbDataSelection.TabStop = false; 115 | this.gbDataSelection.Text = "Data Selection"; 116 | // 117 | // cbSystem 118 | // 119 | this.cbSystem.AutoSize = true; 120 | this.cbSystem.Location = new System.Drawing.Point(46, 179); 121 | this.cbSystem.Margin = new System.Windows.Forms.Padding(4); 122 | this.cbSystem.Name = "cbSystem"; 123 | this.cbSystem.Size = new System.Drawing.Size(112, 22); 124 | this.cbSystem.TabIndex = 6; 125 | this.cbSystem.Text = "System Data"; 126 | this.cbSystem.UseVisualStyleBackColor = true; 127 | this.cbSystem.CheckedChanged += new System.EventHandler(this.cbSystem_CheckedChanged); 128 | // 129 | // rbImportError 130 | // 131 | this.rbImportError.AutoSize = true; 132 | this.rbImportError.Location = new System.Drawing.Point(45, 145); 133 | this.rbImportError.Margin = new System.Windows.Forms.Padding(4); 134 | this.rbImportError.Name = "rbImportError"; 135 | this.rbImportError.Size = new System.Drawing.Size(114, 22); 136 | this.rbImportError.TabIndex = 5; 137 | this.rbImportError.TabStop = true; 138 | this.rbImportError.Text = "Import Errors"; 139 | this.rbImportError.UseVisualStyleBackColor = true; 140 | // 141 | // rbExportError 142 | // 143 | this.rbExportError.AutoSize = true; 144 | this.rbExportError.Location = new System.Drawing.Point(45, 114); 145 | this.rbExportError.Margin = new System.Windows.Forms.Padding(4); 146 | this.rbExportError.Name = "rbExportError"; 147 | this.rbExportError.Size = new System.Drawing.Size(115, 22); 148 | this.rbExportError.TabIndex = 4; 149 | this.rbExportError.TabStop = true; 150 | this.rbExportError.Text = "Export Errors"; 151 | this.rbExportError.UseVisualStyleBackColor = true; 152 | // 153 | // rbExport 154 | // 155 | this.rbExport.AutoSize = true; 156 | this.rbExport.Location = new System.Drawing.Point(46, 82); 157 | this.rbExport.Margin = new System.Windows.Forms.Padding(4); 158 | this.rbExport.Name = "rbExport"; 159 | this.rbExport.Size = new System.Drawing.Size(69, 22); 160 | this.rbExport.TabIndex = 3; 161 | this.rbExport.TabStop = true; 162 | this.rbExport.Text = "Export"; 163 | this.rbExport.UseVisualStyleBackColor = true; 164 | // 165 | // rbImport 166 | // 167 | this.rbImport.AutoSize = true; 168 | this.rbImport.Location = new System.Drawing.Point(46, 50); 169 | this.rbImport.Margin = new System.Windows.Forms.Padding(4); 170 | this.rbImport.Name = "rbImport"; 171 | this.rbImport.Size = new System.Drawing.Size(68, 22); 172 | this.rbImport.TabIndex = 2; 173 | this.rbImport.TabStop = true; 174 | this.rbImport.Text = "Import"; 175 | this.rbImport.UseVisualStyleBackColor = true; 176 | // 177 | // rbAll 178 | // 179 | this.rbAll.AutoSize = true; 180 | this.rbAll.Location = new System.Drawing.Point(46, 19); 181 | this.rbAll.Margin = new System.Windows.Forms.Padding(4); 182 | this.rbAll.Name = "rbAll"; 183 | this.rbAll.Size = new System.Drawing.Size(41, 22); 184 | this.rbAll.TabIndex = 0; 185 | this.rbAll.TabStop = true; 186 | this.rbAll.Text = "All"; 187 | this.rbAll.UseVisualStyleBackColor = true; 188 | // 189 | // cbbMAs 190 | // 191 | this.cbbMAs.Enabled = false; 192 | this.cbbMAs.FormattingEnabled = true; 193 | this.cbbMAs.Location = new System.Drawing.Point(112, 86); 194 | this.cbbMAs.Margin = new System.Windows.Forms.Padding(4); 195 | this.cbbMAs.Name = "cbbMAs"; 196 | this.cbbMAs.Size = new System.Drawing.Size(307, 26); 197 | this.cbbMAs.TabIndex = 6; 198 | // 199 | // lblMAname 200 | // 201 | this.lblMAname.AutoSize = true; 202 | this.lblMAname.Location = new System.Drawing.Point(62, 91); 203 | this.lblMAname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 204 | this.lblMAname.Name = "lblMAname"; 205 | this.lblMAname.Size = new System.Drawing.Size(38, 18); 206 | this.lblMAname.TabIndex = 5; 207 | this.lblMAname.Text = "MAs"; 208 | // 209 | // tbFile 210 | // 211 | this.tbFile.Enabled = false; 212 | this.tbFile.Location = new System.Drawing.Point(66, 324); 213 | this.tbFile.Margin = new System.Windows.Forms.Padding(4); 214 | this.tbFile.Name = "tbFile"; 215 | this.tbFile.ReadOnly = true; 216 | this.tbFile.Size = new System.Drawing.Size(354, 24); 217 | this.tbFile.TabIndex = 4; 218 | // 219 | // btnOpenFile 220 | // 221 | this.btnOpenFile.Enabled = false; 222 | this.btnOpenFile.Location = new System.Drawing.Point(430, 320); 223 | this.btnOpenFile.Margin = new System.Windows.Forms.Padding(4); 224 | this.btnOpenFile.Name = "btnOpenFile"; 225 | this.btnOpenFile.Size = new System.Drawing.Size(112, 32); 226 | this.btnOpenFile.TabIndex = 3; 227 | this.btnOpenFile.Text = "Select File"; 228 | this.btnOpenFile.UseVisualStyleBackColor = true; 229 | this.btnOpenFile.Click += new System.EventHandler(this.btnOpenFile_Click); 230 | // 231 | // rbFile 232 | // 233 | this.rbFile.AutoSize = true; 234 | this.rbFile.Location = new System.Drawing.Point(36, 285); 235 | this.rbFile.Margin = new System.Windows.Forms.Padding(4); 236 | this.rbFile.Name = "rbFile"; 237 | this.rbFile.Size = new System.Drawing.Size(382, 22); 238 | this.rbFile.TabIndex = 0; 239 | this.rbFile.TabStop = true; 240 | this.rbFile.Text = "Provide existing file (made using one of the examples)"; 241 | this.rbFile.UseVisualStyleBackColor = true; 242 | this.rbFile.CheckedChanged += new System.EventHandler(this.rbFile_CheckedChanged); 243 | // 244 | // rbGenerate 245 | // 246 | this.rbGenerate.AutoSize = true; 247 | this.rbGenerate.Location = new System.Drawing.Point(36, 40); 248 | this.rbGenerate.Margin = new System.Windows.Forms.Padding(4); 249 | this.rbGenerate.Name = "rbGenerate"; 250 | this.rbGenerate.Size = new System.Drawing.Size(514, 22); 251 | this.rbGenerate.TabIndex = 1; 252 | this.rbGenerate.TabStop = true; 253 | this.rbGenerate.Text = "Generate file (must be running on MIM Sync or Azure AD Connect Server)"; 254 | this.rbGenerate.UseVisualStyleBackColor = true; 255 | this.rbGenerate.CheckedChanged += new System.EventHandler(this.rbGenerate_CheckedChanged); 256 | // 257 | // ofdCSfile 258 | // 259 | this.ofdCSfile.DefaultExt = "xml"; 260 | this.ofdCSfile.Filter = "XML Files (.xml)|*.xml"; 261 | // 262 | // sfdReport 263 | // 264 | this.sfdReport.DefaultExt = "html"; 265 | this.sfdReport.Filter = "xml files (*.xml)|*.xml"; 266 | // 267 | // cbForceMemory 268 | // 269 | this.cbForceMemory.AutoSize = true; 270 | this.cbForceMemory.Location = new System.Drawing.Point(771, 330); 271 | this.cbForceMemory.Name = "cbForceMemory"; 272 | this.cbForceMemory.Size = new System.Drawing.Size(170, 22); 273 | this.cbForceMemory.TabIndex = 10; 274 | this.cbForceMemory.Text = "Keep Data in Memory"; 275 | this.cbForceMemory.UseVisualStyleBackColor = true; 276 | this.cbForceMemory.CheckedChanged += new System.EventHandler(this.cbForceMemory_CheckedChanged); 277 | // 278 | // frmGetData 279 | // 280 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); 281 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 282 | this.ClientSize = new System.Drawing.Size(1028, 415); 283 | this.Controls.Add(this.gbSource); 284 | this.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 285 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 286 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 287 | this.Margin = new System.Windows.Forms.Padding(4); 288 | this.MaximizeBox = false; 289 | this.Name = "frmGetData"; 290 | this.Text = "Get Data"; 291 | this.VisibleChanged += new System.EventHandler(this.frmGetData_VisibleChanged); 292 | this.gbSource.ResumeLayout(false); 293 | this.gbSource.PerformLayout(); 294 | this.gbDataSelection.ResumeLayout(false); 295 | this.gbDataSelection.PerformLayout(); 296 | this.ResumeLayout(false); 297 | 298 | } 299 | 300 | #endregion 301 | 302 | private System.Windows.Forms.GroupBox gbSource; 303 | private System.Windows.Forms.RadioButton rbFile; 304 | private System.Windows.Forms.RadioButton rbGenerate; 305 | private System.Windows.Forms.TextBox tbFile; 306 | private System.Windows.Forms.Button btnOpenFile; 307 | private System.Windows.Forms.OpenFileDialog ofdCSfile; 308 | private System.Windows.Forms.Label lblMAname; 309 | private System.Windows.Forms.ComboBox cbbMAs; 310 | private System.Windows.Forms.GroupBox gbDataSelection; 311 | private System.Windows.Forms.RadioButton rbExport; 312 | private System.Windows.Forms.RadioButton rbImport; 313 | private System.Windows.Forms.RadioButton rbAll; 314 | private System.Windows.Forms.Button btnGenerate; 315 | private System.Windows.Forms.SaveFileDialog sfdReport; 316 | private System.Windows.Forms.RadioButton rbImportError; 317 | private System.Windows.Forms.RadioButton rbExportError; 318 | private System.Windows.Forms.Button btnShowExamples; 319 | private System.Windows.Forms.CheckBox cbSystem; 320 | private System.Windows.Forms.CheckBox cbForceMemory; 321 | } 322 | } -------------------------------------------------------------------------------- /Forms/frmGetData.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | using Microsoft.Win32; 26 | using System; 27 | using System.Collections.Generic; 28 | using System.ComponentModel; 29 | using System.Data; 30 | using System.Diagnostics; 31 | using System.Drawing; 32 | using System.IO; 33 | using System.Linq; 34 | using System.Management; 35 | using System.Text; 36 | using System.Windows.Forms; 37 | 38 | namespace csReporter 39 | { 40 | public partial class frmGetData : Form 41 | { 42 | frmFilter reporter; 43 | string csExportFilePath; 44 | string generatedFile; 45 | 46 | public frmGetData() 47 | { 48 | InitializeComponent(); 49 | } 50 | 51 | private void btnOpenFile_Click(object sender, EventArgs e) 52 | { 53 | try 54 | { 55 | if (ofdCSfile.ShowDialog() == DialogResult.OK) 56 | { 57 | if (ofdCSfile.FileName == string.Empty) 58 | { 59 | MessageBox.Show("No file selected"); 60 | } 61 | else 62 | { 63 | tbFile.Text = ofdCSfile.SafeFileName; 64 | reporter = new frmFilter(ofdCSfile.FileName, cbForceMemory.Checked); 65 | this.Hide(); 66 | reporter.Owner = this; 67 | reporter.Show(); 68 | } 69 | } 70 | } 71 | catch (Exception ex) 72 | { 73 | ExceptionHandler.handleException(ex, "Error occurred getting file name from dialog"); 74 | Application.Exit(); 75 | } 76 | } 77 | 78 | private void rbFile_CheckedChanged(object sender, EventArgs e) 79 | { 80 | if (rbFile.Checked) 81 | { 82 | tbFile.Enabled = true; 83 | btnOpenFile.Enabled = true; 84 | } 85 | else 86 | { 87 | tbFile.Enabled = false; 88 | btnOpenFile.Enabled = false; 89 | } 90 | } 91 | 92 | private void rbGenerate_CheckedChanged(object sender, EventArgs e) 93 | { 94 | try 95 | { 96 | if (rbGenerate.Checked) 97 | { 98 | string installPath = ""; 99 | try 100 | { 101 | //get install path from registry 102 | installPath = (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Forefront Identity Manager\2010\Synchronization Service", "Location", null); 103 | if (installPath != null) 104 | { 105 | csExportFilePath = installPath + @"Synchronization Service\Bin\csexport.exe"; 106 | if (!File.Exists(csExportFilePath)) 107 | { 108 | //Set secondary path used by Azure AD Connect to check 109 | csExportFilePath = installPath + @"Bin\csexport.exe"; 110 | } 111 | if (!File.Exists(csExportFilePath)) 112 | { 113 | MessageBox.Show("Unable to locate the csexport utility in the default folder\r\n\r\n" + csExportFilePath); 114 | rbFile.Checked = true; 115 | return; 116 | } 117 | } 118 | else 119 | { 120 | MessageBox.Show("The MIM Sync or Azure AD Connect service doesn't appear to be installed on this system.\r\n\r\nRegistry settings not found\r\n\r\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Forefront Identity Manager\\2010\\Synchronization Service\\Location"); 121 | rbFile.Checked = true; 122 | return; 123 | } 124 | } 125 | catch (Exception ex) 126 | { 127 | ExceptionHandler.handleException(ex, "Error occurred checking if MIM Sync or Azure AD Connect is installed on this system." 128 | + " Automatic creation of csexport data is unavailable."); 129 | rbFile.Checked = true; 130 | return; 131 | } 132 | ManagementScope scope = new ManagementScope(@"\\.\root\MicrosoftIdentityIntegrationServer"); 133 | SelectQuery query = new SelectQuery("select * from MIIS_ManagementAgent"); 134 | string[] maNames = null; 135 | 136 | try 137 | { 138 | using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query)) 139 | { 140 | ManagementObjectCollection MAs = searcher.Get(); 141 | maNames = (from ManagementObject MA in MAs select MA["Name"].ToString()).ToArray(); 142 | } 143 | } 144 | catch (Exception ex) 145 | { 146 | //WMI interface removed for AADC, try locating the MaData folder and getting MA names from sub-folders 147 | string maDataPath = installPath + "\\MaData"; 148 | if (Directory.Exists(maDataPath)) 149 | { 150 | //get list of directories for MA names and trim the full path to only folder\MA names 151 | maNames = Directory.GetDirectories(maDataPath).Select(name => name.Replace(maDataPath + "\\", "")).ToArray(); 152 | } 153 | else 154 | { 155 | ExceptionHandler.handleException(ex, "Error getting list of management agent names." 156 | + " Automatic creation of csexport data is unavailable."); 157 | rbFile.Checked = true; 158 | return; 159 | } 160 | } 161 | Array.Sort(maNames); 162 | cbbMAs.Items.Clear(); 163 | cbbMAs.Items.AddRange(maNames); 164 | 165 | cbbMAs.Enabled = true; 166 | gbDataSelection.Enabled = true; 167 | btnGenerate.Enabled = true; 168 | } 169 | else 170 | { 171 | cbbMAs.Enabled = false; 172 | gbDataSelection.Enabled = false; 173 | btnGenerate.Enabled = false; 174 | } 175 | } 176 | catch (Exception ex) 177 | { 178 | ExceptionHandler.handleException(ex, "Error checking for MIM Sync or Azure AD Connect install and getting management agent names via WMI." 179 | + " Automatic creation of csexport data is unavailable."); 180 | Application.Exit(); 181 | } 182 | } 183 | 184 | private void btnGenerate_Click(object sender, EventArgs e) 185 | { 186 | if (cbbMAs.SelectedIndex == -1) 187 | { 188 | MessageBox.Show("You must select an MA from the list."); 189 | return; 190 | } 191 | RadioButton selectedRB; 192 | try { selectedRB = gbDataSelection.Controls.OfType().First(r => r.Checked); } 193 | catch (InvalidOperationException) 194 | { 195 | MessageBox.Show("You must select the data you wish to report on"); 196 | return; 197 | } 198 | 199 | if (sfdReport.ShowDialog() == DialogResult.OK) 200 | { 201 | Process proc = new Process(); 202 | proc.StartInfo.UseShellExecute = false; 203 | proc.StartInfo.FileName = csExportFilePath; 204 | generatedFile = sfdReport.FileName; 205 | string subElements = ""; 206 | if (!cbSystem.Checked) 207 | { 208 | subElements = " /o:bhd"; 209 | } 210 | if (File.Exists(generatedFile)) { File.Delete(generatedFile); } 211 | switch (selectedRB.Name) 212 | { 213 | case "rbAll": 214 | proc.StartInfo.Arguments = "\"" + cbbMAs.SelectedItem.ToString() + "\" \"" + generatedFile + "\"" + subElements; 215 | break; 216 | case "rbExport": 217 | proc.StartInfo.Arguments = "\"" + cbbMAs.SelectedItem.ToString() + "\" \"" + generatedFile + "\" /f:x" + subElements; 218 | break; 219 | case "rbImport": 220 | proc.StartInfo.Arguments = "\"" + cbbMAs.SelectedItem.ToString() + "\" \"" + generatedFile + "\" /f:m" + subElements; 221 | break; 222 | case "rbImportError": 223 | proc.StartInfo.Arguments = "\"" + cbbMAs.SelectedItem.ToString() + "\" \"" + generatedFile + "\" /f:i" + subElements + "e"; 224 | break; 225 | case "rbExportError": 226 | proc.StartInfo.Arguments = "\"" + cbbMAs.SelectedItem.ToString() + "\" \"" + generatedFile + "\" /f:e" + subElements + "e"; 227 | break; 228 | } 229 | proc.Start(); 230 | proc.WaitForExit(); 231 | reporter = new frmFilter(generatedFile, cbForceMemory.Checked); 232 | this.Hide(); 233 | reporter.Owner = this; 234 | reporter.Show(); 235 | } 236 | } 237 | 238 | private void btnShowExamples_Click(object sender, EventArgs e) 239 | { 240 | frmCSExamples examples = new frmCSExamples(); 241 | examples.ShowDialog(); 242 | examples.Dispose(); 243 | } 244 | 245 | private void frmGetData_VisibleChanged(object sender, EventArgs e) 246 | { 247 | if (this.Visible && reporter != null) 248 | { 249 | reporter.Close(); 250 | System.GC.Collect(); 251 | } 252 | } 253 | 254 | private void cbSystem_CheckedChanged(object sender, EventArgs e) 255 | { 256 | if (cbSystem.Checked) 257 | { 258 | MessageBox.Show("Including system attributes in the export will greatly increase the length of time required for the export to complete."); 259 | } 260 | } 261 | 262 | private void cbForceMemory_CheckedChanged(object sender, EventArgs e) 263 | { 264 | if (cbForceMemory.Checked == true) 265 | { 266 | if (MessageBox.Show("Checking this box forces all data to remain in memory.\r\n\r\nThis will cause memory usage to be 3x the XML file size on disk.\r\n\r\nAre you certain you wish to continue?", "**WARNING**", MessageBoxButtons.YesNo) == DialogResult.No) 267 | { 268 | cbForceMemory.Checked = false; 269 | } 270 | } 271 | } 272 | } 273 | } 274 | -------------------------------------------------------------------------------- /Forms/frmProgressBar.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace csReporter 2 | { 3 | partial class frmProgressBar 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmProgressBar)); 32 | this.pbProcessing = new System.Windows.Forms.ProgressBar(); 33 | this.lblAction = new System.Windows.Forms.Label(); 34 | this.lblProgress = new System.Windows.Forms.Label(); 35 | this.SuspendLayout(); 36 | // 37 | // pbProcessing 38 | // 39 | this.pbProcessing.ForeColor = System.Drawing.SystemColors.HighlightText; 40 | this.pbProcessing.Location = new System.Drawing.Point(18, 76); 41 | this.pbProcessing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 42 | this.pbProcessing.Name = "pbProcessing"; 43 | this.pbProcessing.Size = new System.Drawing.Size(548, 32); 44 | this.pbProcessing.TabIndex = 0; 45 | // 46 | // lblAction 47 | // 48 | this.lblAction.AutoSize = true; 49 | this.lblAction.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 50 | this.lblAction.Location = new System.Drawing.Point(189, 25); 51 | this.lblAction.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 52 | this.lblAction.Name = "lblAction"; 53 | this.lblAction.Size = new System.Drawing.Size(0, 25); 54 | this.lblAction.TabIndex = 1; 55 | // 56 | // lblProgress 57 | // 58 | this.lblProgress.AutoSize = true; 59 | this.lblProgress.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 60 | this.lblProgress.Location = new System.Drawing.Point(574, 82); 61 | this.lblProgress.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 62 | this.lblProgress.Name = "lblProgress"; 63 | this.lblProgress.Size = new System.Drawing.Size(39, 16); 64 | this.lblProgress.TabIndex = 2; 65 | this.lblProgress.Text = "100%"; 66 | // 67 | // frmProgressBar 68 | // 69 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); 70 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 71 | this.ClientSize = new System.Drawing.Size(634, 133); 72 | this.Controls.Add(this.lblProgress); 73 | this.Controls.Add(this.lblAction); 74 | this.Controls.Add(this.pbProcessing); 75 | this.Cursor = System.Windows.Forms.Cursors.WaitCursor; 76 | this.DoubleBuffered = true; 77 | this.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 78 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 79 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 80 | this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 81 | this.MaximizeBox = false; 82 | this.MinimizeBox = false; 83 | this.Name = "frmProgressBar"; 84 | this.ShowIcon = false; 85 | this.ShowInTaskbar = false; 86 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmProgressBar_FormClosing); 87 | this.ResumeLayout(false); 88 | this.PerformLayout(); 89 | 90 | } 91 | 92 | #endregion 93 | 94 | private System.Windows.Forms.ProgressBar pbProcessing; 95 | private System.Windows.Forms.Label lblAction; 96 | private System.Windows.Forms.Label lblProgress; 97 | } 98 | } -------------------------------------------------------------------------------- /Forms/frmProgressBar.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | using System; 26 | using System.Collections.Generic; 27 | using System.ComponentModel; 28 | using System.Data; 29 | using System.Drawing; 30 | using System.Globalization; 31 | using System.IO; 32 | using System.Linq; 33 | using System.Reflection; 34 | using System.Security.Principal; 35 | using System.Text; 36 | using System.Threading; 37 | using System.Windows.Forms; 38 | using System.Xml; 39 | 40 | namespace csReporter 41 | { 42 | public partial class frmProgressBar : Form 43 | { 44 | 45 | //Graphics percentage; 46 | bool closing; 47 | 48 | public frmProgressBar() 49 | { 50 | InitializeComponent(); 51 | 52 | //percentage = pbProcessing.CreateGraphics(); 53 | closing = false; 54 | } 55 | 56 | public void updateBar(int val) 57 | { 58 | if (!closing) 59 | { 60 | pbProcessing.Value = val; 61 | lblProgress.Text = val.ToString() + "%"; 62 | } 63 | } 64 | 65 | public void setLblText(string val) 66 | { 67 | lblAction.Text = val; 68 | } 69 | 70 | 71 | private void frmProgressBar_FormClosing(object sender, FormClosingEventArgs e) 72 | { 73 | if (this.DialogResult != System.Windows.Forms.DialogResult.OK) 74 | { 75 | frmFilter.stopProcessing = true; 76 | } 77 | closing = true; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Forms/frmReport.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace csReporter 2 | { 3 | partial class frmReport 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmReport)); 32 | this.lbAttribute = new System.Windows.Forms.ListBox(); 33 | this.gbFormat = new System.Windows.Forms.GroupBox(); 34 | this.rbExcel = new System.Windows.Forms.RadioButton(); 35 | this.rbCSV = new System.Windows.Forms.RadioButton(); 36 | this.rbHTML = new System.Windows.Forms.RadioButton(); 37 | this.btnOK = new System.Windows.Forms.Button(); 38 | this.btnCancel = new System.Windows.Forms.Button(); 39 | this.gbLayout = new System.Windows.Forms.GroupBox(); 40 | this.rbVertical = new System.Windows.Forms.RadioButton(); 41 | this.rbHorizontal = new System.Windows.Forms.RadioButton(); 42 | this.lblSelectAttributes = new System.Windows.Forms.Label(); 43 | this.gbFilterCriteria = new System.Windows.Forms.GroupBox(); 44 | this.cbFilterCriteria = new System.Windows.Forms.CheckBox(); 45 | this.gbFontSize = new System.Windows.Forms.GroupBox(); 46 | this.cbbFontSize = new System.Windows.Forms.ComboBox(); 47 | this.rbFullList = new System.Windows.Forms.RadioButton(); 48 | this.rbNetChange = new System.Windows.Forms.RadioButton(); 49 | this.gbMultiValue = new System.Windows.Forms.GroupBox(); 50 | this.gbFormat.SuspendLayout(); 51 | this.gbLayout.SuspendLayout(); 52 | this.gbFilterCriteria.SuspendLayout(); 53 | this.gbFontSize.SuspendLayout(); 54 | this.gbMultiValue.SuspendLayout(); 55 | this.SuspendLayout(); 56 | // 57 | // lbAttribute 58 | // 59 | this.lbAttribute.FormattingEnabled = true; 60 | this.lbAttribute.ItemHeight = 18; 61 | this.lbAttribute.Location = new System.Drawing.Point(18, 35); 62 | this.lbAttribute.Margin = new System.Windows.Forms.Padding(4); 63 | this.lbAttribute.Name = "lbAttribute"; 64 | this.lbAttribute.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; 65 | this.lbAttribute.Size = new System.Drawing.Size(529, 418); 66 | this.lbAttribute.Sorted = true; 67 | this.lbAttribute.TabIndex = 5; 68 | // 69 | // gbFormat 70 | // 71 | this.gbFormat.Controls.Add(this.rbExcel); 72 | this.gbFormat.Controls.Add(this.rbCSV); 73 | this.gbFormat.Controls.Add(this.rbHTML); 74 | this.gbFormat.Location = new System.Drawing.Point(555, 135); 75 | this.gbFormat.Margin = new System.Windows.Forms.Padding(4); 76 | this.gbFormat.Name = "gbFormat"; 77 | this.gbFormat.Padding = new System.Windows.Forms.Padding(4); 78 | this.gbFormat.Size = new System.Drawing.Size(132, 129); 79 | this.gbFormat.TabIndex = 6; 80 | this.gbFormat.TabStop = false; 81 | this.gbFormat.Text = "Format"; 82 | // 83 | // rbExcel 84 | // 85 | this.rbExcel.AutoSize = true; 86 | this.rbExcel.Location = new System.Drawing.Point(9, 96); 87 | this.rbExcel.Margin = new System.Windows.Forms.Padding(4); 88 | this.rbExcel.Name = "rbExcel"; 89 | this.rbExcel.Size = new System.Drawing.Size(62, 22); 90 | this.rbExcel.TabIndex = 2; 91 | this.rbExcel.TabStop = true; 92 | this.rbExcel.Text = "Excel"; 93 | this.rbExcel.UseVisualStyleBackColor = true; 94 | this.rbExcel.CheckedChanged += new System.EventHandler(this.rbExcel_CheckedChanged); 95 | // 96 | // rbCSV 97 | // 98 | this.rbCSV.AutoSize = true; 99 | this.rbCSV.Location = new System.Drawing.Point(9, 64); 100 | this.rbCSV.Margin = new System.Windows.Forms.Padding(4); 101 | this.rbCSV.Name = "rbCSV"; 102 | this.rbCSV.Size = new System.Drawing.Size(56, 22); 103 | this.rbCSV.TabIndex = 1; 104 | this.rbCSV.TabStop = true; 105 | this.rbCSV.Text = "CSV"; 106 | this.rbCSV.UseVisualStyleBackColor = true; 107 | // 108 | // rbHTML 109 | // 110 | this.rbHTML.AutoSize = true; 111 | this.rbHTML.Location = new System.Drawing.Point(9, 30); 112 | this.rbHTML.Margin = new System.Windows.Forms.Padding(4); 113 | this.rbHTML.Name = "rbHTML"; 114 | this.rbHTML.Size = new System.Drawing.Size(67, 22); 115 | this.rbHTML.TabIndex = 0; 116 | this.rbHTML.TabStop = true; 117 | this.rbHTML.Text = "HTML"; 118 | this.rbHTML.UseVisualStyleBackColor = true; 119 | // 120 | // btnOK 121 | // 122 | this.btnOK.Location = new System.Drawing.Point(82, 482); 123 | this.btnOK.Margin = new System.Windows.Forms.Padding(4); 124 | this.btnOK.Name = "btnOK"; 125 | this.btnOK.Size = new System.Drawing.Size(135, 35); 126 | this.btnOK.TabIndex = 26; 127 | this.btnOK.Text = "OK"; 128 | this.btnOK.UseVisualStyleBackColor = true; 129 | this.btnOK.Click += new System.EventHandler(this.btnOK_Click); 130 | // 131 | // btnCancel 132 | // 133 | this.btnCancel.Location = new System.Drawing.Point(248, 482); 134 | this.btnCancel.Margin = new System.Windows.Forms.Padding(4); 135 | this.btnCancel.Name = "btnCancel"; 136 | this.btnCancel.Size = new System.Drawing.Size(135, 35); 137 | this.btnCancel.TabIndex = 27; 138 | this.btnCancel.Text = "Cancel"; 139 | this.btnCancel.UseVisualStyleBackColor = true; 140 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 141 | // 142 | // gbLayout 143 | // 144 | this.gbLayout.Controls.Add(this.rbVertical); 145 | this.gbLayout.Controls.Add(this.rbHorizontal); 146 | this.gbLayout.Location = new System.Drawing.Point(555, 335); 147 | this.gbLayout.Margin = new System.Windows.Forms.Padding(4); 148 | this.gbLayout.Name = "gbLayout"; 149 | this.gbLayout.Padding = new System.Windows.Forms.Padding(4); 150 | this.gbLayout.Size = new System.Drawing.Size(132, 101); 151 | this.gbLayout.TabIndex = 7; 152 | this.gbLayout.TabStop = false; 153 | this.gbLayout.Text = "Layout"; 154 | this.gbLayout.Visible = false; 155 | // 156 | // rbVertical 157 | // 158 | this.rbVertical.AutoSize = true; 159 | this.rbVertical.Location = new System.Drawing.Point(9, 64); 160 | this.rbVertical.Margin = new System.Windows.Forms.Padding(4); 161 | this.rbVertical.Name = "rbVertical"; 162 | this.rbVertical.Size = new System.Drawing.Size(74, 22); 163 | this.rbVertical.TabIndex = 1; 164 | this.rbVertical.TabStop = true; 165 | this.rbVertical.Text = "Vertical"; 166 | this.rbVertical.UseVisualStyleBackColor = true; 167 | // 168 | // rbHorizontal 169 | // 170 | this.rbHorizontal.AutoSize = true; 171 | this.rbHorizontal.Location = new System.Drawing.Point(9, 32); 172 | this.rbHorizontal.Margin = new System.Windows.Forms.Padding(4); 173 | this.rbHorizontal.Name = "rbHorizontal"; 174 | this.rbHorizontal.Size = new System.Drawing.Size(94, 22); 175 | this.rbHorizontal.TabIndex = 0; 176 | this.rbHorizontal.TabStop = true; 177 | this.rbHorizontal.Text = "Horizontal"; 178 | this.rbHorizontal.UseVisualStyleBackColor = true; 179 | // 180 | // lblSelectAttributes 181 | // 182 | this.lblSelectAttributes.AutoSize = true; 183 | this.lblSelectAttributes.Location = new System.Drawing.Point(18, 15); 184 | this.lblSelectAttributes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 185 | this.lblSelectAttributes.Name = "lblSelectAttributes"; 186 | this.lblSelectAttributes.Size = new System.Drawing.Size(239, 18); 187 | this.lblSelectAttributes.TabIndex = 28; 188 | this.lblSelectAttributes.Text = "Select Attributes to include in report"; 189 | // 190 | // gbFilterCriteria 191 | // 192 | this.gbFilterCriteria.Controls.Add(this.cbFilterCriteria); 193 | this.gbFilterCriteria.Location = new System.Drawing.Point(555, 272); 194 | this.gbFilterCriteria.Margin = new System.Windows.Forms.Padding(4); 195 | this.gbFilterCriteria.Name = "gbFilterCriteria"; 196 | this.gbFilterCriteria.Padding = new System.Windows.Forms.Padding(4); 197 | this.gbFilterCriteria.Size = new System.Drawing.Size(132, 55); 198 | this.gbFilterCriteria.TabIndex = 8; 199 | this.gbFilterCriteria.TabStop = false; 200 | this.gbFilterCriteria.Text = "Filter Criteria"; 201 | // 202 | // cbFilterCriteria 203 | // 204 | this.cbFilterCriteria.AutoSize = true; 205 | this.cbFilterCriteria.Location = new System.Drawing.Point(10, 24); 206 | this.cbFilterCriteria.Name = "cbFilterCriteria"; 207 | this.cbFilterCriteria.Size = new System.Drawing.Size(73, 22); 208 | this.cbFilterCriteria.TabIndex = 29; 209 | this.cbFilterCriteria.Text = "Include"; 210 | this.cbFilterCriteria.UseVisualStyleBackColor = true; 211 | // 212 | // gbFontSize 213 | // 214 | this.gbFontSize.Controls.Add(this.cbbFontSize); 215 | this.gbFontSize.Location = new System.Drawing.Point(555, 444); 216 | this.gbFontSize.Margin = new System.Windows.Forms.Padding(4); 217 | this.gbFontSize.Name = "gbFontSize"; 218 | this.gbFontSize.Padding = new System.Windows.Forms.Padding(4); 219 | this.gbFontSize.Size = new System.Drawing.Size(132, 59); 220 | this.gbFontSize.TabIndex = 8; 221 | this.gbFontSize.TabStop = false; 222 | this.gbFontSize.Text = "Font Size"; 223 | this.gbFontSize.Visible = false; 224 | // 225 | // cbbFontSize 226 | // 227 | this.cbbFontSize.FormattingEnabled = true; 228 | this.cbbFontSize.Items.AddRange(new object[] { 229 | "8", 230 | "9", 231 | "10", 232 | "11", 233 | "12", 234 | "13", 235 | "14", 236 | "15", 237 | "16", 238 | "17", 239 | "18"}); 240 | this.cbbFontSize.Location = new System.Drawing.Point(9, 24); 241 | this.cbbFontSize.Name = "cbbFontSize"; 242 | this.cbbFontSize.Size = new System.Drawing.Size(67, 26); 243 | this.cbbFontSize.TabIndex = 29; 244 | // 245 | // rbFullList 246 | // 247 | this.rbFullList.AutoSize = true; 248 | this.rbFullList.Location = new System.Drawing.Point(9, 64); 249 | this.rbFullList.Margin = new System.Windows.Forms.Padding(4); 250 | this.rbFullList.Name = "rbFullList"; 251 | this.rbFullList.Size = new System.Drawing.Size(76, 22); 252 | this.rbFullList.TabIndex = 1; 253 | this.rbFullList.TabStop = true; 254 | this.rbFullList.Text = "Full List"; 255 | this.rbFullList.UseVisualStyleBackColor = true; 256 | // 257 | // rbNetChange 258 | // 259 | this.rbNetChange.AutoSize = true; 260 | this.rbNetChange.Location = new System.Drawing.Point(9, 32); 261 | this.rbNetChange.Margin = new System.Windows.Forms.Padding(4); 262 | this.rbNetChange.Name = "rbNetChange"; 263 | this.rbNetChange.Size = new System.Drawing.Size(104, 22); 264 | this.rbNetChange.TabIndex = 0; 265 | this.rbNetChange.TabStop = true; 266 | this.rbNetChange.Text = "Net Change"; 267 | this.rbNetChange.UseVisualStyleBackColor = true; 268 | // 269 | // gbMultiValue 270 | // 271 | this.gbMultiValue.Controls.Add(this.rbFullList); 272 | this.gbMultiValue.Controls.Add(this.rbNetChange); 273 | this.gbMultiValue.Location = new System.Drawing.Point(555, 26); 274 | this.gbMultiValue.Margin = new System.Windows.Forms.Padding(4); 275 | this.gbMultiValue.Name = "gbMultiValue"; 276 | this.gbMultiValue.Padding = new System.Windows.Forms.Padding(4); 277 | this.gbMultiValue.Size = new System.Drawing.Size(132, 101); 278 | this.gbMultiValue.TabIndex = 29; 279 | this.gbMultiValue.TabStop = false; 280 | this.gbMultiValue.Text = "Multi-Value"; 281 | // 282 | // frmReport 283 | // 284 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); 285 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 286 | this.ClientSize = new System.Drawing.Size(702, 539); 287 | this.Controls.Add(this.gbMultiValue); 288 | this.Controls.Add(this.gbFontSize); 289 | this.Controls.Add(this.gbFilterCriteria); 290 | this.Controls.Add(this.lblSelectAttributes); 291 | this.Controls.Add(this.gbLayout); 292 | this.Controls.Add(this.btnCancel); 293 | this.Controls.Add(this.btnOK); 294 | this.Controls.Add(this.gbFormat); 295 | this.Controls.Add(this.lbAttribute); 296 | this.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 297 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 298 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 299 | this.Margin = new System.Windows.Forms.Padding(4); 300 | this.MaximizeBox = false; 301 | this.MinimizeBox = false; 302 | this.Name = "frmReport"; 303 | this.Text = "Report Settings"; 304 | this.gbFormat.ResumeLayout(false); 305 | this.gbFormat.PerformLayout(); 306 | this.gbLayout.ResumeLayout(false); 307 | this.gbLayout.PerformLayout(); 308 | this.gbFilterCriteria.ResumeLayout(false); 309 | this.gbFilterCriteria.PerformLayout(); 310 | this.gbFontSize.ResumeLayout(false); 311 | this.gbMultiValue.ResumeLayout(false); 312 | this.gbMultiValue.PerformLayout(); 313 | this.ResumeLayout(false); 314 | this.PerformLayout(); 315 | 316 | } 317 | 318 | #endregion 319 | 320 | private System.Windows.Forms.ListBox lbAttribute; 321 | private System.Windows.Forms.GroupBox gbFormat; 322 | private System.Windows.Forms.RadioButton rbCSV; 323 | private System.Windows.Forms.RadioButton rbHTML; 324 | private System.Windows.Forms.Button btnOK; 325 | private System.Windows.Forms.Button btnCancel; 326 | private System.Windows.Forms.RadioButton rbExcel; 327 | private System.Windows.Forms.GroupBox gbLayout; 328 | private System.Windows.Forms.RadioButton rbVertical; 329 | private System.Windows.Forms.RadioButton rbHorizontal; 330 | private System.Windows.Forms.Label lblSelectAttributes; 331 | private System.Windows.Forms.GroupBox gbFilterCriteria; 332 | private System.Windows.Forms.CheckBox cbFilterCriteria; 333 | private System.Windows.Forms.GroupBox gbFontSize; 334 | private System.Windows.Forms.ComboBox cbbFontSize; 335 | private System.Windows.Forms.RadioButton rbFullList; 336 | private System.Windows.Forms.RadioButton rbNetChange; 337 | private System.Windows.Forms.GroupBox gbMultiValue; 338 | } 339 | } -------------------------------------------------------------------------------- /Forms/frmReport.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | using System; 26 | using System.Collections.Generic; 27 | using System.ComponentModel; 28 | using System.Data; 29 | using System.Drawing; 30 | using System.Linq; 31 | using System.Text; 32 | using System.Windows.Forms; 33 | 34 | namespace csReporter 35 | { 36 | public partial class frmReport : Form 37 | { 38 | 39 | public frmReport(ListavailableAttributes) 40 | { 41 | InitializeComponent(); 42 | lbAttribute.Items.AddRange(availableAttributes.ToArray()); 43 | } 44 | 45 | private void btnOK_Click(object sender, EventArgs e) 46 | { 47 | try 48 | { 49 | if (!rbCSV.Checked && !rbHTML.Checked && !rbExcel.Checked) 50 | { 51 | MessageBox.Show("You must choose a report format.", "Report format", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 52 | return; 53 | } 54 | frmFilter parent = (frmFilter)this.Owner; 55 | parent.SetReportIncludeFilter(cbFilterCriteria.Checked); 56 | if (lbAttribute.SelectedItems.Count == 0) 57 | { 58 | parent.SetReportAttributes(lbAttribute.Items.Cast().ToList()); 59 | } 60 | else 61 | { 62 | parent.SetReportAttributes(lbAttribute.SelectedItems.Cast().ToList()); 63 | } 64 | if (rbCSV.Checked) 65 | { 66 | parent.SetReportType(reportType.CSV); 67 | } 68 | else if (rbHTML.Checked) 69 | { 70 | parent.SetReportType(reportType.HTML); 71 | } 72 | else 73 | { 74 | if (!rbHorizontal.Checked && !rbVertical.Checked) 75 | { 76 | MessageBox.Show("You must choose a report layout.", "Report layout", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 77 | return; 78 | } 79 | parent.SetReportType(reportType.Excel); 80 | if (rbHorizontal.Checked) 81 | { 82 | parent.SetReportLayout(true); 83 | } 84 | else 85 | { 86 | parent.SetReportLayout(false); 87 | } 88 | if (cbbFontSize.SelectedItem == null) 89 | { 90 | MessageBox.Show("You must choose a font size.", "Font Size", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 91 | return; 92 | } 93 | parent.SetReportFontSize(int.Parse(cbbFontSize.SelectedItem.ToString())); 94 | } 95 | if (!rbNetChange.Checked && !rbFullList.Checked) 96 | { 97 | MessageBox.Show("You must choose how to display mutli-value attributes in the report.", "Multi-Value", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 98 | return; 99 | } 100 | if (rbNetChange.Checked) 101 | { 102 | parent.SetMultivalueBehavior(false); 103 | } 104 | else 105 | { 106 | parent.SetMultivalueBehavior(true); 107 | } 108 | this.DialogResult = System.Windows.Forms.DialogResult.OK; 109 | } 110 | catch (Exception ex) 111 | { 112 | ExceptionHandler.handleException(ex, "Error occurred while getting report details."); 113 | this.DialogResult = System.Windows.Forms.DialogResult.Abort; 114 | } 115 | } 116 | 117 | private void btnCancel_Click(object sender, EventArgs e) 118 | { 119 | this.DialogResult = System.Windows.Forms.DialogResult.Cancel; 120 | } 121 | 122 | private void rbExcel_CheckedChanged(object sender, EventArgs e) 123 | { 124 | if (rbExcel.Checked) 125 | { 126 | gbLayout.Visible = true; 127 | gbFontSize.Visible = true; 128 | } 129 | else 130 | { 131 | gbLayout.Visible = false; 132 | gbFontSize.Visible = false; 133 | } 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /Helper Classes/HelperClasses2.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | 26 | //using System; 27 | //using System.Collections.Generic; 28 | //using System.Collections.Concurrent; 29 | //using System.ComponentModel; 30 | //using System.Text; 31 | //using System.Xml; 32 | 33 | 34 | 35 | //namespace csReporter 36 | //{ 37 | // static class ExceptionHandler 38 | // { 39 | // private static string getErrorMessage(Exception ex, int depth) 40 | // { 41 | // string erMsg = "\r\n\r\n"; 42 | // if (depth > 0) 43 | // { 44 | // erMsg += "****Inner Exception****\r\n"; 45 | // } 46 | // if (depth < 10) 47 | // { 48 | // if (ex.Message != string.Empty) 49 | // { 50 | // erMsg += "Exception message:\r\n" + ex.Message; 51 | // } 52 | // erMsg += "\r\n\r\nException Type: " + ex.GetType().ToString(); 53 | // if (ex.StackTrace != null) 54 | // { 55 | // erMsg += "\r\n\r\nStack trace:\r\n" + ex.StackTrace; 56 | // } 57 | // if (ex.InnerException != null) 58 | // { 59 | // erMsg += getErrorMessage(ex.InnerException, ++depth); 60 | // } 61 | // } 62 | // else 63 | // { 64 | // erMsg = "\r\n\r\n######## More than 10 exceptions. Too many to display.########"; 65 | // } 66 | // return erMsg; 67 | // } 68 | 69 | // public static void handleException(Exception ex, string bannerMsg) 70 | // { 71 | // string errorInfo = getErrorMessage(ex, 0); 72 | // frmError errorForm = new frmError(bannerMsg, errorInfo); 73 | // errorForm.ShowDialog(); 74 | // errorForm.Dispose(); 75 | // } 76 | // } 77 | 78 | // public delegate void LoadCompletedEventHandler(object sender, EventArgs e); 79 | 80 | // class CustomConcurrentBag : ConcurrentBag 81 | // { 82 | // private bool loadingComplete; 83 | // public event LoadCompletedEventHandler FinishedLoading; 84 | 85 | // public bool LoadingComplete 86 | // { 87 | // get 88 | // { 89 | // return loadingComplete; 90 | // } 91 | // set 92 | // { 93 | // loadingComplete = value; 94 | // if (this.FinishedLoading != null) 95 | // { 96 | // FinishedLoading(this, EventArgs.Empty); 97 | // } 98 | // } 99 | // } 100 | // } 101 | //} -------------------------------------------------------------------------------- /Helper Classes/HelperClasses3.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | //using System; 26 | //using System.Collections.Generic; 27 | //using System.Collections.Concurrent; 28 | //using System.ComponentModel; 29 | //using System.Text; 30 | //using System.Threading; 31 | //using System.Xml; 32 | 33 | 34 | 35 | //namespace csReporter 36 | //{ 37 | // public enum operation { none, add, replace, update, delete, deleteAdd }; 38 | 39 | // //public enum pendingAction { Import, Export, None }; 40 | // public enum State { UnappliedExport, EscrowedExport, UnconfirmedExport, PendingImport, None }; 41 | 42 | // class FilterObject 43 | // { 44 | // State filterState; 45 | // List objTypes = new List(); 46 | // List ops = new List(); 47 | // List availableAttribs = new List(); 48 | // List reportAttribs = new List(); 49 | // BindingList attribFilters = new BindingList(); 50 | // private FilterLevel lev; 51 | // public enum FilterLevel { ImportExport, ObjectType, Operation, AttributeValue }; 52 | 53 | // public FilterObject() 54 | // { } 55 | // public FilterObject(State FilterState, FilterLevel level) 56 | // { 57 | // filterState = FilterState; 58 | // lev = level; 59 | // } 60 | // public FilterObject(State FilterState, FilterLevel level, List objectTypes) 61 | // { 62 | // filterState = FilterState; 63 | // lev = level; 64 | // objTypes = objectTypes; 65 | // } 66 | // public FilterObject(State FilterState, FilterLevel level, List objectTypes, List operations) 67 | // { 68 | // filterState = FilterState; 69 | // lev = level; 70 | // objTypes = objectTypes; 71 | // ops = operations; 72 | // } 73 | // public FilterObject(State FilterState, FilterLevel level, List objectTypes, List operations, List attributes) 74 | // { 75 | // filterState = FilterState; 76 | // lev = level; 77 | // objTypes = objectTypes; 78 | // ops = operations; 79 | // availableAttribs = attributes; 80 | // } 81 | // public FilterObject(State FilterState, FilterLevel level, List objectTypes, List operations, List attributes, BindingList filters) 82 | // { 83 | // filterState = FilterState; 84 | // lev = level; 85 | // objTypes = objectTypes; 86 | // ops = operations; 87 | // availableAttribs = attributes; 88 | // attribFilters = filters; 89 | // } 90 | 91 | // public State FilterState 92 | // { 93 | // get 94 | // { 95 | // return filterState; 96 | // } 97 | // set 98 | // { 99 | // filterState = value; 100 | // } 101 | // } 102 | 103 | // public List ObjectTypes 104 | // { 105 | // get 106 | // { 107 | // return objTypes; 108 | // } 109 | // set 110 | // { 111 | // objTypes = value; 112 | // } 113 | // } 114 | 115 | // public List Operations 116 | // { 117 | // get 118 | // { 119 | // return ops; 120 | // } 121 | // set 122 | // { 123 | // ops = value; 124 | // } 125 | // } 126 | 127 | // public List AvailableAttributes 128 | // { 129 | // get 130 | // { 131 | // return availableAttribs; 132 | // } 133 | // set 134 | // { 135 | // availableAttribs = value; 136 | // } 137 | // } 138 | 139 | // public List ReportAttributes 140 | // { 141 | // get 142 | // { 143 | // return reportAttribs; 144 | // } 145 | // set 146 | // { 147 | // reportAttribs = value; 148 | // } 149 | // } 150 | 151 | // public BindingList AttributeFilters 152 | // { 153 | // get 154 | // { 155 | // return attribFilters; 156 | // } 157 | // set 158 | // { 159 | // attribFilters = value; 160 | // } 161 | // } 162 | 163 | // public FilterLevel Level 164 | // { 165 | // get 166 | // { 167 | // return lev; 168 | // } 169 | // set 170 | // { 171 | // lev = value; 172 | // } 173 | // } 174 | 175 | // public void Clear() 176 | // { 177 | // //filterState = null; 178 | // ObjectTypes.Clear(); 179 | // ops.Clear(); 180 | // availableAttribs.Clear(); 181 | // reportAttribs.Clear(); 182 | // attribFilters.Clear(); 183 | // lev = new FilterLevel(); 184 | // } 185 | // } 186 | 187 | // //implements interfaces for binding list and DataGrig control 188 | // class FilterAttribute : INotifyPropertyChanged, IEquatable 189 | // { 190 | // private string attrib; 191 | // private string comparator; 192 | // private string val; 193 | 194 | // //required for binding list and DataGrid control 195 | // public event PropertyChangedEventHandler PropertyChanged; 196 | 197 | 198 | // public FilterAttribute(string attribute, string operation, string value) 199 | // { 200 | // attrib = attribute; 201 | // comparator = operation; 202 | // val = value; 203 | // this.NotifyPropertyChanged(attribute); 204 | // } 205 | 206 | // public string Attribute 207 | // { 208 | // get 209 | // { 210 | // return attrib; 211 | // } 212 | // } 213 | 214 | // public string Operation 215 | // { 216 | // get 217 | // { 218 | // return comparator; 219 | // } 220 | // } 221 | 222 | // public string Value 223 | // { 224 | // get 225 | // { 226 | // return val; 227 | // } 228 | // } 229 | 230 | // public bool Equals(FilterAttribute other) 231 | // { 232 | // return this.Attribute == other.Attribute && this.Value == other.Value && this.Operation == other.Operation; 233 | // } 234 | 235 | // //required for binding list and DataGrid control 236 | // private void NotifyPropertyChanged(string name) 237 | // { 238 | // if (PropertyChanged != null) 239 | // { 240 | // PropertyChanged(this, new PropertyChangedEventArgs(name)); 241 | // } 242 | // } 243 | // } 244 | 245 | // static class ExceptionHandler 246 | // { 247 | // private static string getErrorMessage(Exception ex, int depth) 248 | // { 249 | // string erMsg = "\r\n\r\n"; 250 | // if (depth > 0) 251 | // { 252 | // erMsg += "****Inner Exception****\r\n"; 253 | // } 254 | // if (depth < 10) 255 | // { 256 | // if (ex.Message != string.Empty) 257 | // { 258 | // erMsg += "Exception message:\r\n" + ex.Message; 259 | // } 260 | // erMsg += "\r\n\r\nException Type: " + ex.GetType().ToString(); 261 | // if (ex.StackTrace != null) 262 | // { 263 | // erMsg += "\r\n\r\nStack trace:\r\n" + ex.StackTrace; 264 | // } 265 | // if (ex.InnerException != null) 266 | // { 267 | // erMsg += getErrorMessage(ex.InnerException, ++depth); 268 | // } 269 | // } 270 | // else 271 | // { 272 | // erMsg = "\r\n\r\n######## More than 10 exceptions. Too many to display.########"; 273 | // } 274 | // return erMsg; 275 | // } 276 | 277 | // public static void handleException(Exception ex, string bannerMsg) 278 | // { 279 | // string errorInfo = getErrorMessage(ex, 0); 280 | // frmError errorForm = new frmError(bannerMsg, errorInfo); 281 | // errorForm.ShowDialog(); 282 | // errorForm.Dispose(); 283 | // } 284 | // } 285 | 286 | // public delegate void LoadCompletedEventHandler(object sender, EventArgs e); 287 | 288 | // class CustomConcurrentBag : ConcurrentBag 289 | // { 290 | // private bool loadingComplete; 291 | // public event LoadCompletedEventHandler FinishedLoading; 292 | 293 | // public bool LoadingComplete 294 | // { 295 | // get 296 | // { 297 | // return loadingComplete; 298 | // } 299 | // set 300 | // { 301 | // loadingComplete = value; 302 | // if (this.FinishedLoading != null) 303 | // { 304 | // FinishedLoading(this, EventArgs.Empty); 305 | // } 306 | // } 307 | // } 308 | // } 309 | 310 | // class StringContainer 311 | // { 312 | // private List list; 313 | // //private ReaderWriterLockSlim sLock; 314 | 315 | // public StringContainer(int capacity) 316 | // { 317 | // list = new List(capacity); 318 | // list.Add(""); 319 | // } 320 | 321 | // public int Add(string item) 322 | // { 323 | // if (!list.Contains(item)) 324 | // { 325 | // list.Add(item); 326 | // } 327 | // return list.IndexOf(item); 328 | // } 329 | // public string this[int index] 330 | // { 331 | // get 332 | // { 333 | // return list[index]; 334 | // } 335 | // } 336 | // public int Capacity 337 | // { 338 | // get 339 | // { 340 | // return list.Capacity; 341 | // } 342 | // } 343 | // public void Clear() 344 | // { 345 | // list.Clear(); 346 | // } 347 | // public int Count 348 | // { 349 | // get 350 | // { 351 | // return list.Count; 352 | // } 353 | // } 354 | // public void TrimExcess() 355 | // { 356 | // list.TrimExcess(); 357 | // } 358 | // } 359 | //} 360 | -------------------------------------------------------------------------------- /Helper Classes/HelperClasses4.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | using System; 26 | using System.Collections.Generic; 27 | using System.Collections.Concurrent; 28 | using System.ComponentModel; 29 | using System.IO; 30 | using System.Text; 31 | using System.Threading; 32 | using System.Xml; 33 | 34 | 35 | 36 | namespace csReporter 37 | { 38 | public enum reportType { HTML, CSV, Excel }; 39 | 40 | public enum operation { none, add, replace, update, delete, deleteAdd }; 41 | 42 | public enum State { UnappliedExport, EscrowedExport, UnconfirmedExport, PendingImport, Synchronized }; 43 | 44 | public enum FilterLevel { State, ObjectType, Operation, AttributeValue }; 45 | 46 | class FilterObject 47 | { 48 | State filterState; 49 | List objTypes = new List(); 50 | List ops = new List(); 51 | List availableAttribs = new List(); 52 | BindingList attribFilters = new BindingList(); 53 | private FilterLevel lev; 54 | 55 | public FilterObject() 56 | { } 57 | public FilterObject(State FilterState, FilterLevel level) 58 | { 59 | filterState = FilterState; 60 | lev = level; 61 | } 62 | public FilterObject(State FilterState, FilterLevel level, List objectTypes) 63 | { 64 | filterState = FilterState; 65 | lev = level; 66 | objTypes = objectTypes; 67 | } 68 | public FilterObject(State FilterState, FilterLevel level, List objectTypes, List operations) 69 | { 70 | filterState = FilterState; 71 | lev = level; 72 | objTypes = objectTypes; 73 | ops = operations; 74 | } 75 | public FilterObject(State FilterState, FilterLevel level, List objectTypes, List operations, List attributes) 76 | { 77 | filterState = FilterState; 78 | lev = level; 79 | objTypes = objectTypes; 80 | ops = operations; 81 | availableAttribs = attributes; 82 | } 83 | public FilterObject(State FilterState, FilterLevel level, List objectTypes, List operations, List attributes, BindingList filters) 84 | { 85 | filterState = FilterState; 86 | lev = level; 87 | objTypes = objectTypes; 88 | ops = operations; 89 | availableAttribs = attributes; 90 | attribFilters = filters; 91 | } 92 | 93 | public State FilterState 94 | { 95 | get 96 | { 97 | return filterState; 98 | } 99 | set 100 | { 101 | filterState = value; 102 | } 103 | } 104 | 105 | public List ObjectTypes 106 | { 107 | get 108 | { 109 | return objTypes; 110 | } 111 | set 112 | { 113 | objTypes = value; 114 | } 115 | } 116 | 117 | public List Operations 118 | { 119 | get 120 | { 121 | return ops; 122 | } 123 | set 124 | { 125 | ops = value; 126 | } 127 | } 128 | 129 | public List AvailableAttributes 130 | { 131 | get 132 | { 133 | return availableAttribs; 134 | } 135 | set 136 | { 137 | availableAttribs = value; 138 | } 139 | } 140 | 141 | public BindingList AttributeFilters 142 | { 143 | get 144 | { 145 | return attribFilters; 146 | } 147 | set 148 | { 149 | attribFilters = value; 150 | } 151 | } 152 | 153 | public FilterLevel Level 154 | { 155 | get 156 | { 157 | return lev; 158 | } 159 | set 160 | { 161 | lev = value; 162 | } 163 | } 164 | 165 | public void Clear() 166 | { 167 | ObjectTypes.Clear(); 168 | ops.Clear(); 169 | availableAttribs.Clear(); 170 | attribFilters.Clear(); 171 | lev = new FilterLevel(); 172 | } 173 | } 174 | 175 | class ReportObject 176 | { 177 | reportType type; 178 | List reportAttribs = new List(); 179 | bool horizontal = true; 180 | int fSize = 10; 181 | bool includeFilter = true; 182 | bool mvFullList = true; 183 | 184 | public ReportObject() 185 | { } 186 | 187 | public ReportObject(reportType reportType, List attributes) 188 | { 189 | type = reportType; 190 | reportAttribs = attributes; 191 | horizontal = true; 192 | } 193 | 194 | public ReportObject(reportType reportType, List attributes, bool horizontal) 195 | { 196 | type = reportType; 197 | reportAttribs = attributes; 198 | this.horizontal = horizontal; 199 | } 200 | 201 | public reportType ReportType 202 | { 203 | get 204 | { 205 | return type; 206 | } 207 | set 208 | { 209 | type = value; 210 | } 211 | } 212 | 213 | public List ReportAttributes 214 | { 215 | get 216 | { 217 | return reportAttribs; 218 | } 219 | set 220 | { 221 | reportAttribs = value; 222 | } 223 | } 224 | public bool Horizontal 225 | { 226 | get 227 | { 228 | return horizontal; 229 | } 230 | set 231 | { 232 | horizontal = value; 233 | } 234 | } 235 | 236 | public int FontSize 237 | { 238 | get 239 | { 240 | return fSize; 241 | } 242 | set 243 | { 244 | fSize = value; 245 | } 246 | } 247 | 248 | public bool IncludeFilter 249 | { 250 | get 251 | { 252 | return includeFilter; 253 | } 254 | set 255 | { 256 | includeFilter = value; 257 | } 258 | } 259 | 260 | public bool MvFullList 261 | { 262 | get 263 | { 264 | return mvFullList; 265 | } 266 | set 267 | { 268 | mvFullList = value; 269 | } 270 | } 271 | } 272 | //implements interfaces for binding list and DataGrig control 273 | class FilterAttribute : INotifyPropertyChanged, IEquatable 274 | { 275 | private string attrib; 276 | private string comparator; 277 | private string val; 278 | 279 | //required for binding list and DataGrid control 280 | public event PropertyChangedEventHandler PropertyChanged; 281 | 282 | 283 | public FilterAttribute(string attribute, string operation, string value) 284 | { 285 | attrib = attribute; 286 | comparator = operation; 287 | val = value; 288 | this.NotifyPropertyChanged(attribute); 289 | } 290 | 291 | public string Attribute 292 | { 293 | get 294 | { 295 | return attrib; 296 | } 297 | } 298 | 299 | public string Operation 300 | { 301 | get 302 | { 303 | return comparator; 304 | } 305 | } 306 | 307 | public string Value 308 | { 309 | get 310 | { 311 | return val; 312 | } 313 | } 314 | 315 | public bool Equals(FilterAttribute other) 316 | { 317 | return this.Attribute == other.Attribute && this.Value == other.Value && this.Operation == other.Operation; 318 | } 319 | 320 | //required for binding list and DataGrid control 321 | private void NotifyPropertyChanged(string name) 322 | { 323 | if (PropertyChanged != null) 324 | { 325 | PropertyChanged(this, new PropertyChangedEventArgs(name)); 326 | } 327 | } 328 | } 329 | 330 | static class ExceptionHandler 331 | { 332 | private static string getErrorMessage(Exception ex, int depth) 333 | { 334 | string erMsg = "\r\n\r\n"; 335 | if (depth > 0) 336 | { 337 | erMsg += "****Inner Exception****\r\n"; 338 | } 339 | if (depth < 10) 340 | { 341 | if (ex.Message != string.Empty) 342 | { 343 | erMsg += "Exception message:\r\n" + ex.Message; 344 | } 345 | erMsg += "\r\n\r\nException Type: " + ex.GetType().ToString(); 346 | if (ex.StackTrace != null) 347 | { 348 | erMsg += "\r\n\r\nStack trace:\r\n" + ex.StackTrace; 349 | } 350 | if (ex.InnerException != null) 351 | { 352 | erMsg += getErrorMessage(ex.InnerException, ++depth); 353 | } 354 | } 355 | else 356 | { 357 | erMsg = "\r\n\r\n######## More than 10 exceptions. Too many to display.########"; 358 | } 359 | return erMsg; 360 | } 361 | 362 | public static void handleException(Exception ex, string bannerMsg) 363 | { 364 | string errorInfo = ""; 365 | if (ex != null) 366 | { 367 | errorInfo = getErrorMessage(ex, 0); 368 | } 369 | frmError errorForm = new frmError(bannerMsg, errorInfo); 370 | errorForm.ShowDialog(); 371 | } 372 | public static void handleException(string bannerMsg) 373 | { 374 | frmError errorForm = new frmError(bannerMsg, ""); 375 | errorForm.ShowDialog(); 376 | } 377 | } 378 | 379 | public delegate void LoadCompletedEventHandler(object sender, EventArgs e); 380 | 381 | class CustomConcurrentBag : ConcurrentBag 382 | { 383 | private bool loadingComplete; 384 | public event LoadCompletedEventHandler FinishedLoading; 385 | 386 | public bool LoadingComplete 387 | { 388 | get 389 | { 390 | return loadingComplete; 391 | } 392 | set 393 | { 394 | loadingComplete = value; 395 | if (this.FinishedLoading != null) 396 | { 397 | FinishedLoading(this, EventArgs.Empty); 398 | } 399 | } 400 | } 401 | } 402 | 403 | class StringContainer 404 | { 405 | private List list; 406 | private bool lowMem; 407 | 408 | public StringContainer(int capacity, bool lowMemory) 409 | { 410 | list = new List(capacity); 411 | list.Add(""); 412 | lowMem = lowMemory; 413 | } 414 | 415 | public int Add(string item) 416 | { 417 | switch (lowMem) 418 | { 419 | case true: 420 | list.Add(item); 421 | return list.Count - 1; 422 | case false: 423 | int i = list.IndexOf(item); 424 | if (i == -1) 425 | { 426 | list.Add(item); 427 | return list.Count - 1; 428 | } 429 | else 430 | { 431 | return i; 432 | } 433 | } 434 | return list.IndexOf(item); 435 | } 436 | public string this[int index] 437 | { 438 | get 439 | { 440 | return list[index]; 441 | } 442 | } 443 | public int Capacity 444 | { 445 | get 446 | { 447 | return list.Capacity; 448 | } 449 | } 450 | public void Clear() 451 | { 452 | list.Clear(); 453 | } 454 | public int Count 455 | { 456 | get 457 | { 458 | return list.Count; 459 | } 460 | } 461 | public void TrimExcess() 462 | { 463 | list.TrimExcess(); 464 | } 465 | } 466 | } -------------------------------------------------------------------------------- /Icon/csr.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/Icon/csr.ico -------------------------------------------------------------------------------- /Icon/csrLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/Icon/csrLogo.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 David Cassady 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) 2017 David Cassady 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | using System; 26 | using System.IO; 27 | using System.Windows.Forms; 28 | using System.Reflection; 29 | 30 | namespace csReporter 31 | { 32 | static class Program 33 | { 34 | /// 35 | /// The main entry point for the application. 36 | /// 37 | [STAThread] 38 | static void Main() 39 | { 40 | AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ResolveExcel); 41 | Application.EnableVisualStyles(); 42 | Application.SetCompatibleTextRenderingDefault(false); 43 | Application.Run(new frmGetData()); 44 | } 45 | static Assembly ResolveExcel(object sender, ResolveEventArgs args) 46 | { 47 | Assembly executingAssembly = Assembly.GetExecutingAssembly(); 48 | using (Stream stream = executingAssembly.GetManifestResourceStream("csReporter.Excel.DocumentFormat.OpenXml.dll")) 49 | { 50 | if (stream == null) 51 | throw new ArgumentException("Embedded assembly not found: DocumentFormat.OpenXml.dll"); 52 | byte[] assemblyRawBytes = new byte[stream.Length]; 53 | stream.Read(assemblyRawBytes, 0, assemblyRawBytes.Length); 54 | return Assembly.Load(assemblyRawBytes); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("csReporter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Connector Space Reporter")] 13 | [assembly: AssemblyCopyright("Copyright © David Cassady 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2ad10d00-b539-4f91-bd69-906ddd41d0c0")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("5.0")] 37 | -------------------------------------------------------------------------------- /Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace csReporter.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("csReporter.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace csReporter.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Connector Space reporting tool for MIIS/ILM/FIM/MIM/Azure AD Connect 2 | 3 | ## About 4 | This is a Visual Studio C# project that provides a GUI for filtering and reporting on data within XML files generated using the csexport.exe utility that is included with MIM/Azure AD Connect. Reports can be made in HTML (quick and dirty HTML table), CSV, and Excel. 5 | 6 | Although not required, it is capable of executing csexport.exe on your behalf if ran on the server where MIM Sync/Azure AD Connect is installed. It uses Registry Keys to determine the install location in order to locate csexport.exe. 7 | 8 | **NOTE: csexport.exe is included with Azure AD Connect.** 9 | 10 | ## Recent Updates 11 | 12 | **\~\~Import Error Support\~\~** 13 | 14 | # How-Tos 15 | 16 | ## Create connector space file 17 | The connector space file is created using the csexport.exe command-line tool included with the Sync Engine installation. It is typically located in the 'Synchronization Service\Bin' directory under the installation folder. Azure AD Connect uses a different path. 18 | 19 | **Manually create connector space file** 20 | 21 | Official documentation for the csexport tool can be found at . Simple usage examples can be seen by clicking on the 'csexport examples' button as shown below. 22 | 23 | ![](images/GetDataExamples.png) 24 | ![](images/Examples.png) 25 | 26 | **Automatically generate connector space file** 27 | 28 | **NOTE:** This requires the CSReporter tool to be run on the server where the Sync Engine is installed. This is detected by using Registry Keys to determine the install location in order to locate csexport.exe. 29 | 30 | Select the 'Generate file' option and the name of the management agent to report on from the drop down menu. In the Data Selection, pick the type of data to include in the export file. Click 'Generate File' to pick the name\location of the connector space file and launch the csexport.exe tool. 31 | 32 | ![](images/GetData_2.png) 33 | ![](images/csexport.png) 34 | 35 | ## Filtering 36 | 37 | **Filtering works from left (Hologram selection) to right (Attribute value matching).** Once a file has been selected and parsed, the Filter screen will be shown. 38 | 39 | ![](images/Filter.png) 40 | 41 | From here select the name of a Hologram and see the 'Object Types' box dynamically display the available types. Also notice the 'Matching Count' in the bottom left of the screen is updated with the number of objects with the selected hologram. 42 | 43 | Once a Hologram is selected, all available filtering options to the right (Object Types, Operations, Attributes) are dynamically updated. In order for a filtering option to become available, all filtering options to the left must be selected. For example, the Attributes drop-down isn't populated until Hologram, Object Types, Operations are selected. Similarly, the Operations box is empty until both Hologram and Object Types are selected. 44 | 45 | **NOTE:** The Operations box will not be populated when the Synchronized hologram is selected. Only the Hologram and Object Types options are required for the Attributes drop down to be populated. 46 | 47 | ![](images/Filter_3.png) 48 | 49 | ## Reporting 50 | 51 | Reports can be generated by clicking on the 'Create Report' button. The Report Settings screen will appear with options for the type of report to generate. Select the attributes to include in the report and the report type. Click OK to select name\path of the report. 52 | 53 | ![](images/ReportSettings.png) 54 | 55 | Report Types 56 | - HTML - Quick and dirty table. Browsers may hang on large reports 57 | 58 | ![](images/HTML.png) 59 | 60 | - CSV - Standard comma delemited file made for importing into Excel where additional filtering can be completed 61 | 62 | ![](images/CSV.png) 63 | 64 | - Excel - Native Excel file that allows for additional filtering 65 | - Horizontal - A CSV\table-like layout with attributes listed across the top from left to right. 66 | 67 | ![](images/ExcelReport.png) 68 | 69 | - Vertical - Similar to the HTML table, attributes are listed underneath each anchor from top to bottom 70 | 71 | ![](images/ExcelVertical.png) 72 | 73 | ## Advanced Features 74 | 75 | **Contains Active Directory data** 76 | 77 | This checkbox can be used when the data comes from an Active Directory Management Agent. It will translate the below AD values into human readable data. **This can be used for both filtering and reports** 78 | 79 | Examples: 80 | 81 | - accountExpires 82 | - 9223372036854775807 to Never 83 | - 130772599557135907 to 2015-05-28 4:12:00 (yyyy-MM-dd HH:mm:ss) 84 | - objectSid 85 | - AQUAAAAAAAUVAAAApDhY7yZmbpJEbWYeigQAAA== to S-1-5-21-4015536292-2456708646-510029124-1162 86 | - pwdLastSet 87 | - 130772599557135907 to 2015-05-28 4:12:00 (yyyy-MM-dd HH:mm:ss) 88 | - createTimeStamp 89 | - 20010928060000.0Z to 2001-9-28 6:00:00 (yyyy-MM-dd HH:mm:ss) 90 | - **All integer data types are converted by default** 91 | - ~~groupType~~ 92 | - ~~0xffffffff80000002 to -2147483646~~ 93 | - ~~userAccountControl~~ 94 | - ~~0x200 to 512~~ 95 | 96 | The below pictures show filtering on the userAccountControl attribute and how the 'Contains Active Directory data' checkbox can be used when filtering. 97 | 98 | ![](images/ADData.png) 99 | ![](images/ADData_2.png) 100 | 101 | **Filter on non-changing attributes** 102 | 103 | The purpose of this is to allow reporting of changes by using an Attribute filter based on Synchronized values. For example, finding all users with pending import\export changes where a specific Department value is not changing (i.e. exists only in Sync hologram). 104 | **NOTE: As the warning states, any filters applied at the Attribute level will be applied ONLY to Attributes in the Sync hologram.** 105 | 106 | ![](images/Warning.png) 107 | 108 | **Include system attributes** 109 | 110 | This allows filtering on object meta-data present in the connector space file such as Connector State. 111 | 112 | Current supported system attributes 113 | - DN (when not changing) 114 | - Connector State 115 | - Disconnect Time 116 | - Connector Operation 117 | - Connect Time 118 | - Connector 119 | - Export Error Details 120 | 121 | ![](images/SystemAttributes.png) 122 | 123 | **Note:** The connector space file must contain this meta-data. If the csexport option /o is used, it will be excluded. When generating files using CSReporter, the System Data box must be checked on the Get Data form. 124 | **NOTE:** Generating a connector space file with this additional data will be much slower as much more data is written to the XML file. 125 | 126 | ![](images/GetData_3.png) 127 | 128 | ## Large Files 129 | Connector space files generated with csexport will vary in size greating depending on the environment. I have generated files over 5GB in size (and generated reports using CSReporter). In the countless hours of development and usage of CSReporter, generally the amount of memory (RAM) required is around 3x the size of the connector space file on disk. This means that a 300MB file could require upwards of 900MB of available memory. Not all systems have this much unused for CSReporter to run. Thus for files larger than **300MB**, CSReporter does not keep an in-memory representation of the connector space file. 130 | 131 | **For files larger than 300MB, each time the filter is adjusted, the file is parsed line by line from disk.** 132 | 133 | This allows for CSReporter to support large files, without the need for large amounts of memory. It allows for CSReporter to be used in more environments, such as Production, without creating memory issues. 134 | 135 | **Checkbox has been added to force data to be stored in memory** 136 | 137 | When checked, the below warning will appearing to inform and confirm checkbox selection. 138 | 139 | ![](images/MemWarning.png) 140 | -------------------------------------------------------------------------------- /app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /bin/Debug/csReporter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Debug/csReporter.exe -------------------------------------------------------------------------------- /bin/Debug/csReporter.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Debug/csReporter.pdb -------------------------------------------------------------------------------- /bin/Debug/csReporter.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Debug/csReporter.vshost.exe -------------------------------------------------------------------------------- /bin/Debug/csReporter.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bin/Debug/csReporter_net4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Debug/csReporter_net4.exe -------------------------------------------------------------------------------- /bin/Debug/csReporter_net4.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Debug/csReporter_net4.pdb -------------------------------------------------------------------------------- /bin/Release/csReporter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Release/csReporter.exe -------------------------------------------------------------------------------- /bin/Release/csReporter.instr.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Release/csReporter.instr.pdb -------------------------------------------------------------------------------- /bin/Release/csReporter.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Release/csReporter.pdb -------------------------------------------------------------------------------- /bin/Release/csReporter.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Release/csReporter.vshost.exe -------------------------------------------------------------------------------- /bin/Release/csReporter_net4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Release/csReporter_net4.exe -------------------------------------------------------------------------------- /bin/Release/csReporter_net4.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/bin/Release/csReporter_net4.pdb -------------------------------------------------------------------------------- /csReporter.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1ED3B448-5BB8-4ADF-9878-C8B8A3F3659D} 8 | WinExe 9 | Properties 10 | csReporter 11 | csReporter 12 | v4.5.1 13 | 512 14 | false 15 | 16 | publish\ 17 | true 18 | Disk 19 | false 20 | Foreground 21 | 7 22 | Days 23 | false 24 | false 25 | true 26 | 0 27 | 1.0.0.%2a 28 | false 29 | true 30 | 31 | 32 | AnyCPU 33 | true 34 | full 35 | false 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | false 41 | 42 | 43 | AnyCPU 44 | pdbonly 45 | true 46 | bin\Release\ 47 | TRACE 48 | prompt 49 | 4 50 | false 51 | 52 | 53 | Icon\csr.ico 54 | 55 | 56 | 57 | False 58 | Excel\DocumentFormat.OpenXml.dll 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | Form 80 | 81 | 82 | frmCSExamples.cs 83 | 84 | 85 | Form 86 | 87 | 88 | frmError.cs 89 | 90 | 91 | Form 92 | 93 | 94 | frmFilter.cs 95 | 96 | 97 | Form 98 | 99 | 100 | FrmFilterDate.cs 101 | 102 | 103 | Form 104 | 105 | 106 | frmProgressBar.cs 107 | 108 | 109 | Form 110 | 111 | 112 | frmGetData.cs 113 | 114 | 115 | Form 116 | 117 | 118 | frmReport.cs 119 | 120 | 121 | Form 122 | 123 | 124 | frmOpenReport.cs 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | frmCSExamples.cs 133 | Designer 134 | 135 | 136 | frmError.cs 137 | 138 | 139 | frmFilter.cs 140 | 141 | 142 | FrmFilterDate.cs 143 | 144 | 145 | frmProgressBar.cs 146 | 147 | 148 | frmGetData.cs 149 | 150 | 151 | frmReport.cs 152 | 153 | 154 | frmOpenReport.cs 155 | 156 | 157 | ResXFileCodeGenerator 158 | Resources.Designer.cs 159 | Designer 160 | 161 | 162 | True 163 | Resources.resx 164 | True 165 | 166 | 167 | 168 | SettingsSingleFileGenerator 169 | Settings.Designer.cs 170 | 171 | 172 | True 173 | Settings.settings 174 | True 175 | 176 | 177 | 178 | 179 | False 180 | Microsoft .NET Framework 4 %28x86 and x64%29 181 | true 182 | 183 | 184 | False 185 | .NET Framework 3.5 SP1 Client Profile 186 | false 187 | 188 | 189 | False 190 | .NET Framework 3.5 SP1 191 | false 192 | 193 | 194 | False 195 | Windows Installer 4.5 196 | true 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 216 | -------------------------------------------------------------------------------- /csReporter.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | publish\ 5 | 6 | 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | -------------------------------------------------------------------------------- /csReporter.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.32014.148 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csReporter", "csReporter.csproj", "{1ED3B448-5BB8-4ADF-9878-C8B8A3F3659D}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{71E9AABC-8754-4F2F-8250-72B65B1FEEDC}" 9 | ProjectSection(SolutionItems) = preProject 10 | csr.ico = csr.ico 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {1ED3B448-5BB8-4ADF-9878-C8B8A3F3659D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {1ED3B448-5BB8-4ADF-9878-C8B8A3F3659D}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {1ED3B448-5BB8-4ADF-9878-C8B8A3F3659D}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {1ED3B448-5BB8-4ADF-9878-C8B8A3F3659D}.Release|Any CPU.Build.0 = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(SolutionProperties) = preSolution 25 | HideSolutionNode = FALSE 26 | EndGlobalSection 27 | GlobalSection(ExtensibilityGlobals) = postSolution 28 | SolutionGuid = {A1786480-9D55-4EAB-8B6E-7AF63F8911EB} 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /csReporter.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/csReporter.v11.suo -------------------------------------------------------------------------------- /frmOpenReport.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace csReporter 2 | { 3 | partial class frmOpenReport 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.lblOpenReport = new System.Windows.Forms.Label(); 32 | this.btnOpenReport = new System.Windows.Forms.Button(); 33 | this.btnOpenReportFolder = new System.Windows.Forms.Button(); 34 | this.btnCancel = new System.Windows.Forms.Button(); 35 | this.SuspendLayout(); 36 | // 37 | // lblOpenReport 38 | // 39 | this.lblOpenReport.AutoSize = true; 40 | this.lblOpenReport.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F); 41 | this.lblOpenReport.Location = new System.Drawing.Point(25, 18); 42 | this.lblOpenReport.Name = "lblOpenReport"; 43 | this.lblOpenReport.Size = new System.Drawing.Size(364, 18); 44 | this.lblOpenReport.TabIndex = 0; 45 | this.lblOpenReport.Text = "Would you like to open the report or containing folder?"; 46 | // 47 | // btnOpenReport 48 | // 49 | this.btnOpenReport.Location = new System.Drawing.Point(28, 52); 50 | this.btnOpenReport.Margin = new System.Windows.Forms.Padding(4); 51 | this.btnOpenReport.Name = "btnOpenReport"; 52 | this.btnOpenReport.Size = new System.Drawing.Size(94, 35); 53 | this.btnOpenReport.TabIndex = 13; 54 | this.btnOpenReport.Text = "Open Report"; 55 | this.btnOpenReport.UseVisualStyleBackColor = true; 56 | this.btnOpenReport.Click += new System.EventHandler(this.btnOpenReport_Click); 57 | // 58 | // btnOpenReportFolder 59 | // 60 | this.btnOpenReportFolder.Location = new System.Drawing.Point(159, 52); 61 | this.btnOpenReportFolder.Margin = new System.Windows.Forms.Padding(4); 62 | this.btnOpenReportFolder.Name = "btnOpenReportFolder"; 63 | this.btnOpenReportFolder.Size = new System.Drawing.Size(108, 35); 64 | this.btnOpenReportFolder.TabIndex = 14; 65 | this.btnOpenReportFolder.Text = "Open Report Folder"; 66 | this.btnOpenReportFolder.UseVisualStyleBackColor = true; 67 | this.btnOpenReportFolder.Click += new System.EventHandler(this.btnOpenReportFolder_Click); 68 | // 69 | // btnCancel 70 | // 71 | this.btnCancel.Location = new System.Drawing.Point(316, 52); 72 | this.btnCancel.Margin = new System.Windows.Forms.Padding(4); 73 | this.btnCancel.Name = "btnCancel"; 74 | this.btnCancel.Size = new System.Drawing.Size(73, 35); 75 | this.btnCancel.TabIndex = 15; 76 | this.btnCancel.Text = "Cancel"; 77 | this.btnCancel.UseVisualStyleBackColor = true; 78 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 79 | // 80 | // frmOpenReport 81 | // 82 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 83 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 84 | this.ClientSize = new System.Drawing.Size(411, 102); 85 | this.Controls.Add(this.btnCancel); 86 | this.Controls.Add(this.btnOpenReportFolder); 87 | this.Controls.Add(this.btnOpenReport); 88 | this.Controls.Add(this.lblOpenReport); 89 | this.Name = "frmOpenReport"; 90 | this.Text = "frmOpenReport"; 91 | this.ResumeLayout(false); 92 | this.PerformLayout(); 93 | 94 | } 95 | 96 | #endregion 97 | 98 | private System.Windows.Forms.Label lblOpenReport; 99 | private System.Windows.Forms.Button btnOpenReport; 100 | private System.Windows.Forms.Button btnOpenReportFolder; 101 | private System.Windows.Forms.Button btnCancel; 102 | } 103 | } -------------------------------------------------------------------------------- /frmOpenReport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace csReporter 12 | { 13 | public partial class frmOpenReport : Form 14 | { 15 | public frmOpenReport() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void btnOpenReport_Click(object sender, EventArgs e) 21 | { 22 | this.DialogResult = DialogResult.Yes; 23 | } 24 | 25 | private void btnOpenReportFolder_Click(object sender, EventArgs e) 26 | { 27 | this.DialogResult = DialogResult.OK; 28 | } 29 | 30 | private void btnCancel_Click(object sender, EventArgs e) 31 | { 32 | this.DialogResult = DialogResult.Cancel; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /frmOpenReport.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /images/ADData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/ADData.png -------------------------------------------------------------------------------- /images/ADData_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/ADData_2.png -------------------------------------------------------------------------------- /images/CSV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/CSV.png -------------------------------------------------------------------------------- /images/Examples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/Examples.png -------------------------------------------------------------------------------- /images/ExcelReport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/ExcelReport.png -------------------------------------------------------------------------------- /images/ExcelReport_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/ExcelReport_2.png -------------------------------------------------------------------------------- /images/ExcelVertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/ExcelVertical.png -------------------------------------------------------------------------------- /images/Filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/Filter.png -------------------------------------------------------------------------------- /images/Filter_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/Filter_2.png -------------------------------------------------------------------------------- /images/Filter_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/Filter_3.png -------------------------------------------------------------------------------- /images/GetData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/GetData.png -------------------------------------------------------------------------------- /images/GetDataExamples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/GetDataExamples.png -------------------------------------------------------------------------------- /images/GetData_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/GetData_2.png -------------------------------------------------------------------------------- /images/GetData_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/GetData_3.png -------------------------------------------------------------------------------- /images/HTML.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/HTML.png -------------------------------------------------------------------------------- /images/MemWarning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/MemWarning.png -------------------------------------------------------------------------------- /images/ReportSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/ReportSettings.png -------------------------------------------------------------------------------- /images/SystemAttributes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/SystemAttributes.png -------------------------------------------------------------------------------- /images/Warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/Warning.png -------------------------------------------------------------------------------- /images/csexport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/images/csexport.png -------------------------------------------------------------------------------- /obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /obj/Debug/csReporter.FrmFilterDate.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.FrmFilterDate.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.Properties.Resources.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | bb97337c1d1b235eaf098595a8409d6c9dc37ff2 2 | -------------------------------------------------------------------------------- /obj/Debug/csReporter.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /obj/Debug/csReporter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.exe -------------------------------------------------------------------------------- /obj/Debug/csReporter.frmCSExamples.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.frmCSExamples.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.frmError.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.frmError.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.frmFilter.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.frmFilter.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.frmGetData.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.frmGetData.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.frmProgressBar.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.frmProgressBar.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.frmReport.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.frmReport.resources -------------------------------------------------------------------------------- /obj/Debug/csReporter.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Debug/csReporter.pdb -------------------------------------------------------------------------------- /obj/Release/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /obj/Release/csReporter.FrmFilterDate.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.FrmFilterDate.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.Properties.Resources.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\bin\Release\csReporter.exe 2 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\bin\Release\csReporter.pdb 3 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.frmCSExamples.resources 4 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.frmError.resources 5 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.frmFilter.resources 6 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.FrmFilterDate.resources 7 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.frmProgressBar.resources 8 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.frmGetData.resources 9 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.frmReport.resources 10 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.Properties.Resources.resources 11 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.csproj.GenerateResource.Cache 12 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.exe 13 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\csReporter\obj\Release\csReporter.pdb 14 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.exe 15 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.pdb 16 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\bin\Release\csReporter.exe 17 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\bin\Release\csReporter.pdb 18 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.csprojResolveAssemblyReference.cache 19 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.frmCSExamples.resources 20 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.frmError.resources 21 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.frmFilter.resources 22 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.FrmFilterDate.resources 23 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.frmProgressBar.resources 24 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.frmGetData.resources 25 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.frmReport.resources 26 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.Properties.Resources.resources 27 | C:\Users\admdcassady\Documents\Visual Studio 2012\Projects\Source\Repos\csReporter\obj\Release\csReporter.csproj.GenerateResource.Cache 28 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.exe 29 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.pdb 30 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmCSExamples.resources 31 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmError.resources 32 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmFilter.resources 33 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.FrmFilterDate.resources 34 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmProgressBar.resources 35 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmGetData.resources 36 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmReport.resources 37 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.Properties.Resources.resources 38 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.GenerateResource.Cache 39 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.CoreCompileInputs.cache 40 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.exe 41 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.pdb 42 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csprojAssemblyReference.cache 43 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\bin\Release\DocumentFormat.OpenXml.dll 44 | E:\CassadyNAS\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.CopyComplete 45 | C:\Users\david\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.exe 46 | C:\Users\david\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.pdb 47 | C:\Users\david\OneDrive\csReporter\Source\csReporter\bin\Release\DocumentFormat.OpenXml.dll 48 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmCSExamples.resources 49 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmError.resources 50 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmFilter.resources 51 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.FrmFilterDate.resources 52 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmProgressBar.resources 53 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmGetData.resources 54 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmReport.resources 55 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.Properties.Resources.resources 56 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.GenerateResource.cache 57 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.CoreCompileInputs.cache 58 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.CopyComplete 59 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.exe 60 | C:\Users\david\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.pdb 61 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.exe 62 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.pdb 63 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\bin\Release\DocumentFormat.OpenXml.dll 64 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmCSExamples.resources 65 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmError.resources 66 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmFilter.resources 67 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.FrmFilterDate.resources 68 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmProgressBar.resources 69 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmGetData.resources 70 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.frmReport.resources 71 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.Properties.Resources.resources 72 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.GenerateResource.cache 73 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.CoreCompileInputs.cache 74 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.csproj.CopyComplete 75 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.exe 76 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\obj\Release\csReporter.pdb 77 | C:\Users\david\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.exe.config 78 | C:\Users\DavidC\OneDrive\csReporter\Source\csReporter\bin\Release\csReporter.exe.config 79 | C:\OCGCode\csReporter\bin\Release\csReporter.exe.config 80 | C:\OCGCode\csReporter\bin\Release\csReporter.exe 81 | C:\OCGCode\csReporter\bin\Release\csReporter.pdb 82 | C:\OCGCode\csReporter\bin\Release\DocumentFormat.OpenXml.dll 83 | C:\OCGCode\csReporter\obj\Release\csReporter.frmCSExamples.resources 84 | C:\OCGCode\csReporter\obj\Release\csReporter.frmError.resources 85 | C:\OCGCode\csReporter\obj\Release\csReporter.frmFilter.resources 86 | C:\OCGCode\csReporter\obj\Release\csReporter.FrmFilterDate.resources 87 | C:\OCGCode\csReporter\obj\Release\csReporter.frmProgressBar.resources 88 | C:\OCGCode\csReporter\obj\Release\csReporter.frmGetData.resources 89 | C:\OCGCode\csReporter\obj\Release\csReporter.frmReport.resources 90 | C:\OCGCode\csReporter\obj\Release\csReporter.Properties.Resources.resources 91 | C:\OCGCode\csReporter\obj\Release\csReporter.csproj.GenerateResource.cache 92 | C:\OCGCode\csReporter\obj\Release\csReporter.csproj.CoreCompileInputs.cache 93 | C:\OCGCode\csReporter\obj\Release\csReporter.csproj.CopyComplete 94 | C:\OCGCode\csReporter\obj\Release\csReporter.exe 95 | C:\OCGCode\csReporter\obj\Release\csReporter.pdb 96 | C:\OCGCode\csReporter\obj\Release\csReporter.frmOpenReport.resources 97 | C:\OCGCode\csReporter\obj\Release\csReporter.csprojAssemblyReference.cache 98 | -------------------------------------------------------------------------------- /obj/Release/csReporter.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /obj/Release/csReporter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.exe -------------------------------------------------------------------------------- /obj/Release/csReporter.frmCSExamples.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.frmCSExamples.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.frmError.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.frmError.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.frmFilter.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.frmFilter.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.frmGetData.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.frmGetData.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.frmProgressBar.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.frmProgressBar.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.frmReport.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.frmReport.resources -------------------------------------------------------------------------------- /obj/Release/csReporter.instr.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.instr.pdb -------------------------------------------------------------------------------- /obj/Release/csReporter.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIMTooler/csReporter/ffd5f7d40343cc9a681c91251496c0425fd629d7/obj/Release/csReporter.pdb --------------------------------------------------------------------------------