• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

creating a parameter for the static value.

Hi is it possible for me to create a parameter for this number(-1) so that the user can enter any number from the parameter
i am having this in my record selection criteria
reporter.Lastoccurrence=dateadd("d",-1,currentdate)

so instead on -1 there should a dynamic value for which the user can change in the parameters. can any one help me with this how to do.,

Thank you,
Reddy.
0
varunogili
Asked:
varunogili
  • 3
1 Solution
 
mlmccCommented:
Where is this code?  If it is in the application as it appears just use the field name or variabel he enters it in.

mlmcc
0
 
varunogiliAuthor Commented:
i am using the below statements  in the record selection criteria

{NETCOOL_HISTORY.NODE} = {?Node} and
{NETCOOL_HISTORY.MANAGER} = {?Manager} and
{NETCOOL_HISTORY.LASTOCCURRENCE} >= dateadd("h",-4,currentdate)

and in the url i am  i am giving the node and manager as the parameters. in the same way how will i create one for the  dateadd('h",-4,currentdate) . i need only for -4  so that i can pass it in the url.

http://pc-oreddy/Reports/test.rpt?&user0=crystal&password0=crystal&promptex-Node="xsi/queue/jmon"&promptex-Manager="QUEUES"&promptex-Impact="Impact3"

so the user can get the desired result for the hours he enters.


Thankyou,
Reddy.
0
 
mlmccCommented:
Create another parameter - DayDiff

http://pc-oreddy/Reports/test.rpt?&user0=crystal&password0=crystal&promptex-Node="xsi/queue/jmon"&promptex-Manager="QUEUES"&promptex-Impact="Impact3"&promptex-DayDiff=-4



{NETCOOL_HISTORY.NODE} = {?Node} and
{NETCOOL_HISTORY.MANAGER} = {?Manager} and
{NETCOOL_HISTORY.LASTOCCURRENCE} >= dateadd("h",{?DayDiff},currentdate)

mlmcc
0
 
mlmccCommented:
Glad i could help

mlmcc
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now