Author Topic: [Closed] From and To Date in date prompt  (Read 1337 times)

Offline BIsrik

  • Statesman
  • ******
  • Posts: 473
  • Forum Citizenship: +12/-3
[Closed] From and To Date in date prompt
« on: 13 Oct 2005 11:48:36 pm »
Hi i have given a from and to date prompt for the report. The report works fine when the from and to dates are selected properly. If the end date is selected less than the start date the report executes and gives no data output. Thats ok.

Can this be checked before the report executes. Thats is to check whether the selected end date is greater than the start date. if yes, execute the report and if no then give and error instantly and not the execute the report at all.

Srik
« Last Edit: 17 Oct 2005 01:51:55 pm by ReportNet Addict »

Offline wink

  • Full Member
  • ***
  • Posts: 16
  • Forum Citizenship: +1/-1
Re: From and To Date in date prompt
« Reply #1 on: 14 Oct 2005 01:17:33 pm »
Hi,

I think there will be a 'HTML item' solution possible.... I'll look into that one as I think the solution might be very usefull..... for now, a getting around solution....: First, you must be using two parameters for your period; the in_range on 1 parameter filter will not work in this solution.

Create a boolean variable which checks date_start prompt < date_end prompt. Use this variable for a conditional block to show a 'finish' prompt button. To activate this use a 'reprompt' button which you could call something like 'check values'...... Again, not the nicest solution but it works..... (just checked it  ;)) And yes, make sure you removed the standard prompt buttons from your prompt page....

Regards, wink

Offline BIsrik

  • Statesman
  • ******
  • Posts: 473
  • Forum Citizenship: +12/-3
Re: From and To Date in date prompt
« Reply #2 on: 15 Oct 2005 12:31:21 am »
Hi i created the variable and even added a conditional block for the finish button. the boolean variable reads as ?date start?<=?date end?. The report always executes for the condition no. I couldn't get the use of reprompt also.

Plz can u explain me once more ur approach...

 As of now, i have created a dataitem like this

dateitem1: if(?date start? > ?date end?)
                  then(1)
                 else(0)

And in filter i have given as [dataitem1]=0 and open-date between ?date start? and ?date end?

In this approach i am not able to display any text to the user that he has selected wrong date ranges...

Srik

Offline mrcool

  • Statesman
  • ******
  • Posts: 265
  • Forum Citizenship: +27/-28
Re: [Closed] From and To Date in date prompt
« Reply #3 on: 05 Nov 2007 10:04:14 pm »
hey hi Srik...if ur problem got solved plz share your solution...
Thanks