Hi everybody,
I want see sub total percent according to sub total.
how can i calculate sub total's items percent according to sub total.
In this picture true calculating
http://t1311.hizliresim.com/1h/u/uwq44.gif
NeedDataSource Code
(
var aktifler = from bs in PredicaFinansContext.APV_PRE_BILANCO_SIRKET
where bs.Yil == yil && bs.Donem == donem && bs.Ay == ay &&
(bs.Tur.StartsWith("AKTİF") || bs.Tur.StartsWith("aktif"))
select new
{
//bs.Sirket,
bs.Anakod,
bs.Tur,
bs.GrupKod,
bs.Donem,
bs.Yil,
bs.Tutar
};
RadPivotGrid1.DataSource = aktifler.ToList();
)
(
<telerik:RadPivotGrid runat="server" ID="RadPivotGrid1"
AllowFiltering="true"
OnNeedDataSource="RadPivotGrid1_NeedDataSource" OnPivotGridBiffExporting="RadPivotGrid1_PivotGridBiffExporting"
OnPivotGridCellExporting="RadPivotGrid1_PivotGridCellExporting" OnCellDataBound="RadPivotGrid1_CellDataBound"
EnableZoneContextMenu="true" AllowSorting="true" AllowPaging="False"
EmptyValue="0"
ColumnHeaderZoneText="Kolon Alanı" DataHeaderZoneText="Data Alanı" FilterHeaderZoneText="Filtre Alanı"
RowHeaderZoneText="Satır Alanı"
EnableToolTips="True" Width="100%" Height="500px"
TotalsSettings-ColumnGrandTotalsPosition="None"
TotalsSettings-ColumnsSubTotalsPosition="None"
TotalsSettings-RowGrandTotalsPosition="None"
TotalsSettings-RowsSubTotalsPosition="Last"
Culture="tr-TR" ErrorValue="#" Font-Bold="False"
ShowColumnHeaderZone="False"
ShowDataHeaderZone="False"
ShowFilterHeaderZone="False"
ShowRowHeaderZone="False" >
<%--<ColumnHeaderCellStyle Width="100px" />--%>
<%--<RowHeaderCellStyle Width="150px"></RowHeaderCellStyle>--%>
<ClientSettings EnableFieldsDragDrop="true">
<ClientEvents OnToolTipShow="toolTipShow" />
<Scrolling AllowVerticalScroll="true" />
</ClientSettings>
<Fields>
<telerik:PivotGridReportFilterField DataField="GrupKod" IsHidden="True">
</telerik:PivotGridReportFilterField>
<telerik:PivotGridRowField DataField="Sirket">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="Tur">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="Anakod">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="GrupKod">
</telerik:PivotGridRowField>
<%-- HESAPLI ALANLAR --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" DataFormatString="{0:#,##0} TL" Caption="Tutar">
<HeaderCellTemplate>
<asp:Label ID="Label1" runat="server" >
Tutar
</asp:Label>
</HeaderCellTemplate>
</telerik:PivotGridAggregateField>
<%-- GRUB YUZDE --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" Caption="Grub Yüzde" GrandTotalAggregateFormatString="{0:P}" TotalFormatString="{0:P}">
<TotalFormat TotalFunction="PercentOfRowTotal" Axis="Columns" />
<HeaderCellTemplate>
<asp:Label ID="Label1" runat="server" Text="Grub %"></asp:Label>
</HeaderCellTemplate>
<RowGrandTotalCellTemplate>
<asp:Label ID="Label1" runat="server" Text="RowGrandTotalCellTemplate"></asp:Label>
</RowGrandTotalCellTemplate>
</telerik:PivotGridAggregateField>
<%-- GENEL YÜZDE --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" Caption="Genel Yüzde" GrandTotalAggregateFormatString="{0:P}" TotalFormatString="{0:P}">
<TotalFormat TotalFunction="PercentOfGrandTotal" Axis="Columns" Level="0" />
<HeaderCellTemplate>
<asp:Label ID="Label1" runat="server" Text="Genel %"></asp:Label>
</HeaderCellTemplate>
</telerik:PivotGridAggregateField>
</Fields>
<ClientSettings EnableFieldsDragDrop="true">
<ClientMessages DragToReorder="Sürükle Bırak Alanı"></ClientMessages>
</ClientSettings>
</telerik:RadPivotGrid>
)
I want see sub total percent according to sub total.
how can i calculate sub total's items percent according to sub total.
In this picture true calculating
http://t1311.hizliresim.com/1h/u/uwq44.gif
NeedDataSource Code
(
var aktifler = from bs in PredicaFinansContext.APV_PRE_BILANCO_SIRKET
where bs.Yil == yil && bs.Donem == donem && bs.Ay == ay &&
(bs.Tur.StartsWith("AKTİF") || bs.Tur.StartsWith("aktif"))
select new
{
//bs.Sirket,
bs.Anakod,
bs.Tur,
bs.GrupKod,
bs.Donem,
bs.Yil,
bs.Tutar
};
(
<telerik:RadPivotGrid runat="server" ID="RadPivotGrid1"
AllowFiltering="true"
OnNeedDataSource="RadPivotGrid1_NeedDataSource" OnPivotGridBiffExporting="RadPivotGrid1_PivotGridBiffExporting"
OnPivotGridCellExporting="RadPivotGrid1_PivotGridCellExporting" OnCellDataBound="RadPivotGrid1_CellDataBound"
EnableZoneContextMenu="true" AllowSorting="true" AllowPaging="False"
EmptyValue="0"
ColumnHeaderZoneText="Kolon Alanı" DataHeaderZoneText="Data Alanı" FilterHeaderZoneText="Filtre Alanı"
RowHeaderZoneText="Satır Alanı"
EnableToolTips="True" Width="100%" Height="500px"
TotalsSettings-ColumnGrandTotalsPosition="None"
TotalsSettings-ColumnsSubTotalsPosition="None"
TotalsSettings-RowGrandTotalsPosition="None"
TotalsSettings-RowsSubTotalsPosition="Last"
Culture="tr-TR" ErrorValue="#" Font-Bold="False"
ShowColumnHeaderZone="False"
ShowDataHeaderZone="False"
ShowFilterHeaderZone="False"
ShowRowHeaderZone="False" >
<%--<ColumnHeaderCellStyle Width="100px" />--%>
<%--<RowHeaderCellStyle Width="150px"></RowHeaderCellStyle>--%>
<ClientSettings EnableFieldsDragDrop="true">
<ClientEvents OnToolTipShow="toolTipShow" />
<Scrolling AllowVerticalScroll="true" />
</ClientSettings>
<Fields>
<telerik:PivotGridReportFilterField DataField="GrupKod" IsHidden="True">
</telerik:PivotGridReportFilterField>
<telerik:PivotGridRowField DataField="Sirket">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="Tur">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="Anakod">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="GrupKod">
</telerik:PivotGridRowField>
<%-- HESAPLI ALANLAR --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" DataFormatString="{0:#,##0} TL" Caption="Tutar">
<HeaderCellTemplate>
<asp:Label ID="Label1" runat="server" >
Tutar
</asp:Label>
</HeaderCellTemplate>
</telerik:PivotGridAggregateField>
<%-- GRUB YUZDE --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" Caption="Grub Yüzde" GrandTotalAggregateFormatString="{0:P}" TotalFormatString="{0:P}">
<TotalFormat TotalFunction="PercentOfRowTotal" Axis="Columns" />
<HeaderCellTemplate>
<asp:Label ID="Label1" runat="server" Text="Grub %"></asp:Label>
</HeaderCellTemplate>
<RowGrandTotalCellTemplate>
<asp:Label ID="Label1" runat="server" Text="RowGrandTotalCellTemplate"></asp:Label>
</RowGrandTotalCellTemplate>
</telerik:PivotGridAggregateField>
<%-- GENEL YÜZDE --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" Caption="Genel Yüzde" GrandTotalAggregateFormatString="{0:P}" TotalFormatString="{0:P}">
<TotalFormat TotalFunction="PercentOfGrandTotal" Axis="Columns" Level="0" />
<HeaderCellTemplate>
<asp:Label ID="Label1" runat="server" Text="Genel %"></asp:Label>
</HeaderCellTemplate>
</telerik:PivotGridAggregateField>
</Fields>
<ClientSettings EnableFieldsDragDrop="true">
<ClientMessages DragToReorder="Sürükle Bırak Alanı"></ClientMessages>
</ClientSettings>
</telerik:RadPivotGrid>
)