dot-nugget

Code and Knowledgebase Site

Code and Knowledgebase Site for Rumery Enterprises, LLC. Tampa Bay area custom software developer

Crystal Reports Create Date Range Parameter

clock March 15, 2010 18:23 by author

Create a string parameter with the options you want. eg. lastFullWeek, lastFullMonth, YearToDate, etc...

then add a switch statement in the record selection formula editor like below

{@Post Date} in

Switch

(

     {?Period} = "Yesterday",

          (currentdate - 1) To currentdate -1,

     {?Period} = "LastWeek",

          Minimum(LastFullWeek) To maximum(LastFullWeek),

     {?Period} = "LastMonth",

        Minimum(LastFullMonth) To maximum(LastFullMonth),

     True, // provide default handling and specify a valid range

          CDate(2009, 12, 30) To CDate(2009, 12, 30)

) and



Crystal Reports keep together setting for groups

clock March 14, 2010 12:20 by author
To keep all of the detail records for a group together on a page by checking the "Keep Group Together" box in the change group options window. This will force the group to start on the next page if all of the records can not be shown on the same page.


Sign in