Focal Point
drill down with date ranges

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6001058331

April 08, 2005, 06:38 PM
db
drill down with date ranges
I'm trying to modify a report written by someone who is long gone.

When I run the initial report, I select date ranges, and the output is just that. When I drill down it ignores the date range and gives me all the data. How do I put a date range in the drilldown?

TYPE=TITLE,COLUMN=P2,JAVASCRIPT=rankby('hrstats_rank03' 'NUMSESS' FMT),WHEN=FMT EQ 'H',$
TYPE=TITLE,COLUMN=P3,JAVASCRIPT=rankby('hrstats_rank03' 'NUMRPTS' FMT),WHEN=FMT EQ 'H',$
TYPE=TITLE,COLUMN=P4,JAVASCRIPT=rankby('hrstats_rank03' 'OUT_LINES' FMT),WHEN=FMT EQ 'H',$
TYPE=TITLE,COLUMN=P5,JAVASCRIPT=rankby('hrstats_rank03' 'AVGLINES' FMT),WHEN=FMT EQ 'H',$
TYPE=DATA,COLUMN=ACSTYPE,JAVASCRIPT=rptdrill('hrstats_rank01' '' ACSTYPE FMT),
WHEN=FMT EQ 'H',$
April 08, 2005, 07:54 PM
mgrackin
On the initial request, I assume the high and low date of the range where passed as amper variables. To retain these values, include them in the call to the JAVASCRIPT by including the amper variables in the stylesheet statement that calls the javascript function. Adjust your javascript function to handle them. I realize this is a generaic answer. If you need more details, let me know.
April 11, 2005, 06:37 PM
db
Yes, I need more details. Do you have a good example?
April 12, 2005, 03:51 AM
susannah
db, would you be kind enough to give us your javascript functions, as well? tia.
April 12, 2005, 03:42 PM
db
This is the function for the posted javascript

function rptdrill(fex,rpt,user,fmt) {
document.runfex.IBIF_ex.value=fex;
document.runfex.THISRPT.value=rpt;
document.runfex.USERTYPE.value=user;
document.runfex.FMT.value=fmt;
document.runfex.TABLENM.value='RANKHOLD';
document.runfex.submit();
April 12, 2005, 04:51 PM
TexasStingray
db, Looks like you need to create 2 new hidden fields in the runfex form section call them something like STARTDATE and ENDDATE. Then modify the rptdrill function to look somthing like this:

function rptdrill(fex,rpt,user,fmt , sdate, edate )
{
document.runfex.IBIF_ex.value=fex;
document.runfex.THISRPT.value=rpt;
document.runfex.USERTYPE.value=user;
document.runfex.FMT.value=fmt;
document.runfex.TABLENM.value='RANKHOLD';
document.runfex.STARTDATE.value = sdate;
document.runfex.ENDDATE.value = edate;

document.runfex.submit();
...
...
}

then modify the first report and add the start date range and the end date range. somthing like this.

TYPE=DATA,COLUMN=ACSTYPE,JAVASCRIPT=rptdrill('hrstats_rank01' '' ACSTYPE FMT &DATE1 &DATE2 ),
WHEN=FMT EQ 'H',$

you may need commas between the fields. Also replace &DATE1 and &DATE2 with the real variables that are used in the report.

Hope this helps
April 25, 2005, 08:46 PM
db
Tex, I followed your example, but I'm still having problems. Now when I click on the drill down I get an error "expecting an object". I'm a beginner java user and I don't understand the error.