Monday 13 January 2020

Fetch Xml,Group by Date field and then sort by same Date field


Get Latest records by ab_effectivedate field and aggregate EarnCode decimal field.

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' aggregate='true'> <entity name='ab_deductionfringes'>
<attribute name='ab_effectivedate' alias='EffectiveDateYear' groupby='true' dategrouping='year'/>
<attribute name='ab_effectivedate' alias='EffectiveDateMonth' groupby='true'dategrouping='month'/>
<attribute name='ab_effectivedate' alias='EffectiveDateDay' groupby='true' dategrouping='day'/>
<attribute name='ab_earncode' alias='EarnCode' aggregate='sum' />
<order alias='EffectiveDateYear' descending='true' />
<order alias='EffectiveDateMonth' descending='true' />
<order alias='EffectiveDateDay' descending='true' />
 <filter type='and'>
  <condition attribute='ab_union' operator='eq'  uitype='ab_union' value='" + unionId + @"' />
   <condition attribute='ab_trade' operator='eq'  uitype='ab_trade' value='" + tradeId + @"' />
   <condition attribute='statecode' operator='eq' value='0' />
   <condition attribute='ab_effectivedate' operator='not-null' />
 </filter>
 </entity>
</fetch>

No comments:

Post a Comment

Numbering Table Parent group and child group ssrs report

 Recently I have faced a scenario to numbering parent group and subgroup in the following formate 10 parentGroupRow1    10.1 childGroupRow1 ...