|
Re: how to get request url in scripting(drilldown using URI)? [message #635104 is a reply to message #634869] |
Mon, 25 October 2010 15:04 |
|
Dean,
Where do you have this script currently?
Jason
On 10/24/2010 2:41 PM, Dean Hiller wrote:
> I am trying to script in the drilldown URI field. Previously, I had
> "reports.xhtml?report=subs/Account_Statistics&accountno= "
> +row["ACCOUNTNO"]+"&type=HTML"+"&fromDate="
> +params["fromDate"].value+"&toDate="+params["toDate "].value":
>
> in my url, but I want to prepend it with
>
> baseUrl = servletCtx.getRequestUrl();
> "https://"+baseUrl+ <all the above url>
>
> How do I do that? It looks like I can script inside the URI in the xml
> source directly. Also, the second question is what do I call to detemine
> if I am in a pdf report, or xls report oor html report as it would be
> nice to override the type=HTML above to be the type the link I am
> generating for(otherwise, the pdfs are linked to an html report instead
> of the next pdf).
>
> any ideas on this?
>
> I was trying
> var ctx = icsc.getChartInstance();
> var rptCtx = ctx.getExternalContext().getScriptable();
> rptCtx.getHttpServletRequest().getRequestURL()+
> "reports.xhtml?report=subs/Account_Statistics&accountno= "
> +row["ACCOUNTNO"]+"&type=HTML"+"&fromDate="
> +params["fromDate"].value+"&toDate="+params["toDate "].value":
>
>
> but icsc is not found. how to bootstrap in getting into the context?
>
>
> thanks,
> Dean
>
>
|
|
|
Re: how to get request url in scripting(drilldown using URI)? [message #635105 is a reply to message #635104] |
Mon, 25 October 2010 15:20 |
|
BTW have you tried
if( reportContext.getHttpServletRequest() !=null){
var myurl =reportContext.getHttpServletRequest().getRequestURL();
var myout = reportContext.getOutputFormat();
}
Jason
On 10/25/2010 11:04 AM, Jason Weathersby wrote:
> Dean,
>
> Where do you have this script currently?
>
> Jason
>
> On 10/24/2010 2:41 PM, Dean Hiller wrote:
>> I am trying to script in the drilldown URI field. Previously, I had
>> "reports.xhtml?report=subs/Account_Statistics&accountno= "
>> +row["ACCOUNTNO"]+"&type=HTML"+"&fromDate="
>> +params["fromDate"].value+"&toDate="+params["toDate "].value":
>>
>> in my url, but I want to prepend it with
>>
>> baseUrl = servletCtx.getRequestUrl();
>> "https://"+baseUrl+ <all the above url>
>>
>> How do I do that? It looks like I can script inside the URI in the xml
>> source directly. Also, the second question is what do I call to detemine
>> if I am in a pdf report, or xls report oor html report as it would be
>> nice to override the type=HTML above to be the type the link I am
>> generating for(otherwise, the pdfs are linked to an html report instead
>> of the next pdf).
>>
>> any ideas on this?
>>
>> I was trying
>> var ctx = icsc.getChartInstance();
>> var rptCtx = ctx.getExternalContext().getScriptable();
>> rptCtx.getHttpServletRequest().getRequestURL()+
>> "reports.xhtml?report=subs/Account_Statistics&accountno= "
>> +row["ACCOUNTNO"]+"&type=HTML"+"&fromDate="
>> +params["fromDate"].value+"&toDate="+params["toDate "].value":
>>
>>
>> but icsc is not found. how to bootstrap in getting into the context?
>>
>>
>> thanks,
>> Dean
>>
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02745 seconds