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

10 posts, 0 answers
  1. Thapanee
    Thapanee avatar
    1 posts
    Member since:
    Dec 2011

    Posted 20 Jun 2013 Link to this post

    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>
  2. Milena
    Admin
    Milena avatar
    224 posts

    Posted 24 Jun 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. TJ
    TJ avatar
    7 posts
    Member since:
    Feb 2009

    Posted 02 Jul 2013 Link to this post

    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.
  5. Milena
    Admin
    Milena avatar
    224 posts

    Posted 04 Jul 2013 Link to this post

    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.
  6. Greg
    Greg avatar
    6 posts
    Member since:
    Mar 2011

    Posted 25 Jul 2013 Link to this post

    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.



  7. Nils C.
    Nils C. avatar
    41 posts
    Member since:
    Oct 2009

    Posted 26 Jul 2013 Link to this post

    Hi,

    same issue broke all my Pivotgrid moduls. Is there a workaround?
  8. Greg
    Greg avatar
    6 posts
    Member since:
    Mar 2011

    Posted 29 Jul 2013 Link to this post

    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!
  9. Milena
    Admin
    Milena avatar
    224 posts

    Posted 30 Jul 2013 Link to this post

    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.
  10. Nils C.
    Nils C. avatar
    41 posts
    Member since:
    Oct 2009

    Posted 05 Aug 2013 Link to this post

    Hi Milena,

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

    Thanks
  11. Milena
    Admin
    Milena avatar
    224 posts

    Posted 05 Aug 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017