|
Re: Parameters [message #789239 is a reply to message #788853] |
Thu, 02 February 2012 19:17 |
|
You need to use a cascaded parameter to one parameter affect another.
Look at the attached example.
Jason
On 2/2/2012 4:45 AM, Bryan Jasso wrote:
> I want to use dynamic combo-box parameter.
>
>
>
> But data set for this combo-box use parameter too. It's Date.
>
>
>
> How can I do it?
|
|
|
|
|
|
|
Re: Parameters [message #792344 is a reply to message #791613] |
Mon, 06 February 2012 22:39 |
|
Is that date parameter the first parameter in a cascade? It has to be
to affect the next set of parameters.
Jason
On 2/5/2012 10:20 PM, Bryan Jasso wrote:
> As you can see on screenshot, I've already use calendar widget. It's not
> a question.
> Problem is How to use date from this parameter (from calendar widget) in
> other parameters.
|
|
|
|
Re: Parameters [message #793140 is a reply to message #792522] |
Tue, 07 February 2012 20:25 |
|
Bryan,
The best way to do this is to probably design your own parameter page
using JSP Tag Library. I am attaching an example JSP page that you can
add to the viewer and run it. I am also attaching a report. The JSP
simply hides the first level in the cascade and then adds another box to
enter a country name. When the country is entered the the second level
of the cascade is re-fired.
The JSP has the following code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/birt.tld" prefix="birt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script language="JavaScript">
function changeCountry(){
var first = document.getElementById("5");
var newval = document.getElementById("4");
first.value = newval.value;
//alert("here" + first.value);
first.onchange();
//alert( first.selectedIndex );
return false;
}
</script>
</head>
<style type="text/css">
..class1 { background-color:#ffffff; color: #000000; display: none }
</style>
<body>
Parameter Page 1
<br>
Enter Country:
<input type="text" id="4" value="USA"
onchange="JavaScript:changeCountry()"/>
<birt:parameterPage
id="report1"
name="page1"
reportDesign="cascade_report.rptdesign"
isCustom="true"
pattern="frameset">
Cascading Parameter1 This parameter is hidden: <birt:paramDef id="5"
name="Country" value="USA" cssClass="class1"/>
<br><br>
Cascading Parameter2: <birt:paramDef id="6" name="City"/>
<br><br>
Cascading Parameter3: <birt:paramDef id="7" name="Customer"/>
<br><br>
<input type="submit" name="submit" value="Sumbit form"/>
<br><br>
</birt:parameterPage>
<br>
</body>
</html>
Jason
On 2/6/2012 11:36 PM, Bryan Jasso wrote:
> Jason Weathersby wrote on Mon, 06 February 2012 17:39
>> Is that date parameter the first parameter in a cascade? It has to be
>> to affect the next set of parameters.
>
>
> I can't add Date parameter to cascade, because in cascade I can use only
> data from dataSet. Isn't it?
|
|
|
|
Re: Parameters [message #794793 is a reply to message #794329] |
Thu, 09 February 2012 17:59 |
|
If your parameter page has:
isCustom="true"
The default parameter page should not be launching unless a required
parameter is not set.
Jason
On 2/9/2012 1:35 AM, Bryan Jasso wrote:
> Thanks. I made JSP Parameter page:
>
> And I can select Date here. Then press "Submit" and get Parameter page, where I can select Company for that day.
>
>
> But can I refresh and select parameter Company on JSP page too? and skip then Parameter page.
>
|
|
|
|
Re: Parameters [message #795536 is a reply to message #795078] |
Fri, 10 February 2012 15:31 |
|
You have to have BGName and Data parameters in a cascade. btw I do not
see the parameter "Date"(Might want a better name for the parameter) in
your design. It should be the first level in the cascade, and you might
just want to link it to a dummy data set, because you are technically
not going to use its value. You will be setting it with the calendar.
Jason
On 2/9/2012 10:10 PM, Bryan Jasso wrote:
> <%@ page language="java" contentType="text/html; charset=UTF-8"
> pageEncoding="UTF-8"%>
> <%@ taglib uri="/birt.tld" prefix="birt" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> <title>Insert title here</title>
>
> <script language="JavaScript">
> function changeCountry(){
>
> var first = document.getElementById("8");
> var newval = document.getElementById("25");
> first.value = newval.value;
> //alert("here" + first.value);
> first.onchange();
> //alert( first.selectedIndex );
> return false;
> }
>
> </script>
>
>
> <SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>
> <SCRIPT LANGUAGE="JavaScript">var cal = new CalendarPopup();</SCRIPT>
>
> </head>
> <style type="text/css">
> class1 { background-color:#ffffff; color: #000000; display: none };
> </style>
>
>
> <body>
>
> <FORM NAME="example">
> <INPUT TYPE="text" id="25" NAME="Date" VALUE="" SIZE=25 onClick="cal.select(document.forms['example'].Date,'25','yyyy-MM-dd'); return false;" onmouseout="JavaScript:changeCountry()"/>
> </FORM>
> <button onClick="JavaScript:changeCountry()">Выбрать</button>
>
> </birt:param>
> <birt:parameterPage
> id="report1"
> name="page1"
> reportDesign="cascade_report.rptdesign"
> isCustom="true"
> pattern="frameset">
>
> Parameter Date: (This parameter is hidden)<birt:paramDef id="8" name="Date" cssClass="class1"/>
> <br><br>
> Parameter Company:<birt:paramDef id="9" name="BGName"/>
> <br><br>
> <input type="submit" name="submit" value="OK"/>
> <br><br>
> </birt:parameterPage>
> <br>
> </body>
> </html>
> But parameter named "BGName" don't reload when I change parameter "Date".
>
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02339 seconds