Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » populate textbox when radio button selected
populate textbox when radio button selected [message #1063845] Fri, 14 June 2013 13:09 Go to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
Hi,birt am currently doing report with Radio button and text box i.e
how to populate textbox when radio button selected and i have to pass some text in text box and it have to get result of parameter for charts
for example

i )country is Radio button if i select then TextBox have to populate in that i will pass a "india" so it have to produce a total sale of that country

ii)City is Radio button if i select then TextBox have to populate in that i will pass a "Tamil nadu" so it have to produce a total sale of that City

and then while i enter some text in text box it have to auto search a word in it....

how can i pass parameter for this type Report?


my jsp file:

<%@ 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>
<script type="text/javascript" language="Javascript">
function radioWithText(d)
{
document.getElementById('country').style.display = "none";
document.getElementById('state').style.display = "none";
document.getElementById('city').style.display = "none";
document.getElementById(d).style.display='inline';
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

<body>
<form name="radiowithtexbox">
Country<input type="Radio" name="radio2text" value="Radiobutton1"
onclick="javascript:radioWithText('country')" checked="checked" />

State<input type="Radio" name="radio2text" value="Radiobutton2"
onclick="javascript:radioWithText('state')" unchecked />

City<input type="Radio" name="radio2text" value="Radiobutton2"
onclick="javascript:radioWithText('city')" unchecked />

<div id="country" style="display:visible;">
<br>COUNTRY<input type="Text" name="A">
</div>

<div id="state" style="display:none;">
<br>STATE<input type="Text" name="B">
</div>

<div id="city" style="display:none;">
<br>CITY<input type="Text" name="C">
</div>
</form>

<birt:parameterPage
id="report1"
name="page1"
reportDesign="cascade.rptdesign"
isCustom="true"
pattern="run">



<birt:paramDef id="1" name="geography" style="display:none"/> </br>
Metrics:
<birt:paramDef id="2" name="MeasureToShow" />
</br>
<input type="Submit" value="Run Report" >


</birt:parameterPage>
</body>
</html>

here i attached a birt report



so can u provide a solution for this by correcting my report


thank u in advance
Re: populate textbox when radio button selected [message #1064057 is a reply to message #1063845] Mon, 17 June 2013 13:00 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member

can u guide for this report?

thank u in advance...........

Re: populate textbox when radio button selected [message #1064393 is a reply to message #1064057] Wed, 19 June 2013 05:19 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

I would think you could just create a list box parameter for country and city and use some visibility scripts in your custom parameter page to hide/show the appropriate one based on the radio button value.

Michael

Developer Evangelist, Silanis
Re: populate textbox when radio button selected [message #1064577 is a reply to message #1064393] Thu, 20 June 2013 04:21 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member





[Updated on: Thu, 20 June 2013 13:29]

Report message to a moderator

Re: populate textbox when radio button selected [message #1064670 is a reply to message #1064577] Thu, 20 June 2013 13:29 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thank u for reply.....sir,i have to customize report as shown in attached image and i attached a jsp and report design in sample db here for u r reference

for example :
one set of radio button and populate a list box or text box

item wise ---->A,B,C,D,E
main type---->A,b,c,d

another set of radio button and populate a list box or text box

country-->A,B,C,D,E
city---->A,B,C,D,E

if i select A From ITEM WISE and then I select B from COUNTRY result will be produced

and then again if i select A From ITEM WISE and then I select B from city result will be produced----

i have thought to pass parameter by url or by on click event but am struggling a lot

my question is how to pass parameter for this report in custom parameter page to hide/show the appropriate one based on the radio button value.


can u provide solution for this by correcting my jsp


thank u in advance















[Updated on: Thu, 20 June 2013 14:04]

Report message to a moderator

Re: populate textbox when radio button selected [message #1064984 is a reply to message #1064670] Sat, 22 June 2013 14:28 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
kindly reply for this post .........
Re: populate textbox when radio button selected [message #1065663 is a reply to message #1064984] Thu, 27 June 2013 05:09 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Sorry for the delay. I was busy with stuff for the BIRT 4.3 release and the new BIRT Exchange site. I'll take a look at your design and jsp in the morning.

Michael

Developer Evangelist, Silanis
Re: populate textbox when radio button selected [message #1065799 is a reply to message #1065663] Thu, 27 June 2013 14:07 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Your sample jsp, the parameters are hidden when you click the radio button. Is this not already doing what you're wanting?

Or are you looking for a sample that would show something like, if you click on the city radio button that the country parameter is disabled and if you click the country option, the city parameter is disabled? Let me know.


Michael

Developer Evangelist, Silanis
Re: populate textbox when radio button selected [message #1065869 is a reply to message #1065799] Fri, 28 June 2013 05:01 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thank u for reply .....sir if u look at that screenshot they are option like

i)item type, ii)main group, iii)sub group---as first separate parameter group
and then i have
i)Country ii) state iii) city ---> as second separate parameter group



suppose A)if i have to select a Radio button item type and then i can randomly select any Radio button from second separate parameter group result will be produce according to it..

B)if i have to select a Radio button main group and then i can randomly select any Radio button from second separate parameter group result will be produce according to it...

my query is :

SELECT distinct to_char(TRAN_DATE,'mm') as month,
TRAN_DATE,COUNTRY_NAME ,ZONE_NAME,STATE_NAME,CITY_NAME,area_manager,OUTLET_NAME,
GROUP_name,
SUB_GROUP_name,
ITEM_NAME,
sum(qty),sum(AMOUNT)
FROM OUTLET_ITEMWISE_FACT_BACK A,OUTLET_DETAILS B,WEB_ITEM_MASTER C
WHERE
A.OUTLET_ID=B.OUTLET_ID AND
A.ITEM_CODE=C.ITEM_CODE
group by COUNTRY_NAME,ZONE_NAME,STATE_NAME,CITY_NAME,OUTLET_NAME,ITEM_NAME,
SUB_GROUP_name,GROUP_name,area_manager,TRAN_DATE

so my question how can i Design the report and how to pass parameter in report
and how can i call in jsp....am struggling a lot for this report..

kindly provide sample report and jsp for this ..... at least for one option..



thank in advance

[Updated on: Fri, 28 June 2013 13:07]

Report message to a moderator

Re: populate textbox when radio button selected [message #1067048 is a reply to message #1065869] Fri, 05 July 2013 15:15 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Sorry for the delay. What is the part where you are stuck? Can you build a sample report and JSP up to the point where you are stuck moving forward? If you're just wanting to have the user select a radio button then input text, this should be pretty simple script in your report design to check the radio button value and modify your query accordingly. If it's for drop downs to select values from whatever field is chosen in the radio button, it'll be visibility script in the JSP page to hide show the appropriate drop down depending on the radio button selected. If, like in your first post, you're wanting suggested text entry, that's a feature in Actuate BIRT. OS BIRT doesn't have this out of the box. You'd have to build that part yourself. Let me know.

Michael

Developer Evangelist, Silanis
Re: populate textbox when radio button selected [message #1067386 is a reply to message #1067048] Mon, 08 July 2013 13:25 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thanks for reply ,i have got output for this report in my way

thank u
Re: populate textbox when radio button selected [message #1071242 is a reply to message #1067386] Fri, 19 July 2013 16:22 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Glad you got it working!

Michael

Developer Evangelist, Silanis
Previous Topic:2.6.2 report failures with BIRT 4.3
Next Topic:Can't load the Query
Goto Forum:
  


Current Time: Fri Apr 19 22:47:55 GMT 2024

Powered by FUDForum. Page generated in 0.03645 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top