This is a migrated thread and some comments may be shown as answers.

DateTime range grouping don't work after update to Q2 2013

9 Answers 120 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Thapanee
Top achievements
Rank 1
Thapanee asked on 20 Jun 2013, 09:04 AM
Since i updated telerik version to Q2 2013, my existing report didn't work anymore.
I use GroupInterval in Year, Quarter, Month and Day columns in sequence and i use ShowGroupsWhenNoData for Month, Day Columns.
It work find on the old version but after i upgrade new version it show only grand total.

any suggestion
<telerik:RadPivotGrid ID="RadPivotGrid1" runat="server" OnNeedDataSource="RadPivotGrid1_NeedDataSource" EnableToolTips="True" ShowColumnHeaderZone="False" ShowDataHeaderZone="False" ShowFilterHeaderZone="False" AggregatesPosition="Columns" Skin="Default" RenderEmptyStringInDataCells="True" OnCellDataBound="RadPivotGrid1_CellDataBound">
    
                                    <Fields>
                                        <telerik:PivotGridColumnField DataField="AssignmentWorkDate" GroupInterval="Year" IsHidden="False" UniqueName="Year">
                                        </telerik:PivotGridColumnField>
                                        <telerik:PivotGridColumnField DataField="AssignmentWorkDate" GroupInterval="Quarter" ShowGroupsWhenNoData="False" UniqueName="Quarter">
                                        </telerik:PivotGridColumnField>
                                        <telerik:PivotGridColumnField DataField="AssignmentWorkDate" GroupInterval="Month" ShowGroupsWhenNoData="True" UniqueName="Month">
                                        </telerik:PivotGridColumnField>
                                        <telerik:PivotGridColumnField DataField="AssignmentWorkDate" ShowGroupsWhenNoData="True" GroupInterval="Day" UniqueName="Date">
                                        </telerik:PivotGridColumnField>
                                        <telerik:PivotGridRowField DataField="ProjectName" ShowGroupsWhenNoData="False" Caption="Proj.">
                                        </telerik:PivotGridRowField>
                                        <telerik:PivotGridRowField DataField="Username" ShowGroupsWhenNoData="False" Caption="Res." CellStyle-ForeColor="#3333FF">
                                        </telerik:PivotGridRowField>
                                        <telerik:PivotGridAggregateField DataField="AssignWorkHourFormat" Aggregate="Sum" DataFormatString="{0:F2}" TotalFormatString="{0:F2}">
                                        </telerik:PivotGridAggregateField>
                                    </Fields>
</telerik:RadPivotGrid>

9 Answers, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 24 Jun 2013, 12:09 PM
Hello,

I tried to replicated the unwanted behavior as use the resources provided, but no avail. Please modify the project attached and let me know what I am missing in reproducing the problem.

Regards,
Milena
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
TJ
Top achievements
Rank 2
answered on 02 Jul 2013, 05:50 PM
Instead of using a named datasource like PivotGridProduct. Try using object as the wrapper and return an anonymous type.

Update: This issue only occurs when you use Datetime?. It will not group properly.
0
Milena
Telerik team
answered on 04 Jul 2013, 03:25 PM
Hello,

I am not sure that completely understand your scenario. Could you please provide a sample code, which demonstrates the specific behavior?

Regards,
Milena
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Greg
Top achievements
Rank 1
answered on 26 Jul 2013, 03:03 AM
I am having the exact same problem.   Thank goodness I found this forum, or I would have gone crazy trying to figure out what was wrong.

I have row and column fields that are a DateTime field type and the Q1 2013 PivotGrid works fine, both displaying the dates as just rows or columns, or using DateTime range groupings (ie monthly).

However, as soon as I drop in Q2 2013, in the exact same code, the PivotGrid breaks for all of the DateTime field types.  The DateTime fields won't display properly as rows or columns in the PivotGrid, and the grouping doesn't work either.   There is definitely a bug in the Q2 2013 PivotGrid code when making DateTime fields be row or colum pivot grid fields.



0
Nils C.
Top achievements
Rank 1
answered on 26 Jul 2013, 07:26 AM
Hi,

same issue broke all my Pivotgrid moduls. Is there a workaround?
0
Greg
Top achievements
Rank 1
answered on 29 Jul 2013, 09:16 PM
I was able to determine what the bug is in the 2013.2 release.

The problem is that in 2013.1 - if there was a null value in a date field, 2013.1 would handle it very gracefully, it would create a column that had "(blank)" for a heading and put that value in that column.

In 2013.2, if there is a null value in the date field (or even if the date field is just a nullable data type), it just refuses to render the entire column.

Here are two snippets from the project files that I attached that show the issue:

new Helper()
           
                                 
               // This next line will NOT work in 2013.2.611 or 2013.2.717, but it DOES work in 2013.1.417
               // In 2013.2.611/717, because of the null value the column field does NOT render at all - that is the problem.
               // In 2013.1.417, the null value shows up in a "(blank)" column, which I think is the best way to show it.
               AssignmentWorkDate= null,
               // AssignmentWorkDate=DateTime.Now.AddDays(2),
  
               ProjectName ="ProjectName3",
               Username="Username3",
               AssignWorkHourFormat= 1.3
           },

Here's the example that shows that a nullable datefield type breaks as well:

public class Helper
   
       // This next line will NOT work in 2013.2.611 or 2013.2 717, but it DOES work in 2013.1.417
       public Nullable<DateTime> AssignmentWorkDate { get; set; }
         
       //public DateTime AssignmentWorkDate { get; set; }
       public string ProjectName { get; set; }
       public string Username { get; set; }
       public double AssignWorkHourFormat { get; set; }
   }

I will also attach a screenshot showing the rendered column in 2012.1 and the non-rendered column in 2012.2

My application is in VB.net however, so I am assuming whatever fix you come up with will fix the issue in VB as well.

Please let me know if you have any questions.   I look forward to having a fix soon!  :)

Thanks!
0
Milena
Telerik team
answered on 30 Jul 2013, 11:15 AM
Hello Greg,

Thank you for the sample code provided.

Indeed I could replicate the same problem on my end. I am logging it as a bug in our tracking system and our developers will have the care to fix it. You can follow the status of the issue on the following link:

http://feedback.telerik.com/Project/108/Feedback/Details/54723-fixdatetime-rows-and-columns-of-radpivotgrid-are-not-rendered-when-they-are-null

Regards,
Milena
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Nils C.
Top achievements
Rank 1
answered on 05 Aug 2013, 12:34 PM
Hi Milena,

Is this already released in the last internal build? Can't see the change in the log.

Thanks
0
Milena
Telerik team
answered on 05 Aug 2013, 02:40 PM
Hello,

The fix will be part of our next internal build, which will be released tomorrow.

Regards,
Milena
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
PivotGrid
Asked by
Thapanee
Top achievements
Rank 1
Answers by
Milena
Telerik team
TJ
Top achievements
Rank 2
Greg
Top achievements
Rank 1
Nils C.
Top achievements
Rank 1
Share this question
or