Hi,
My Telerik Reporting is R2 2018.
In the group footer section of my report, I need to have a grouping by VAT rates, with the corresponding totals for both the taxable amount and the corresponding tax (see attached image)
In myFile.xaml I have: ItemsSource="{Binding MyDataSource.SummaryVat}
Text="{Binding MyDataSource.TotTaxable, StringFormat=N2}}"
Text="{Binding MyDataSource.TotImposta, StringFormat=N2}}"
and also: ItemsSource="{Binding MyDataSource.SummaryVatFree}
Text="{Binding MyDataSource.TotTaxableFree, StringFormat=N2}}"
Text="{Binding MyDataSource.TotVatFree, StringFormat=N2}}"
In my class MyDataSource I have:
SummaryVat = new List<MyComplexObject>(from x in listaInfoSales
where !x.IsSaleFree
group x by x.VatPercentage into g
select new MyComplexObject
{
VatPercentage = g.Key,
Tot = g.Sum(x => x.TotValore) / (1 + g.Key / 100)
});
TotTaxable = SummaryVat.Sum(x => x.Tot);
TotImposta = SummaryVat.Sum(x => x.TotVat);
SummaryVatFree = new List<MyComplexObject>(from x in listaInfoSales
where x.IsSaleFree
group x by x.VatPercentage into g
select new MyComplexObject
{
VatPercentage = g.Key,
Tot = g.Sum(x => x.TotDiscountSales) / (1 + g.Key / 100)
});
TotTaxableFree = SummaryVatFree.Sum(x => x.Tot);
TotVatFree = SummaryVatFree.Sum(x => x.TotVat);
My Telerik Reporting is R2 2018.
In the group footer section of my report, I need to have a grouping by VAT rates, with the corresponding totals for both the taxable amount and the corresponding tax (see attached image)
In myFile.xaml I have: ItemsSource="{Binding MyDataSource.SummaryVat}
Text="{Binding MyDataSource.TotTaxable, StringFormat=N2}}"
Text="{Binding MyDataSource.TotImposta, StringFormat=N2}}"
and also: ItemsSource="{Binding MyDataSource.SummaryVatFree}
Text="{Binding MyDataSource.TotTaxableFree, StringFormat=N2}}"
Text="{Binding MyDataSource.TotVatFree, StringFormat=N2}}"
In my class MyDataSource I have:
SummaryVat = new List<MyComplexObject>(from x in listaInfoSales
where !x.IsSaleFree
group x by x.VatPercentage into g
select new MyComplexObject
{
VatPercentage = g.Key,
Tot = g.Sum(x => x.TotValore) / (1 + g.Key / 100)
});
TotTaxable = SummaryVat.Sum(x => x.Tot);
TotImposta = SummaryVat.Sum(x => x.TotVat);
SummaryVatFree = new List<MyComplexObject>(from x in listaInfoSales
where x.IsSaleFree
group x by x.VatPercentage into g
select new MyComplexObject
{
VatPercentage = g.Key,
Tot = g.Sum(x => x.TotDiscountSales) / (1 + g.Key / 100)
});
TotTaxableFree = SummaryVatFree.Sum(x => x.Tot);
TotVatFree = SummaryVatFree.Sum(x => x.TotVat);