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)
Monthly Reports
BIRTGenesis
<p>hi</p>
<p>I have a report that monitors events delivered each month by individual staff.</p>
<p>The report works well except that I can't figure out how to have the report "start over"</p>
<p>on the first of every month? I manually go in and change the date so that last month is no longer valid and</p>
<p>only the present month will be searched.</p>
<p>thanks for your help.</p>
Find more posts tagged with
Comments
rgleason
<p>Hi, this looks like you might want to consider solving this problem in SQL. Basically evaluate the current date and show the report for the previous month, if it is not the first of the month. Otherwise and in addition, you can use scheduling if you happen to be using the commercial iHub and execute the report on the first of the month (or on any other frequency) and store it is as a report document, then over write with x-versions. </p>
BIRTGenesis
<p>hi</p>
<p>A little more detail.</p>
<p>The staff use the report as a live document. They have to provide each of their clients a particular service every month.</p>
<p>The report can be run at any time by the staff or supervisor to see where they are at in providing that service so that they can</p>
<p>see what they provided the day before and who still needs one.</p>
<p>When the first of the next month comes around, it starts over at zero services.</p>
<p>thanks</p>
shamo
<p>haven't tried yet but could you try using this filter on your dataset? datefield between BirtDateTime.firstdayofMonth(BirtDateTime.today()) and</p>
<p>BirtDateTime.today()). logic is picking firstday of the month on which you are running the report and the date the report is being run.</p>
rgleason
<p>Shamo is on the right track, looking at a rolling time range... I think the same might be done in the query as well, if you simply give a conditional where a whole month is specifically given. This way they can go back through historical months, as well as a current month in progress. A little more would need to be known of the database, but the idea is to get the first day of the month and max date for that same month and use this in the 'between' statement. In other words... it's some thing which might be solved in the query. </p>