【问题标题】:Crystal Reports Dynamically Grouping by DateCrystal Reports 按日期动态分组
【发布时间】:2014-04-30 20:36:38
【问题描述】:

我对 Crystal Reports 比较陌生,看起来这应该很容易,但经过大量谷歌搜索后,我无法弄清楚。我正在处理 Crystal Reports XI 中的报告,该报告将显示支持人员在某个日期范围内记录的总小时数,并根据用户输入按周、月或两者显示小计。我的报告目前安排如下:

Group 1 Header - Support Staff Member 
  Group 2 Header - Ticket Closed Date with section printed monthly
    Group 3 Header - Ticket Closed Date with section printed weekly
      Group 4 Header - Ticket Category
      Group 4 Footer - Sum of time logged in each category for the week
    Group 3 Footer - Sum of time logged in all categories for the week   
  Group 2 Footer - Sum of time logged in all categories for the month
Group 1 Footer - Sum of all time logged

我最初的想法只是在不需要第 2 组和第 3 组时取消页眉和页脚,但如果我手动执行此操作,它仍会按周和月打印记录。有没有办法根本没有分组,除非参数说要显示这些总数?或者如果这不是一个选项,我将如何使用该参数来更改组是每周还是每月打印记录?

谢谢

【问题讨论】:

    标签: crystal-reports


    【解决方案1】:

    最好的选择是创建一个字符串参数'option',其值每周和每月。

    现在创建一个公式分组。

    If ?parameter='weekly'
    Then //your weekly code here
    
    Else if ?parameter='monthly'
    Then //your monthly code
    

    现在在分组而不是多个组中使用这个公式。

    现在,当用户选择选项时,您的分组将动态更改。

    希望对你有帮助

    【讨论】:

    • 感谢您的回复@Siva。您为我指明了正确的方向,我发现此 site 可以帮助您处理每周/每月代码
    猜你喜欢
    • 1970-01-01
    • 2023-03-04
    • 1970-01-01
    • 2011-05-16
    • 2012-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多