Adding new drop down in birt report and changing query parameter based on value from dropdown
Options
Comments
-
<p>This isn't exactly what you're looking for, but it's an example showing the use of user entered information inside the design, then being able to rerun the report with that info. This should help you get what you're wanting. If you need a more exact example, let me know. <a data-ipb='nomediaparse' href='http://developer.actuate.com/community/forum/index.php?/files/file/785-user-specified-custom-sort-order/'>http://developer.actuate.com/community/forum/index.php?/files/file/785-user-specified-custom-sort-order/</a></p>
Warning No formatter is installed for the format ipb0 -
Actually I already added drop down using html script:
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<head>
<script>
populateTotalBalances();
function populateTotalBalances(obj)
{
var selIndex = obj.selectedIndex;
var balance = obj.options[selIndex].text;
alert(balance);
}
</script>
</head>
<body>
<form name="myForm">
<select id='totalBalancesDropDown' name='balance' onchange="javascript:populateTotalBalances(this)" style="width:40px;">
<option>1</option>
<option>5</option>
<option>10</option>
</select>
</form>
But now I need one report parameter(no. of record to display)in populateTotalBalances function which set 5 by default and that value will change based on value selected in drop down by user.
Can I pass it in 'populateTotalBalances(this)'?
It will be better if you can give me more exact example because I am new in birt report.
thanks...0 -
Sorry for not asking before. What's your BIRT version?
If you have a report parameter that you need to pass to the list as the default value, you can access report data, in <value-of> tags. Like, <value-of>params["myparam"]</value-of> would return the current value of the report variable, so you could set the default.Warning No formatter is installed for the format ipb0 -
Take a look at this report. The default value is set in the onCreate of the text box, by adding the selected=selected to the currently selected value. Onchange, the function to load the report is called. It changes the url of the page to have the new parameter value.
Hope this helps.Warning No formatter is installed for the format ipb0 -
<p>I did look for the ? but this is the query in the dataset:</p><p> </p><p>select CLASSICMODELS.CUSTOMERS.COUNTRY,
CLASSICMODELS.CUSTOMERS.CUSTOMERNAME,
CLASSICMODELS.PAYMENTS.CHECKNUMBER,
CLASSICMODELS.PAYMENTS.PAYMENTDATE,
CLASSICMODELS.PAYMENTS.AMOUNT
from CLASSICMODELS.CUSTOMERS,
CLASSICMODELS.PAYMENTS
where CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER = CLASSICMODELS.PAYMENTS.CUSTOMERNUMBER</p><p> </p><p>I was expecting to find</p><p>where CLASSICMODELS.CUSTOMERS.COUNTRY = ?</p><p>but where is it? There are also no Parameters configured in the data set. It's pure magic ;-).</p>0 -
<p>Ha. My mistake. I have two reports in 3.7 named similarly. I looked at the wrong one. I have ListBoxParameterInReport and ParameterListBoxInReport. Weird. Anyways, looking at the correct report, there is a beforeFactory script in the dataset that adds the appropriate line to the queryText:</p><p> </p><p><strong class='bbc'>if</strong> (params["Country"] != "All"){</p><p><strong class='bbc'>this</strong>.queryText = <strong class='bbc'>this</strong>.queryText + " and CLASSICMODELS.CUSTOMERS.COUNTRY = '" + params["Country"] + "'";</p><p>}</p><p> </p><p>Sorry about the confusion.</p>Warning No formatter is installed for the format ipb0
-
<p>Hi,</p><p> </p><p>I am getting the below IE error while trying to select the values in the drop down list on IV(web viewer). Any ideas as to why?</p><p> </p><p> </p> This program cannot display the webpage <div> </div> Most likely causes: <ul class='bbc'><li>You are not connected to the Internet. </li><li>The website is encountering problems. </li><li>There might be a typing error in the address.</li></ul> What you can try: Check your Internet connection. Try visiting another website to make sure you are connected. Retype the address. <span><a>Go back to the previous page.</a></span> <a></a> <span><a>More information</a></span> <p> </p><p>Thanks</p><p>UY</p>Warning No formatter is installed for the format ipb0
-
<p>when open the Design & code part it is giving error :</p><p> </p> 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.<p> </p><p> </p><p>please help me . I am looking for this topic .</p><p> </p><p> </p><p>Thanks</p><p>Munish Jindal</p><p> </p>0
-
<p>Hi, I have gone through ListBoxParameterInReport.rptDesign to add drop down and changing query parameter based on value from dropdown. I am trying to use same concept in my code but I am getting error "org.eclipse.birt.report.engine.api.impl.ParameterValidationException: Required parameter CASE_NAME is not set".</p>
<p> </p>
<p>Can you please help me that where I set the value?I am attaching my report for reference. I am using BIRT 4.4.1</p>
<p> </p>
<p>Thanks0 -
Open up your parameter in the data explorer and choose the drop down next to your parameter default value and choose the "constant" option.<br><br>OR<br><br>Change the default value to an expression "All".<br><br>That looks like it'll do it.Warning No formatter is installed for the format ipb0
-
<p>Thanks, Now error has gone but I can see only Ãll value in drop down. While I have modified onFetch script for ParameterDS as paramArrayLength = myParameterArray.length;<br>
myParameterArray[paramArrayLength] = row["CASE_NAME"]; where CASE_NAME is database field.</p>
<p> </p>
<p>Please let me where I have to do link to show all CaseNames in drop down.</p>
<p> </p>
<p>Thanks.</p>
0 -
<p>Thanks for your help.</p>
0 -
<p>I am able to add drop down in birt report and filter the value in table as per drop down selection. My requirement is to create PIE CHART as per drop down selection. Can you please provide me any example where to populate PIE CHART as per drop down selection? It will be greate help.</p>
<p> </p>
<p>Below I am explaining the same question in other way.</p>
<p> </p>
<p>I want to add new drop down in birt report which contain values and user can select any value which decide number of records to display in query And also how to access report parameter in html script to show PIE CHART?</p>
<p> </p>
<p>Thanks.</p>
0 -
<p>From what I can tell, your drop down is triggering a function to rerun the report and passing the value to the CASE_NAME parameter which is in turn applied into the query for the data set.</p>
<p> </p>
<p>As such, the data set should already be filtered which means you should be able to just add a Pie Chart and create it normally since your filtering is all happening at the Data Set level.</p>
<p> </p>
<p>Have you tried adding a Pie Chart to the design?</p>
Warning No formatter is installed for the format ipb0 -
<p>Yes, It works fine with some changes. I am looking one more help, need 2 drop down and populate the data as per both drop down selection. I am trying to do but as per selection of only first drop down, event is fired and gettign error. Need to populate both drop down and one button like OK and when user will click on OK then query will execute.</p>
<p> </p>
<p>Like 2 drop down 'Year ' and 'TASK NAME' ,Select both drop down and clicks on OK button. Please share with me if you have any example like same.</p>0 -
<p>I've attached an example that demonstrates having two select elements and a button to trigger rerunning the report with the parameters selected.</p>
<p> </p>
<p>This example is a modified version of the original example report Michael attached.</p>
Warning No formatter is installed for the format ipb0 -
<p>It works now and Thanks for your gr8 help. </p>
0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management