|
Re: Creating a parameter page [message #655192 is a reply to message #655172] |
Fri, 18 February 2011 15:15 |
|
Mike,
Are you using a drill down as defined in the hyperlink builder or just a
hyperlink?
Jason
n 2/18/2011 9:39 AM, Mike Wulkan wrote:
> I would like to create an initial report page that simply contains form
> controls for parameters that I'd like to pass to a drill down report.
>
> I created a checkbox control form and an image control (of a button) and
> set it's hyperlink to the report that I actually want to launch. So far
> so good.
> The problem is that I'd like to set the drill down parameter value to
> that of the checkbox control value:
> document.optionsForm.showDateCheckbox.checked
> but I don't know how to reference this value in the parameter script of
> the hyperlink? The above reference yields "document" is not defined.
|
|
|
|
Re: Creating a parameter page [message #655208 is a reply to message #655204] |
Fri, 18 February 2011 16:13 |
|
In the hyperlink builder are you choosing drill through or hyperlink?
On 2/18/2011 10:58 AM, Mike Wulkan wrote:
> If I understand what you are asking correctly, then I'm using the
> hyperlink builder (ie., the GUI dialog that comes up when you edit the
> hyperlink property of an image).
>
> Is there a better way?
|
|
|
|
Re: Creating a parameter page [message #655227 is a reply to message #655214] |
Fri, 18 February 2011 17:34 |
|
Mike,
In this case it may be simpler to just use a text element and do not
setup the drill through with the hyperlink builder.
For example look at this:
<script type="text/javascript">
function forwardtst(rpt) {
var temp = new String(location.href);
var detailReport = rpt;
var TargetURL = temp.replace(/checkboxdriver.rptdesign/, detailReport);
location.replace(TargetURL);
return false;
}
</script>
<table>
Detail.rptdesign: <INPUT TYPE="checkbox" NAME="Item1" VALUE="1"
UNCHECKED onClick="forwardtst('detail.rptdesign')">
<br>
Detail2.rptdesign: <INPUT TYPE="checkbox" NAME="Item2" VALUE="2"
UNCHECKED onClick="forwardtst('detail2.rptdesign')">
</table>
If the detail report contains parameters just add to the url in the
forwardtst function like &myparm=5
Attached is the report.
Jason
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.6.1.v20100902 Build <2.6.1.v20100915-1750></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property
name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<text id="7">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<script
type="text/javascript">
function forwardtst(rpt) {
var temp = new String(location.href);
//alert( temp );
var detailReport = rpt;
var TargetURL = temp.replace(/checkboxdriver.rptdesign/, detailReport);
//alert( TargetURL );
location.replace(TargetURL);
return false;
}
</script>
<table>
Detail.rptdesign: <INPUT TYPE="checkbox" NAME="Item1" VALUE="1"
UNCHECKED onClick="forwardtst('detail.rptdesign')">
<br>
Detail2.rptdesign: <INPUT TYPE="checkbox" NAME="Item2" VALUE="2"
UNCHECKED onClick="forwardtst('detail2.rptdesign')">
</table>
]]></text-property>
</text>
</body>
</report>
On 2/18/2011 11:44 AM, Mike Wulkan wrote:
> Drill through
|
|
|
|
Re: Creating a parameter page [message #655546 is a reply to message #655268] |
Mon, 21 February 2011 17:12 |
|
Mike,
the parameter xml file is only used in the designer. It is not used in
deployment. If you want to persist any variable between two reports you
can access the session like:
reportContext.getHttpServletRequest().getSession().setAttrib ute( "varname",
varvalue);
Jason
On 2/18/2011 4:34 PM, Mike Wulkan wrote:
> Thanks Jason, I got this working. Here is a quick related question.
> When using BIRTs built-in parameter dialog the parameter settings are
> persisted in a config file between runs. But if the report sets the
> value of a parameter from within say a script, the final value of the
> parameter is not persisted. Is there a way to get the value persisted so
> that a custom parameter page such as the one I am building can persist
> user settings between invocations?
|
|
|
Powered by
FUDForum. Page generated in 0.03539 seconds