heneghae Posted June 13, 2016 Report Share Posted June 13, 2016 Hi, I am trying to create a date range of "3 days before" and "3 days after" the date submitted (as well as the date submitted itself). So e.g. I enter 10th of July and get back the data relating to 7th of July to 13th of July inclusive. Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 14, 2016 Report Share Posted June 14, 2016 Separate your search and report in two pages. In report page, include this date field to Configure Fields and add criteria to it for the first one check to receive [@from] and select "Comparison type" as "greater than or equal" and for second criteria receive [@to] and select "Comparison type" as "Less than or equal" . In the submission page which is acting as search add a virtual field 1 and enable calendar pop up. Add two more hidden virtual fields. Virtual Field 2 is sending out [@from] and VirtualField3 is sending out [@to] as parameter Add the code below to the footer of the page <script> document.getElementById("Submit").onmouseover = function(){ var d=document.getElementById('cbParamVirtual1').value; var date= new Date(Date.parse(d)); var from = (date.getMonth() + 1) + "/" + (date.getDate()-3) + "/" + (date.getFullYear()); var to = (date.getMonth() + 1) + "/" + (date.getDate()+3) + "/" + (date.getFullYear()); document.getElementById("cbParamVirtual2"). value = from; document.getElementById("cbParamVirtual3"). value = to; } </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.