Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: default dynamic paramter as current month -1month Post Reply Post New Topic
Author Message
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Topic: default dynamic paramter as current month -1month
    Posted: 10 Dec 2012 at 7:43am
Is there a way to set default parameter as current month -1 ?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 10 Dec 2012 at 9:17am

Not really.  There are some potential work-arounds for this, though.

 
You could work from two parameters.  The first will specify the parameter type as either "Last Month" or "Selected Date" and have a default value of "Last Month".  The second will be for the selected date or month and have a default value of something like 01/01/1900.  The filter in the Select Expert will then look something like this:
 
(
({?ParamType} = 'Last Month' and
{table.date_field} >= DateAdd("M", -1, Date(Year(CurrentDate), Month(CurrentDate), 1)))
or
({?ParamType} = 'SelectedDate' and
{table.date_field} >= {?DateParam})
)
 
-Dell
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.