Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Fetch Data based on Date Range input
New_Bee
<p>I have a report with one of the columns as Payment Date.<br><br>
I have to receive search parameter in the form of JSON where a date range will be there - start_date and end_date.</p>
<p>I need to show the data where Payment Date falls in the given date range.<br><br><strong>How do I write the script in beforeopen ?</strong></p>
<p> </p>
<p>Right now I'm hardcoding a json like :</p>
<p>jsonStr = "{\"start_date\":\"2013-01-01\", \"end_date\":\"2013-06-30\"}"</p>
<p>I'll parse the JSON and take out the values from both the keys(start_date and end_date).</p>
<p> </p>
<p><strong>How to use these to fetch the data as per the given date range?</strong></p>
<p> </p>
Find more posts tagged with
Comments
New_Bee
<p>I'm now able to generate the report as per given Date Range.</p>
<p> </p>
<p>I created two parameter placeholders in the query and linked them to report parameters.</p>
<p>Then in the beforefactory script, parsed the json to get the Start and End dates and assigned them to the respective report parameters.</p>
<p> </p>
<p> </p>
<p>Please let me know if there's any other way to generate similar report.</p>