[{"data":1,"prerenderedAt":1047},["ShallowReactive",2],{"article-telerik-reporting-and-really-impressive":3},{"article":4,"tags":62,"previous":77,"next":840},{"id":5,"title":6,"author":7,"body":8,"createdAt":51,"description":52,"extension":53,"img":44,"meta":54,"navigation":55,"path":56,"seo":57,"stem":58,"tags":59,"updatedAt":51,"__hash__":61},"articles\u002Farticles\u002Ftelerik-reporting-and-really-impressive.md","Telerik Reporting and Really Impressive","[object Object]",{"type":9,"value":10,"toc":47},"minimark",[11,15,18,21,24,33],[12,13,14],"p",{},"My experience with the relatively new Telerik reporting solution has been very positive.  In order to create a report you simply need a 3 dll’s within your solution and a data source.    The data source can be ANY ADO.NET data source as well as business objects, XML, Web Services etc. ",[12,16,17],{},"As the data source can be any ADO.NET source the reporting solution works against SQL Server, MySQL, Oracle, Access, OLE DB etc.  I have been a big fan of SQL Reporting Services for quite a while (moving to SQL RS many years ago as I ran from Crystal Reports). ",[12,19,20],{},"Unlike SQL RS it is a very fast install on local development workstation and nothing on the server is required.  The product is licensed by developer making utilization by the enterprise not dependent on the number of users.  This really works out well in the Internet type environment.    I found the the designer (within Visual Studio) to be very fast and easier to use that SQL RS.  The drag and drop features and the visual clues are clearly superior than other reporting solutions I have used.",[12,22,23],{},"Telerik Reporting supports the most commonly used output formats out-of-the-box: PDF, Excel, RTF, CSV, MHTML, BMP, GIF, JPEG, PNG, TIFF and metafile (EMF).  The Telerik product certainly makes it easy to find the data source, connect within Visual Studio and drag and drop the fields onto the design surface.",[12,25,26,27],{},"More information can be found online at ",[28,29,32],"a",{"href":30,"target":31},"http:\u002F\u002Fwww.telerik.com\u002Fproducts\u002Freporting\u002Foverview.aspx","_blank","Telerik Reporting",[12,34,35],{},[28,36,38],{"href":37},"\u002Farticles\u002Fimages\u002Fimage_4.png",[39,40],"img",{"title":41,"style":42,"height":43,"alt":41,"src":44,"width":45,"border":46},"image","border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px",110,"\u002Farticles\u002Fimages\u002Fimage_thumb_1.png",244,0,{"title":48,"searchDepth":49,"depth":49,"links":50},"",2,[],"2017-05-29T20:59:15.8038514Z","Experience with Telerik Reporting","md",{},true,"\u002Farticles\u002Ftelerik-reporting-and-really-impressive",{"title":6,"description":52},"articles\u002Ftelerik-reporting-and-really-impressive",[60],"visualstudio","VnOxxF6UPPJZuAeC8AeVTJrgkQ8VbTy23tLzCccb3Vs",[63],{"id":64,"title":65,"body":66,"description":70,"extension":53,"img":71,"meta":72,"name":60,"navigation":55,"path":73,"seo":74,"stem":75,"__hash__":76},"tags\u002Ftags\u002Fvisualstudio.md","Visualstudio",{"type":9,"value":67,"toc":68},[],{"title":48,"searchDepth":49,"depth":49,"links":69},[],"Develop apps for Android, iOS, Mac, Windows, web, and cloud","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fvisualstudio",{"description":70},"tags\u002Fvisualstudio","glm3bYyBlAXGun4NJe-CV_iOzhszydeBRIpbGNNLeEk",{"id":78,"title":79,"author":7,"body":80,"createdAt":832,"description":84,"extension":53,"img":828,"meta":833,"navigation":55,"path":834,"seo":835,"stem":836,"tags":837,"updatedAt":832,"__hash__":839},"articles\u002Farticles\u002Fgeneric-collections-and-filtering.md","Generic Collections and Filtering",{"type":9,"value":81,"toc":830},[82,85,88,91,94,97,474,823,826],[12,83,84],{},"When dealing with collections the common question is how to filter them based on criteria. ",[12,86,87],{},"The following are a few techniques used to accomplish this.  A delegate is like a function pointer. ",[12,89,90],{},"A predicate is a method that returns true or false. ",[12,92,93],{},"In the case of List\u003CT> it is possible to pass it a delegate that is a function that returns true or false.",[12,95,96],{},"In the examples below I have base object a generic collection of those objects and am using the FindAll method to return only a few of the objects based on matching criteria.  There are a number of samples, just un-comment the ones of interest.   ",[98,99,101,102,107,108,111,112,116,117,119,120,107,123,126,127,116,129,131,132,136,137,140,141,107,144,146,147,116,149,131,151,136,153,140,156,107,159,161,162,116,164,131,166,136,169,140,172,175,176,179,180,183,184,187,188,107,191,199,200,107,203,199,206,107,209,199,212,107,215,199,218,107,221,199,224,187,227,107,230,199,233,107,236,199,239,187,242,107,245,199,248,107,251,199,254,107,257,199,260,187,263,107,266,199,271,107,274,277,278,280,281,116,283,131,286,288,289,292,293,296,297,187,300,187,303,107,306,199,311,107,314,199,317,107,320,199,323,107,326,329,187,332,187,335,107,338,199,343,107,346,199,352,107,355,199,358,107,361,199,364,107,367,199,370,107,373,199,376,107,379,199,382,107,385,199,388,107,391,199,394,107,397,199,400,107,403,199,406,187,409,107,412,199,415,107,418,199,423,107,426,199,429,107,432,199,435,107,438,199,441,107,444,199,447,107,450,199,453,107,456,199,459,107,462,199,464,107,467,199,469,107,472,116],"div",{"style":100},"font-size: 8pt; background: white; color: black; font-family: consolas","   ",[103,104,106],"span",{"style":105},"color: #2b91af","   23","             ",[103,109,110],{"style":105},"Persons"," personList = ",[103,113,115],{"style":114},"color: blue","new"," ",[103,118,110],{"style":105},"();    ",[103,121,122],{"style":105},"   24",[103,124,125],{"style":105},"Person"," p1 = ",[103,128,115],{"style":114},[103,130,125],{"style":105},"(",[103,133,135],{"style":134},"color: #a31515","\"Rose\"",", ",[103,138,139],{"style":134},"\"Bob\"",");    ",[103,142,143],{"style":105},"   25",[103,145,125],{"style":105}," p2 = ",[103,148,115],{"style":114},[103,150,125],{"style":105},[103,152,135],{"style":134},[103,154,155],{"style":134},"\"Phil\"",[103,157,158],{"style":105},"   26",[103,160,125],{"style":105}," p3 = ",[103,163,115],{"style":114},[103,165,125],{"style":105},[103,167,168],{"style":134},"\"Smith\"",[103,170,171],{"style":134},"\"Jack\"",[103,173,174],{"style":105},"   27","             personList.Add(p1);    ",[103,177,178],{"style":105},"   28","             personList.Add(p2);    ",[103,181,182],{"style":105},"   29","             personList.Add(p3);    ",[103,185,186],{"style":105},"   30","     ",[103,189,190],{"style":105},"   31",[103,192,194,195],{"style":193},"color: green","\u002F\u002F",[196,197,198],"strong",{},"Sample 1 Using Predicate Technique (long form)","    ",[103,201,202],{"style":105},"   32",[103,204,205],{"style":193},"\u002F\u002FPredicate\u003CPerson> filterByLastName;",[103,207,208],{"style":105},"   33",[103,210,211],{"style":193},"\u002F\u002FPersonFilter filter = new PersonFilter(\"Rose\");",[103,213,214],{"style":105},"   34",[103,216,217],{"style":193},"\u002F\u002FfilterByLastName = new Predicate\u003CPerson>(filter.FilterByLastName);",[103,219,220],{"style":105},"   35",[103,222,223],{"style":193},"\u002F\u002FList\u003CPerson> list = personList.FindAll(filterByLastName);",[103,225,226],{"style":105},"   36",[103,228,229],{"style":105},"   37",[103,231,232],{"style":193},"\u002F\u002FResponse.Write(\"Original Collection Count \" + personList.Count.ToString() + \"\u003Cbr \u002F>\");",[103,234,235],{"style":105},"   38",[103,237,238],{"style":193},"\u002F\u002FResponse.Write(\"Filtered List Count \" + list.Count.ToString() + \"\u003Cbr \u002F>\");",[103,240,241],{"style":105},"   39",[103,243,244],{"style":105},"   40",[103,246,247],{"style":193},"\u002F\u002F\u002F\u002F this is a shorter version and uses the RemoveAll method to items",[103,249,250],{"style":105},"   41",[103,252,253],{"style":193},"\u002F\u002FpersonList.RemoveAll(filterByLastName);",[103,255,256],{"style":105},"   42",[103,258,259],{"style":193},"\u002F\u002FResponse.Write(\"After persons removed from the collection Count \" + personList.Count.ToString());",[103,261,262],{"style":105},"   43",[103,264,265],{"style":105},"   44",[103,267,194,268],{"style":193},[196,269,270],{},"Sample 2 shortform version",[103,272,273],{"style":105},"   45",[103,275,276],{"style":105},"List","\u003C",[103,279,125],{"style":105},"> list2 = personList.FindAll(",[103,282,115],{"style":114},[103,284,285],{"style":105},"PersonFilter",[103,287,135],{"style":134},").FilterByLastName);    ",[103,290,291],{"style":105},"   46","             Response.Write(",[103,294,295],{"style":134},"\"Count \""," + list2.Count.ToString());",[103,298,299],{"style":105},"   47",[103,301,302],{"style":105},"   48",[103,304,305],{"style":105},"   49",[103,307,194,308],{"style":193},[196,309,310],{},"Sample 3 using lambda expression",[103,312,313],{"style":105},"   50",[103,315,316],{"style":193},"\u002F\u002FList\u003CPerson> list3 = personList.FindAll(",[103,318,319],{"style":105},"   51",[103,321,322],{"style":193},"\u002F\u002F    r => r.LastName == \"Rose\");",[103,324,325],{"style":105},"   52",[103,327,328],{"style":193},"\u002F\u002FResponse.Write(\"Count \" + list3.Count.ToString());",[103,330,331],{"style":105},"   53",[103,333,334],{"style":105},"   54",[103,336,337],{"style":105},"   55",[103,339,194,340],{"style":193},[196,341,342],{},"Sample 4 with arrays",[103,344,345],{"style":105},"   56",[103,347,348,349,351],{"style":193},"\u002F\u002FPerson",[103,350],{}," personList2 = {",[103,353,354],{"style":105},"   57",[103,356,357],{"style":193},"\u002F\u002F   new Person(\"Rose\", \"Bob\"),",[103,359,360],{"style":105},"   58",[103,362,363],{"style":193},"\u002F\u002F   new Person(\"Rose\", \"Phil\"),",[103,365,366],{"style":105},"   59",[103,368,369],{"style":193},"\u002F\u002F   new Person(\"Smith\", \"Jack\"),",[103,371,372],{"style":105},"   60",[103,374,375],{"style":193},"\u002F\u002F};",[103,377,378],{"style":105},"   61",[103,380,381],{"style":193},"\u002F\u002Foutputs each person in array",[103,383,384],{"style":105},"   62",[103,386,387],{"style":193},"\u002F\u002FArray.ForEach(personList2, delegate(Person p)",[103,389,390],{"style":105},"   63",[103,392,393],{"style":193},"\u002F\u002F{",[103,395,396],{"style":105},"   64",[103,398,399],{"style":193},"\u002F\u002F    Response.Write(p.LastName + \"\u003Cbr \u002F>\");",[103,401,402],{"style":105},"   65",[103,404,405],{"style":193},"\u002F\u002F});",[103,407,408],{"style":105},"   66",[103,410,411],{"style":105},"   67",[103,413,414],{"style":193},"\u002F\u002Foutputs each person after findall",[103,416,417],{"style":105},"   68",[103,419,348,420,422],{"style":193},[103,421],{}," personList3 = Array.FindAll(personList2, ",[103,424,425],{"style":105},"   69",[103,427,428],{"style":193},"\u002F\u002F    delegate (Person p)",[103,430,431],{"style":105},"   70",[103,433,434],{"style":193},"\u002F\u002F    {",[103,436,437],{"style":105},"   71",[103,439,440],{"style":193},"\u002F\u002F        return p.LastName == \"Rose\";",[103,442,443],{"style":105},"   72",[103,445,446],{"style":193},"\u002F\u002F    }",[103,448,449],{"style":105},"   73",[103,451,452],{"style":193},"\u002F\u002F);",[103,454,455],{"style":105},"   74",[103,457,458],{"style":193},"\u002F\u002FArray.ForEach(personList3, delegate(Person p)",[103,460,461],{"style":105},"   75",[103,463,393],{"style":193},[103,465,466],{"style":105},"   76",[103,468,399],{"style":193},[103,470,471],{"style":105},"   77",[103,473,405],{"style":193},[98,475,101,476,479,480,116,483,116,486,488,489,277,491,493,494,187,497,479,500,502,503,506,507,510,511,187,514,187,517,187,520,523,524,116,526,116,528,530,531,187,534,479,537,116,540,543,544,479,547,116,549,551,552,479,555,116,557,559,560,563,564,530,567,107,570,543,573,576,577,563,580,530,583,586,587,590,591,576,594,597,598,479,601,116,603,605,606,563,609,530,611,107,614,551,616,576,619,563,622,530,624,627,628,590,630,576,633,506,636,187,639,479,642,644,645,647,648,650,651,654,655,658,659,597,662,187,665,510,668,187,671,187,674,523,677,116,679,116,681,199,683,530,686,187,689,479,692,116,694,696,697,187,700,479,703,705,706,708,709,712,713,716,717,506,720,187,723,479,726,116,728,731,732,734,735,712,738,563,741,744,745,748,749,107,752,116,754,590,757,576,760,563,763,116,765,590,768,506,771,187,774,187,777,479,780,116,782,784,785,734,787,712,790,563,793,795,796,748,799,107,802,116,804,590,806,576,809,563,812,116,814,590,816,506,819,822],{"style":100},[103,477,478],{"style":105},"   86","     ",[103,481,482],{"style":114},"public",[103,484,485],{"style":114},"class",[103,487,110],{"style":105}," : System.Collections.Generic.",[103,490,276],{"style":105},[103,492,125],{"style":105},"> {    ",[103,495,496],{"style":105},"   87",[103,498,499],{"style":105},"   88",[103,501,482],{"style":114}," Persons() {    ",[103,504,505],{"style":105},"   89","     }    ",[103,508,509],{"style":105},"   90"," }    ",[103,512,513],{"style":105},"   91",[103,515,516],{"style":105},"   92",[103,518,519],{"style":105},"   93",[103,521,522],{"style":105},"   94"," ",[103,525,482],{"style":114},[103,527,485],{"style":114},[103,529,125],{"style":105}," {    ",[103,532,533],{"style":105},"   95",[103,535,536],{"style":105},"   96",[103,538,539],{"style":114},"private",[103,541,542],{"style":114},"string"," _lastName;    ",[103,545,546],{"style":105},"   97",[103,548,539],{"style":114},[103,550,542],{"style":114}," _firstName;    ",[103,553,554],{"style":105},"   98",[103,556,482],{"style":114},[103,558,542],{"style":114}," LastName {    ",[103,561,562],{"style":105},"   99","         ",[103,565,566],{"style":114},"get",[103,568,569],{"style":105},"  100",[103,571,572],{"style":114},"return",[103,574,575],{"style":105},"  101","         }    ",[103,578,579],{"style":105},"  102",[103,581,582],{"style":114},"set",[103,584,585],{"style":105},"  103","             _lastName = ",[103,588,589],{"style":114},"value",";    ",[103,592,593],{"style":105},"  104",[103,595,596],{"style":105},"  105","     }        ",[103,599,600],{"style":105},"  106",[103,602,482],{"style":114},[103,604,542],{"style":114}," FirstName {    ",[103,607,608],{"style":105},"  107",[103,610,566],{"style":114},[103,612,613],{"style":105},"  108",[103,615,572],{"style":114},[103,617,618],{"style":105},"  109",[103,620,621],{"style":105},"  110",[103,623,582],{"style":114},[103,625,626],{"style":105},"  111","             _firstName = ",[103,629,589],{"style":114},[103,631,632],{"style":105},"  112",[103,634,635],{"style":105},"  113",[103,637,638],{"style":105},"  114",[103,640,641],{"style":105},"  115",[103,643,482],{"style":114}," Person(",[103,646,542],{"style":114}," lastName, ",[103,649,542],{"style":114}," firstName) {    ",[103,652,653],{"style":105},"  116","         _lastName = lastName;    ",[103,656,657],{"style":105},"  117","         _firstName = firstName;    ",[103,660,661],{"style":105},"  118",[103,663,664],{"style":105},"  119",[103,666,667],{"style":105},"  120",[103,669,670],{"style":105},"  121",[103,672,673],{"style":105},"  122",[103,675,676],{"style":105},"  123",[103,678,482],{"style":114},[103,680,485],{"style":114},[103,682,285],{"style":105},[103,684,685],{"style":105},"  124",[103,687,688],{"style":105},"  125",[103,690,691],{"style":105},"  126",[103,693,539],{"style":114},[103,695,542],{"style":114}," _match;    ",[103,698,699],{"style":105},"  127",[103,701,702],{"style":105},"  128",[103,704,482],{"style":114}," PersonFilter(",[103,707,542],{"style":114}," match)    ",[103,710,711],{"style":105},"  129","     {    ",[103,714,715],{"style":105},"  130","         _match = match;    ",[103,718,719],{"style":105},"  131",[103,721,722],{"style":105},"  132",[103,724,725],{"style":105},"  133",[103,727,482],{"style":114},[103,729,730],{"style":114},"bool"," FilterByLastName(",[103,733,125],{"style":105}," per)    ",[103,736,737],{"style":105},"  134",[103,739,740],{"style":105},"  135",[103,742,743],{"style":114},"if"," (per.LastName == _match)    ",[103,746,747],{"style":105},"  136","         {    ",[103,750,751],{"style":105},"  137",[103,753,572],{"style":114},[103,755,756],{"style":114},"true",[103,758,759],{"style":105},"  138",[103,761,762],{"style":105},"  139",[103,764,572],{"style":114},[103,766,767],{"style":114},"false",[103,769,770],{"style":105},"  140",[103,772,773],{"style":105},"  141",[103,775,776],{"style":105},"  142",[103,778,779],{"style":105},"  143",[103,781,482],{"style":114},[103,783,730],{"style":114}," FilterByFirstName(",[103,786,125],{"style":105},[103,788,789],{"style":105},"  144",[103,791,792],{"style":105},"  145",[103,794,743],{"style":114}," (per.FirstName == _match)    ",[103,797,798],{"style":105},"  146",[103,800,801],{"style":105},"  147",[103,803,572],{"style":114},[103,805,756],{"style":114},[103,807,808],{"style":105},"  148",[103,810,811],{"style":105},"  149",[103,813,572],{"style":114},[103,815,767],{"style":114},[103,817,818],{"style":105},"  150",[103,820,821],{"style":105},"  151"," } ",[824,825],"br",{},[39,827],{"src":828,"alt":48,"style":829},"\u002Farticles\u002Fimages\u002Ffilter.jpg","display:none;",{"title":48,"searchDepth":49,"depth":49,"links":831},[],"2017-05-29T20:59:15.8338506Z",{},"\u002Farticles\u002Fgeneric-collections-and-filtering",{"title":79,"description":84},"articles\u002Fgeneric-collections-and-filtering",[838],"csharp","fUAFW_aqKskOuF4PIpWXrn1qMk6NyjR1YFeTVoFP0Go",{"id":841,"title":842,"author":7,"body":843,"createdAt":1037,"description":1038,"extension":53,"img":1039,"meta":1040,"navigation":55,"path":1041,"seo":1042,"stem":1043,"tags":1044,"updatedAt":1037,"__hash__":1046},"articles\u002Farticles\u002Ffeature-exists-activated-on-spsite.md","Feature Exists (Activated on SPSite)",{"type":9,"value":844,"toc":1035},[845,848,1032],[12,846,847],{},"Method to iterate through SharePoint SPSite collection to check to\nsee if a feature (featureGuid) exists.  If found, method returns true.",[849,850,853,864,872,876,882,887,895,900,907,914,921,926,932,939,946,951,958,963,970,977,984,994,1000,1006,1013,1020,1027],"pre",{"className":851},[852],"csharpcode",[103,854,856,862],{"style":855},"font-family: Consolas; font-size: x-small;",[103,857,858],{"style":855},[103,859,860],{"style":855},[103,861,523],{"style":855},[103,863,523],{"style":855},[103,865,867],{"style":866},"font-family: Consolas; color: #0000ff; font-size: x-small;",[103,868,869],{"style":866},[103,870,871],{"style":866}," private",[103,873,874],{"style":855},[103,875,116],{"style":855},[103,877,878],{"style":866},[103,879,880],{"style":866},[103,881,730],{"style":866},[103,883,884],{"style":855},[103,885,886],{"style":855}," FeatureExists(",[103,888,890],{"style":889},"font-family: Consolas; color: #2b91af; font-size: x-small;",[103,891,892],{"style":889},[103,893,894],{"style":889},"SPSite",[103,896,897],{"style":855},[103,898,899],{"style":855}," siteCollection, ",[103,901,902],{"style":889},[103,903,904],{"style":889},[103,905,906],{"style":889},"Guid",[103,908,909,912],{"style":855},[103,910,911],{"style":855}," featureGuid) {",[103,913,523],{"style":855},[103,915,916],{"style":866},[103,917,918],{"style":866},[103,919,920],{"style":866},"    bool",[103,922,923],{"style":855},[103,924,925],{"style":855}," found = ",[103,927,928],{"style":866},[103,929,930],{"style":866},[103,931,767],{"style":866},[103,933,934,937],{"style":855},[103,935,936],{"style":855},";",[103,938,523],{"style":855},[103,940,941],{"style":866},[103,942,943],{"style":866},[103,944,945],{"style":866},"    foreach",[103,947,948],{"style":855},[103,949,950],{"style":855}," (",[103,952,953],{"style":889},[103,954,955],{"style":889},[103,956,957],{"style":889},"SPFeature",[103,959,960],{"style":855},[103,961,962],{"style":855}," feature ",[103,964,965],{"style":866},[103,966,967],{"style":866},[103,968,969],{"style":866},"in",[103,971,972,975],{"style":855},[103,973,974],{"style":855}," siteCollection.Features) {",[103,976,523],{"style":855},[103,978,979],{"style":866},[103,980,981],{"style":866},[103,982,983],{"style":866},"    if",[103,985,986],{"style":855},[103,987,988,989],{"style":855}," (feature.DefinitionId == featureGuid) {\n",[103,990,991],{"style":855},[103,992,993],{"style":855},"      found = ",[103,995,996],{"style":866},[103,997,998],{"style":866},[103,999,756],{"style":866},[103,1001,1002,1004],{"style":855},[103,1003,936],{"style":855},[103,1005,523],{"style":855},[103,1007,1008],{"style":866},[103,1009,1010],{"style":866},[103,1011,1012],{"style":866},"      break",[103,1014,1015,1018],{"style":855},[103,1016,1017],{"style":855},";    }  }",[103,1019,523],{"style":855},[103,1021,1022],{"style":866},[103,1023,1024],{"style":866},[103,1025,1026],{"style":866}," return",[103,1028,1029],{"style":855},[103,1030,1031],{"style":855}," found;} ",[12,1033,1034],{},"Cool eh?",{"title":48,"searchDepth":49,"depth":49,"links":1036},[],"2017-05-29T20:59:15.5333517Z","Iterate through SharePoint SPSite collection",null,{},"\u002Farticles\u002Ffeature-exists-activated-on-spsite",{"title":842,"description":1038},"articles\u002Ffeature-exists-activated-on-spsite",[1045],"sharepoint","HNB5xxrT3JuSE5aSwOI_YI0ghRpedBgb1Wc6au43Yp4",1781574769602]