646. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2/1/2017 2:56:55 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

646.1 Files compared

# Location File Last Modified
1 C:\Araxis_Merge_Comprasion\Pub_un\BTSSS_CIF_122016.zip\BTSSS_CIF_12_20_16\clean\CRM\trunk\SDK\SampleCode\CS\Reporting GetReportHistoryLimit.cs Tue Dec 20 19:51:44 2016 UTC
2 Wed Feb 1 19:56:54 2017 UTC

646.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 0 0
Removed 1 198

646.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

646.4 Active regular expressions

No regular expressions were active.

646.5 Comparison detail

1   // ======= ========== ========== ========== ========== ========== ========== ==        
2   //        
3   //  This f ile is par t of the M icrosoft D ynamics CR M SDK code  samples.        
4   //        
5   //  Copyri ght (C) Mi crosoft Co rporation.  All right s reserved .        
6   //        
7   //  This s ource code  is intend ed only as  a supplem ent to Mic rosoft        
8   //  Develo pment Tool s and/or o n-line doc umentation .  See the se other        
9   //  materi als for de tailed inf ormation r egarding M icrosoft c ode sample s.        
10   //        
11   //  THIS C ODE AND IN FORMATION  ARE PROVID ED "AS IS"  WITHOUT W ARRANTY OF  ANY        
12   //  KIND,  EITHER EXP RESSED OR  IMPLIED, I NCLUDING B UT NOT LIM ITED TO TH E        
13   //  IMPLIE D WARRANTI ES OF MERC HANTABILIT Y AND/OR F ITNESS FOR  A        
14   //  PARTIC ULAR PURPO SE.        
15   //        
16   // ======= ========== ========== ========== ========== ========== ========== ==        
17   //<snippet GetReportH istoryLimi t>        
18   using Syst em;        
19   using Syst em.Xml;        
20   using Syst em.Service Model;        
21   using Syst em.Service Model.Desc ription;        
22          
23   // These n amespaces  are found  in the Mic rosoft.Xrm .Sdk.dll a ssembly        
24   // found i n the SDK\ bin folder .        
25   using Micr osoft.Xrm. Sdk;        
26   using Micr osoft.Xrm. Sdk.Client ;        
27   using Micr osoft.Xrm. Sdk.Query;        
28   using Micr osoft.Xrm. Sdk.Discov ery;        
29   using Micr osoft.Xrm. Sdk.Messag es;        
30          
31   // This na mespace is  found in  Microsoft. Crm.Sdk.Pr oxy.dll as sembly        
32   // found i n the SDK\ bin folder .        
33   using Micr osoft.Crm. Sdk.Messag es;        
34          
35   namespace  Microsoft. Crm.Sdk.Sa mples        
36   {        
37       /// <s ummary>        
38       /// Th is sample  shows how  to retriev e the hist ory limit  of a repor t.        
39       /// </ summary>        
40       public  class Get ReportHist oryLimit        
41       {        
42           #r egion Clas s Level Me mbers        
43          
44           // / <summary >        
45           // / Stores t he organiz ation serv ice proxy.        
46           // / </summar y>        
47           pr ivate Orga nizationSe rviceProxy  _serviceP roxy;                 
48          
49           #e ndregion C lass Level  Members        
50          
51           #r egion How  To Sample  Code        
52           // / <summary >        
53           // / Create a nd configu re the org anization  service pr oxy.                 
54           // / Retrieve  the histo ry limit o f a report .        
55           // / Optional ly delete  any entity  records t hat were c reated for  this samp le.        
56           // / </summar y>        
57           // / <param n ame="serve rConfig">C ontains se rver conne ction info rmation.</ param>        
58           // / <param n ame="promp tforDelete ">When Tru e, the use r will be  prompted t o delete a ll        
59           // / created  entities.< /param>        
60           pu blic void  Run(Server Connection .Configura tion serve rConfig, b ool prompt ForDelete)        
61           {        
62                try        
63                {        
64          
65                    // C onnect to  the Organi zation ser vice.         
66                    // T he using s tatement a ssures tha t the serv ice proxy  will be pr operly dis posed.        
67                    usin g (_servic eProxy = n ew Organiz ationServi ceProxy(se rverConfig .Organizat ionUri, se rverConfig .HomeRealm Uri,server Config.Cre dentials,  serverConf ig.DeviceC redentials ))        
68                    {        
69                         // This st atement is  required  to enable  early-boun d type sup port.        
70                         _servicePr oxy.Enable ProxyTypes ();        
71          
72                         // Call th e method t o create a ny data th at this sa mple requi res.        
73                         CreateRequ iredRecord s();        
74          
75                         //<snippet GetReportH istoryLimi t1>        
76          
77                         // Query f or an an e xisting re port: Acco unt Overvi ew. This i s a defaul t report i n Microsof t Dynamics  CRM.                                          
78                         QueryByAtt ribute rep ortQuery =  new Query ByAttribut e(Report.E ntityLogic alName);        
79                         reportQuer y.AddAttri buteValue( "name", "A ccount Ove rview");        
80                         reportQuer y.ColumnSe t = new Co lumnSet("r eportid");        
81          
82                         // Get the  report.        
83                         EntityColl ection ret rieveRepor ts = _serv iceProxy.R etrieveMul tiple(repo rtQuery);        
84          
85                         // Convert  retrieved  Entity to  a report        
86                         Report ret rievedRepo rt = (Repo rt)retriev eReports.E ntities[0] ;        
87                         Console.Wr iteLine("R etrieved t he 'Accoun t Overview ' report." );        
88          
89                         // Use the  Download  Report Def inition me ssage.        
90                         GetReportH istoryLimi tRequest r eportHisto ryRequest  = new GetR eportHisto ryLimitReq uest        
91                         {        
92                             Report Id = retri evedReport .ReportId. Value        
93                         };        
94          
95                         GetReportH istoryLimi tResponse  reportHist oryRespons e = (GetRe portHistor yLimitResp onse)_serv iceProxy.E xecute(rep ortHistory Request);        
96          
97                         // Access  the histor y limit da ta        
98                         int histor yLimit = r eportHisto ryResponse .HistoryLi mit;        
99          
100                         Console.Wr iteLine("T he report  history li mit is {0} .", histor yLimit);        
101          
102                         //</snippe tGetReport HistoryLim it1>        
103                                
104                    }        
105                }        
106                // Catch  any servi ce fault e xceptions  that Micro soft Dynam ics CRM th rows.        
107                catch (F aultExcept ion<Micros oft.Xrm.Sd k.Organiza tionServic eFault>)        
108                {        
109                    // Y ou can han dle an exc eption her e or pass  it back to  the calli ng method.        
110                    thro w;        
111                }        
112           }        
113          
114           // / <summary >        
115           // / This met hod create s any enti ty records  that this  sample re quires.                 
116           // / </summar y>        
117           pu blic void  CreateRequ iredRecord s()        
118           {        
119                // No en tity recor ds are cre ated in th is sample.        
120           }        
121                   
122           #e ndregion H ow To Samp le Code        
123          
124           #r egion Main        
125           // / <summary >        
126           // / Standard  Main() me thod used  by most SD K samples.        
127           // / </summar y>        
128           // / <param n ame="args" ></param>        
129           st atic publi c void Mai n(string[]  args)        
130           {        
131                try        
132                {        
133                    // O btain the  target org anization' s Web addr ess and cl ient logon          
134                    // c redentials  from the  user.        
135                    Serv erConnecti on serverC onnect = n ew ServerC onnection( );        
136                    Serv erConnecti on.Configu ration con fig = serv erConnect. GetServerC onfigurati on();        
137          
138                    GetR eportHisto ryLimit ap p = new Ge tReportHis toryLimit( );        
139                    app. Run(config , true);        
140                }        
141          
142                catch (F aultExcept ion<Micros oft.Xrm.Sd k.Organiza tionServic eFault> ex )        
143                {        
144                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
145                    Cons ole.WriteL ine("Times tamp: {0}" , ex.Detai l.Timestam p);        
146                    Cons ole.WriteL ine("Code:  {0}", ex. Detail.Err orCode);        
147                    Cons ole.WriteL ine("Messa ge: {0}",  ex.Detail. Message);        
148                    Cons ole.WriteL ine("Plugi n Trace: { 0}", ex.De tail.Trace Text);        
149                    Cons ole.WriteL ine("Inner  Fault: {0 }",        
150                         null == ex .Detail.In nerFault ?  "No Inner  Fault" :  "Has Inner  Fault");        
151                }        
152                catch (S ystem.Time outExcepti on ex)        
153                {        
154                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
155                    Cons ole.WriteL ine("Messa ge: {0}",  ex.Message );        
156                    Cons ole.WriteL ine("Stack  Trace: {0 }", ex.Sta ckTrace);        
157                    Cons ole.WriteL ine("Inner  Fault: {0 }",        
158                         null == ex .InnerExce ption.Mess age ? "No  Inner Faul t" : ex.In nerExcepti on.Message );        
159                }        
160                catch (S ystem.Exce ption ex)        
161                {        
162                    Cons ole.WriteL ine("The a pplication  terminate d with an  error.");        
163                    Cons ole.WriteL ine(ex.Mes sage);        
164          
165                    // D isplay the  details o f the inne r exceptio n.        
166                    if ( ex.InnerEx ception !=  null)        
167                    {        
168                         Console.Wr iteLine(ex .InnerExce ption.Mess age);        
169          
170                         FaultExcep tion<Micro soft.Xrm.S dk.Organiz ationServi ceFault> f e        
171                             = ex.I nnerExcept ion        
172                             as Fau ltExceptio n<Microsof t.Xrm.Sdk. Organizati onServiceF ault>;        
173                         if (fe !=  null)        
174                         {        
175                             Consol e.WriteLin e("Timesta mp: {0}",  fe.Detail. Timestamp) ;        
176                             Consol e.WriteLin e("Code: { 0}", fe.De tail.Error Code);        
177                             Consol e.WriteLin e("Message : {0}", fe .Detail.Me ssage);        
178                             Consol e.WriteLin e("Plugin  Trace: {0} ", fe.Deta il.TraceTe xt);        
179                             Consol e.WriteLin e("Inner F ault: {0}" ,        
180                                 nu ll == fe.D etail.Inne rFault ? " No Inner F ault" : "H as Inner F ault");        
181                         }        
182                    }        
183                }        
184                // Addit ional exce ptions to  catch: Sec urityToken Validation Exception,  ExpiredSe curityToke nException ,        
185                // Secur ityAccessD eniedExcep tion, Mess ageSecurit yException , and Secu rityNegoti ationExcep tion.        
186          
187                finally        
188                {        
189          
190                    Cons ole.WriteL ine("Press  <Enter> t o exit.");        
191                    Cons ole.ReadLi ne();        
192                }        
193          
194           }        
195           #e ndregion M ain        
196       }        
197   }        
198   //</snippe tGetReport HistoryLim it>