Current filter:
                                You should refresh the page.
                                  • Hi,

                                    It would appear the Pivot export function has gone off the rails. :)  We are getting completely wrong data in various columns.

                                    Here is the pivot... The thing to note here is that it is fairly plain-jane as far as I know. No event handlers aside from the client-side event that re-wrangles a chart (which is not the problem)

                                    [ASPx]
                                    <dx:ASPxPivotGrid ID="pvtContracts" runat="server" ClientInstanceName="pvtContracts" DataSourceID="dsContractAnalysis" Width="100%" > <ClientSideEvents EndCallback="function(s, e) {webChart.PerformCallback();}" /> <OptionsBehavior SortBySummaryDefaultOrder="Descending" /> <OptionsCustomization AllowSortBySummary="true" AllowFilterInCustomizationForm="True" CustomizationFormStyle="Excel2007" CustomizationExcelWindowHeight="630" CustomizationExcelWindowWidth="450" CustomizationFormLayout="TopPanelOnly" AllowFilterBySummary="true" /> <OptionsFilter NativeCheckBoxes="False" ShowOnlyAvailableItems="true" GroupFilterMode="List" /> <OptionsPager EllipsisMode="OutsideNumeric" Position="Bottom" RowsPerPage="15"> <PageSizeItemSettings ShowAllItem="True" Visible="True" Items="10, 15, 20, 50, 100, 200" /> </OptionsPager> <OptionsView HorizontalScrollBarMode="Auto" ShowFilterSeparatorBar="True" ShowRowTotals="False" /> <%--DataHeadersDisplayMode="Popup" DataHeadersPopupMinCount="0"--%> <Groups> <dx:PivotGridWebGroup Caption="Contract Value" /> <dx:PivotGridWebGroup Caption="Annual Budget" /> <dx:PivotGridWebGroup Caption="Contract Start" /> <dx:PivotGridWebGroup Caption="Contract End" /> <dx:PivotGridWebGroup Caption="Contract Creation" /> <dx:PivotGridWebGroup Caption="Count" /> </Groups> <Fields> <dx:PivotGridField Area="RowArea" AreaIndex="1" FieldName="ContractTypeName" ID="fieldContractTypeName" Caption="Contract Type" /> <%--TopValueCount="4" TopValueShowOthers="True" SortBySummaryInfo-FieldName="ContractValue" --%> <dx:PivotGridField Area="RowArea" AreaIndex="2" FieldName="ContractPurchaseGroupName" ID="fieldContractPurchaseGroupName" Caption="Purchase Group" /> <dx:PivotGridField GroupIndex="0" InnerGroupIndex="0" Area="DataArea" FieldName="ContractValue" ID="fieldContractValue" CellFormat-FormatString="c0" CellFormat-FormatType="Numeric" ValueFormat-FormatString="c0" ValueFormat-FormatType="Numeric" Caption="Contract Value" SummaryType="Sum" /> <dx:PivotGridField GroupIndex="0" InnerGroupIndex="1" Area="DataArea" FieldName="ContractValue" ID="fieldContractValuePercent" SummaryDisplayType="PercentOfColumnGrandTotal" Caption="Percent of Total" /> <dx:PivotGridField GroupIndex="0" InnerGroupIndex="2" Area="DataArea" FieldName="ContractValue" ID="fieldContractValueRanked" SummaryDisplayType="RankInColumnLargestToSmallest" Caption="Rank" /> <dx:PivotGridField GroupIndex="1" InnerGroupIndex="0" Area="DataArea" FieldName="AnnualBudget" ID="fieldAnnualBudget" CellFormat-FormatString="c0" CellFormat-FormatType="Numeric" ValueFormat-FormatString="c0" ValueFormat-FormatType="Numeric" Caption="Annual Budget" SummaryType="Sum" /> <dx:PivotGridField GroupIndex="1" InnerGroupIndex="1" Area="DataArea" FieldName="AnnualBudget" ID="fieldAnnualBudgetPercent" SummaryDisplayType="PercentOfColumnGrandTotal" Caption="Percent of Total" /> <dx:PivotGridField GroupIndex="1" InnerGroupIndex="2" Area="DataArea" FieldName="AnnualBudget" ID="fieldAnnualBudgetRanked" SummaryDisplayType="RankInColumnLargestToSmallest" Caption="Rank" /> <dx:PivotGridField GroupIndex="5" InnerGroupIndex="0" Area="FilterArea" AreaIndex="0" FieldName="Counter" ID="fieldCounter" Caption="Counter" SummaryType="Sum" /> <dx:PivotGridField GroupIndex="5" InnerGroupIndex="1" Area="FilterArea" AreaIndex="0" FieldName="Counter" ID="fieldCounterPercentage" Caption="Percent of Total" SummaryDisplayType="PercentOfColumnGrandTotal" /> <dx:PivotGridField Area="FilterArea" AreaIndex="1" FieldName="ContractCashFlowName" ID="fieldContractCashFlowName" Caption="Cash Flow" /> <dx:PivotGridField Area="FilterArea" AreaIndex="2" FieldName="ClientDepartment" Caption="Client Department" ID="fieldClientDepartment" /> <dx:PivotGridField Area="FilterArea" AreaIndex="3" FieldName="ClientName" ID="fieldClientName" Caption="Client Name" /> <dx:PivotGridField Area="FilterArea" AreaIndex="4" FieldName="ContractManagerName" ID="fieldContractManager" Caption="Contract Manager" /> <dx:PivotGridField Area="FilterArea" AreaIndex="5" FieldName="ContractName" ID="fieldContractName" Caption="Contract Name" /> <dx:PivotGridField Area="FilterArea" AreaIndex="6" FieldName="StartDate" ID="fieldStartDate" Caption="Start Date" GroupInterval="Date" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="7" FieldName="StartDate" ID="fieldStartDateYear" Caption="Contract Start" GroupInterval="DateYear" Visible="False" GroupIndex="2" InnerGroupIndex="0" /> <dx:PivotGridField Area="FilterArea" AreaIndex="7" FieldName="StartDate" ID="fieldStartDateQtr" Caption="Quarter" GroupInterval="DateQuarterYear" Visible="False" GroupIndex="2" InnerGroupIndex="1" /> <dx:PivotGridField Area="FilterArea" AreaIndex="7" FieldName="StartDate" ID="fieldStartDateMth" Caption="Month" GroupInterval="DateMonth" Visible="False" GroupIndex="2" InnerGroupIndex="2" /> <dx:PivotGridField Area="FilterArea" AreaIndex="8" FieldName="DeadLine" ID="fieldEndDate" Caption="End Date" GroupInterval="Date" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="9" FieldName="DeadLine" ID="fieldEndDateYear" Caption="Contract End" GroupInterval="DateYear" GroupIndex="3" InnerGroupIndex="0" /> <dx:PivotGridField Area="FilterArea" AreaIndex="9" FieldName="DeadLine" ID="fieldEndDateQtr" Caption="Quarter" GroupInterval="DateQuarterYear" GroupIndex="3" InnerGroupIndex="1" /> <dx:PivotGridField Area="FilterArea" AreaIndex="9" FieldName="DeadLine" ID="fieldEndDateMth" Caption="Month" GroupInterval="DateMonth" GroupIndex="3" InnerGroupIndex="2" /> <dx:PivotGridField Area="FilterArea" AreaIndex="10" FieldName="ContractCode" ID="fieldContractCode" Caption="Contract Code" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="11" FieldName="NoOfExtension" ID="fieldNoOfExtension" Caption="Extension Option" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="12" FieldName="ContractAbstract" ID="fieldContractAbstract" Caption="Abstract" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="13" FieldName="ContractInternalCostCenterOwnerName" ID="fieldContractInternalCostCenterOwnerName" Caption="Internal Cost Centre" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="14" FieldName="ClientContact" ID="fieldClientContact" Caption="Client Contact" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="15" FieldName="Durations" ID="fieldDuration" Caption="Duration" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="16" FieldName="SignedBYTheCompany" ID="fieldSignedByTheCompany" Caption="Signed by the Company" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="17" FieldName="SignedWithinDelegation" ID="fieldSignedWithinDelegation" Caption="Signed Within Delegation" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="18" FieldName="ContractGroupName" ID="fieldContractGroupName" Caption="Contract Group" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="19" FieldName="AsCreatedate" ID="fieldCreateDate" Caption="Create Date" GroupInterval="Date" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="20" FieldName="AsCreatedate" ID="fieldCreateDateYear" Caption="Contract Creation" GroupInterval="DateYear" Visible="False" GroupIndex="4" InnerGroupIndex="0" /> <dx:PivotGridField Area="FilterArea" AreaIndex="20" FieldName="AsCreatedate" ID="fieldCreateDateQtr" Caption="Quarter" GroupInterval="DateQuarterYear" Visible="False" GroupIndex="4" InnerGroupIndex="1" /> <dx:PivotGridField Area="FilterArea" AreaIndex="20" FieldName="AsCreatedate" ID="fieldCreateDateMth" Caption="Month" GroupInterval="DateMonth" Visible="False" GroupIndex="4" InnerGroupIndex="2" /> <dx:PivotGridField Area="FilterArea" AreaIndex="21" FieldName="ContractDescription" Caption="Contract Description" ID="fieldContractDescription" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="22" FieldName="ContractSuppliers" Caption="Suppliers" ID="fieldContractSuppliers" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="23" FieldName="ContractActivityStatusName" ID="fieldContractActivityStatusName" Caption="Activity Status" /> <dx:PivotGridField Area="FilterArea" AreaIndex="24" FieldName="EndedDays" ID="fieldEndedDays" Caption="Ended Days" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="25" FieldName="EndedWeeks" ID="fieldEndedWeeks" Caption="Ended Weeks" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="26" FieldName="EndedMonths" ID="fieldEndedMonths" Caption="Ended Months" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="27" FieldName="EndedQtrs" ID="fieldEndedQtrs" Caption="Ended Qtrs" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="28" FieldName="EndedYears" ID="fieldEndedYears" Caption="Ended Years" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="29" FieldName="EndingDays" ID="fieldEndingDays" Caption="Ending Days" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="30" FieldName="EndingWeeks" ID="fieldEndingWeeks" Caption="Ending Weeks" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="31" FieldName="EndingMonths" ID="fieldEndingMonths" Caption="Ending Months" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="32" FieldName="EndingQtrs" ID="fieldEndingQtrs" Caption="Ending Qtrs" Visible="False" /> <dx:PivotGridField Area="FilterArea" AreaIndex="33" FieldName="EndingYears" ID="fieldEndingYears" Caption="Ending Years" Visible="False" /> </Fields> </dx:ASPxPivotGrid>

                                    Sorry for mark-up overload. I don't usually send so much, but given how poorly the results are, I figured your beta tester would want the lot.

                                    And here is a screenshot of the UI, which is also correct. But have a look at the attahced XLS. In particular the second data row which should be showing numbers (Ended Years or How long ago a thing Ended).

                                    I did attempt to export in other formats like XLSX and HTML - all of which are consistently wrong. Consistent in that the XLS looked like the XLSX which looked like the HTML. But wrong in that none of them export looking anything like the UI.

                                    I only found this by accident because originally I had OnFieldValueDisplayText handler to convert those numbers into more human-readable data (eg "0" becomes "This Year"). I mention this because even though I checked which field we are processing (the EndedYear field) it was giving me ContractName values. And obviously you can't convert a ContractName to an Int32 - hence I started to debug it.

                                    In other words, the bad data created by the export can be "debugged" in OnFieldValueDisplayText and I could see the bad data flowing in.

                                    So wrong data in columns, and totals all over the shop... Let me know if a video helps, but hopefully this is enough.

                                    Oh, and here is the code that actually does the export - also very plain-jane...

                                    [C#]
                                    DevExpress.Web.ASPxPivotGrid.PivotXlsExportOptions xlsOptions = new DevExpress.Web.ASPxPivotGrid.PivotXlsExportOptions(); switch (comboExportFormat.SelectedIndex) { case 0: xlsOptions.ExportType = DevExpress.Export.ExportType.WYSIWYG; ASPxPivotGridExporter.ExportXlsToResponse(sExportFilename, xlsOptions, bSaving); break; [SNIP] } }

                                    regards,
                                    -randall

                                • John (DevExpress Support) 08.13.2019

                                  Hello Randall,

                                  I have not managed to reproduce this issue on my side with a sample project created based on your code snippet. Would you please modify the attached project to demonstrate the issue?

                                • Randall Sell 08.13.2019

                                  Hi,

                                  I haven't yet revved up your sample, but I am noticing something which might be a red-flag indicator that something isn't right...

                                  Has DX changed the behaviour of opening/closing a dimension? It used to be the little + and - I could click to open/close a data area (dimension). Now what I am seeing is very inconsistent. I can open a close dimension, and it opens. But if I click it again, it does not close.

                                  Likewise, if I open a different dimension, it will close the other dimension that was open. It kinda smells of some view-state weirdness if I had to have a wild guess. But we do not tinker with the pivot's EnableViewState. Likewise I've removed all event handlers on the pivot just to be sure I'm not doing something ultra-stupid in there.

                                  Here a video of the weird behaviour. Unsure if it relate to this or not, but considering my Export results are WAY off, it seems plausible...

                                  -randall

                                1 Solution

                                Creation Date Importance Sort by

                                Hi,

                                We can close this case, and chalk up the problem to me being a retard.

                                I was doing this in PageLoad of the UserControl:

                                [C#]
                                protected void Page_Load(object sender, EventArgs e) { this.DataBind(); // IMPORTANT! this needed for button's dynamically generated client-side Click event handlers }

                                It should have been this:

                                [C#]
                                protected void Page_Load(object sender, EventArgs e) { rblFilterType.DataBind(); // IMPORTANT! this needed for button's dynamically generated client-side Click event handlers }

                                Only the RadioButtonList needs to dynamically assign event handlers. I had copy/pasted the line from another control and didn't replace this with the object that really needed binding.

                                So there ya go... the moral of the story is DO NOT do a DataBind on a Pivot control during callbacks/postbacks or your pivot will malfunction horribly - not terribly surprising once you know what is going on.

                                cheers,
                                -randall

                                • John (DevExpress Support) 08.14.2019

                                  Hello Randall,
                                  I am happy to hear that you have resolved this issue.