Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Cascading Parameter
Bryan_Jasso
Find more posts tagged with
Comments
Bryan_Jasso
nobody knows?
mwilliams
So, your date and name are in the same dataSet and you want to have the first parameter choose a date and the second show the names based on the date parameter? What are you currently doing?
Bryan_Jasso
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="94946" data-time="1328247853" data-date="02 February 2012 - 10:44 PM"><p>
So, your date and name are in the same dataSet and you want to have the first parameter choose a date and the second show the names based on the date parameter? What are you currently doing?<br /></p></blockquote>
<br />
No. Date is not in dataSet. Date is picked from calendar.<br />
Bryan_Jasso
If Date was in dataSet, I found example how to make it. But it can be any Date(
mwilliams
Ah, I see what you mean, now. You may have to create your own parameter page to do this. Without the date being a value from a dataSet, there isn't a way to limit the first cascading parameter with this date, that I can think of. I'll update this if I think of a way.
Bryan_Jasso
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="94993" data-time="1328311244" data-date="03 February 2012 - 04:20 PM"><p>
Ah, I see what you mean, now. You may have to create your own parameter page to do this. Without the date being a value from a dataSet, there isn't a way to limit the first cascading parameter with this date, that I can think of. I'll update this if I think of a way.<br /></p></blockquote>
Thanks. I made JSP Parameter page:<br />
mwilliams
So, you never want to see the default parameter page, right? If so, it shouldn't show if you make the parameters "hidden" in your design.
Bryan_Jasso
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="95556" data-time="1328841504" data-date="09 February 2012 - 07:38 PM"><p>
So, you never want to see the default parameter page, right? If so, it shouldn't show if you make the parameters "hidden" in your design.<br /></p></blockquote>
Yes, I don't want to see Parameter page. I want to select both parameters on JSP page. But now when I change "Date" on JSP, "Company" combobox don't reload, it has no items to select from list.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><%@ 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></pre>
Tubal
Do you have a Start Date and End Date to filter your dataset?
I don't understand how you're filtering your company names by one date if the date isn't in the dataset already.
Seems like you should be able to use a cascading parameter with the one dataset, choose your date, and then choose your company name?
What will happen when they enter a date that doesn't return any companies?
Bryan_Jasso
<blockquote class='ipsBlockquote' data-author="'Tubal'" data-cid="95563" data-time="1328853443" data-date="09 February 2012 - 10:57 PM"><p>Do you have a Start Date and End Date to filter your dataset?</p></blockquote>Yes. This "Date" is a first parameter. I showed this on screenshots.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'Tubal'" data-cid="95563" data-time="1328853443" data-date="09 February 2012 - 10:57 PM"><p>I don't understand how you're filtering your company names by one date if the date isn't in the dataset already.</p></blockquote>"Date" is parameter for Dataset, which returns Company names. And this is a problem. I couldn't get company names for entered date on JSP page. So now I enter Date on JSP and leave blank Company field. Then opens standart Parameter page, where I can select Company for date, selected on previous (jsp) page.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'Tubal'" data-cid="95563" data-time="1328853443" data-date="09 February 2012 - 10:57 PM"><p>Seems like you should be able to use a cascading parameter with the one dataset, choose your date, and then choose your company name?</p></blockquote>There are millions of dates in a table.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'Tubal'" data-cid="95563" data-time="1328853443" data-date="09 February 2012 - 10:57 PM"><p>What will happen when they enter a date that doesn't return any companies?<br /></p></blockquote>Nothing happens. No companies - no report.
Bryan_Jasso
Thanks. Solved. ?reated a fake dataset: "SELECT ? AS DATE_1 FROM DUAL" and used it in cascade parameter.