Adding new drop down in birt report and changing query parameter based on value from dropdown

Options
2

Comments

  • <p>I need 2 drop down and populate the data as per both drop down selection But 2nd drop down will also populate as per 1st drop down selection. Like if select Ýear' in first drop down then 2nd drop down will display '2010',2011 like and if select 'MONTH' then 2nd drop down display 'JAN', 'FEB' .</p>
    <p>When select both drop down and click on OK then will display records as both drop down selection. It will be greate help if provide me any sample code.</p>
    <p> </p>
    <p>Thanks.</p>
  • <p>I have to show BAR Chart in BIRT for 2 series(Y series) like Total Student and EmpStudent . I have created 2 DS for , one for Total and other for Emp and created 2 series also. But BAR chart not allowing me to use different DS for different series, Even If I am trying to do filter for 1 series, its works for both series.</p>
    <p> </p>
    <p>Please let me know if anyone can help me here.</p>
    <p> </p>
    <p>Thanks in Advance</p>
  • <p>A chart can only be bound to one data set.  You could create a joint data set if your 2 data sets have a common field - then bind your chart to the joint data set.</p>
  • <p>I am getting issue in BIRT Line Chart. I have to show X- Axis in Month and Y-Axis Data for Week as below figure.</p>
    <p>I am trying to do same work in BIRT but spaces or not coming between dates while till Data Set it looks like spaces in between Dates. Please let me know if have any solution. Thanks in Advance.</p>
  • <p>This sounds like a formatting issue but I can't find any figures attached.</p>
    <p>Since this has nothing to do with drop down lists I suggest you open a new topic.</p>
  • <p>hello guys ,</p>
    <p>  any body can help me to create a report with dropdown box, multiselect and 'al'l fields. i was seen many examples but i am not reached to certain point.</p>
  • <p>I've added a Word document explaining how this works.  I believe most of the content comes from earlier posts by Michael.
  • <p>dear mogwai,</p>
    <p>  i feel very happy replying  my request, i was developed one report as per documentation but it is showing all values at a time. when i am selecting the individual it shows some error. i am getting struck with to upload by report can you please tell me how to apply.</p>
  • <p>Dear Jalebi,</p>
    <p>This is a bit cryptic.  Can I suggest you try to apply your implementation to the standard BIRT database and upload your report.  It will give me a firmer basis to work from.</p>
  • <p>dear mogwai,</p>
    <p>  please find the below attachment. when i am selecting individual country to display the report it is showing some error. by default it is showing the records as per report parameter</p>
  • <p>It doesn't look like the file is attached Jalebi.  Use the 'More Reply Options' button at the bottom right, then the 'Choose File' button to select your file.  Don't forget to also click on 'Attach This File' after you have selected it.</p>
  • <p>find the below attachment.</p>
    <p> </p>
    <p> </p>
    <p>
  • <p>I see there is a mistake in my guideline.  The code in the beforeOpen event on your dataset should be:<br><strong><span style="color:#0070c0;"><span style="font-family:consolas;"><span style="font-size:10px;">if</span></span></span></strong><span style="color:#0070c0;"><span style="font-family:consolas;"><span style="font-size:10px;"> (params["Country"] != "All"){</span></span></span><br><strong><span style="color:#0070c0;"><span style="font-family:consolas;"><span style="font-size:10px;">this</span></span></span></strong><span style="color:#0070c0;"><span style="font-family:consolas;"><span style="font-size:10px;">.queryText = <strong>this</strong>.queryText + " WHERE CLASSICMODELS.CUSTOMERS.COUNTRY = '" + params["Country"] + "'";</span></span></span><br><span style="color:#0070c0;"><span style="font-family:consolas;"><span style="font-size:10px;">}</span></span></span><br>
    So replace the 'and' by 'WHERE'.</p>
  • <p>i was changed and deployed in server but it is showing  <span style="color:rgb(255,0,0);font-family:'Times New Roman';font-size:medium;font-style:normal;font-weight:normal;">-<span> </span></span><span style="color:rgb(255,0,0);font-family:'Times New Roman';font-size:medium;font-style:normal;font-weight:normal;">There is no report design object available. </span></p>
    <p>let me know the what is the problem</p>
  • <p>This is a deployment issue.  Make sure your line in the HTML code:</p>
    <p>window.location = "<a data-ipb='nomediaparse' href='http://192.168.1.145:8040/WebViewerExample/frameset??__report=test_01.rptdesign&Country='>http://192.168.1.145:8040/WebViewerExample/frameset??__report=test_01.rptdesign&Country="</a>+ value;  </p>
    <p>points to the right location.  Also, replace the double ?? by a single ?</p>
  • <p>dear mogwai,</p>
    <p>     now it's working very nice thanks for giving guide lines to develop the report. now i will start with my database to develop the same report. if i  have any technical query i will touch with you.</p>
  • <p>You're welcome Jalebi.  Glad to help.</p>
  • <p>hai mogwai,</p>
    <p>   here i am attaching  report and word document please go through.</p>
    <p>problem is it is generating the records default value "all" which is given in report parameter, when i am changing the value in report parameter it shows some error message find the word document. then check the query weather it is OK or not  (data is completely from my database)</p>
    <p> </p>
    <p>
  • <p>dear mogwai,</p>
    <p>  i was resolved the above problem please skip that</p>
  • <p>hello guys,</p>
    <p>      i hava a small clarification on dropdown. i want to develop my dropdown list with check boxes and scrolling is possible to do in report.</p>
  • <p>Hi Jalebi,</p>
    <p> </p>
    <p>The dropdown part is HTML.  It is not common to use check boxes in a dropdown, but it can be done with HTML and Java script.  You can find an example here:</p>
    <p><a data-ipb='nomediaparse' href='http://stackoverflow.com/questions/17714705/how-to-use-checkbox-inside-select-option'>http://stackoverflow.com/questions/17714705/how-to-use-checkbox-inside-select-option</a></p&gt;
    <p> </p>
    <p>It would be more typical to use a multi-select control or checkboxes without dropdown functionality (for a short list of options).  Examples are here:</p>
    <p><a data-ipb='nomediaparse' href='http://www.htmlcodetutorial.com/forms/_SELECT_MULTIPLE.html'>http://www.htmlcodetutorial.com/forms/_SELECT_MULTIPLE.html</a></p&gt;
    <p> </p>
    <p>Note that for multiple option selection you would also have to change the WHERE clause of the SQL of the query to IN instead of =.  I believe that is in the Word guideline I provided.</p>
    <p> </p>
    <p>Good luck.</p>
  • jalebi
    edited September 20, 2016 #53
    Options
    <p>dear mogwai,</p>
    <p>  i need how to sum the time values which contains series. here i used cross table for displaying rows into columns,please find the below attachment and screen shot . grand total also used by using column level but it displays only sum of hours in number format. can you please help me how to sum and result should be in time formate.</p>
    <p> </p>
    <p>Thanks & Regards</p>
    <p>Gopalakrishna.</p>
  • <p>dear buddies,</p>
    <p> </p>
    <p>  any body can help me , while creating a cross tab i am using parameters with multi select functionality . it is generating reprot but all records is showing shall in know why it happens. we can pass multi select values in cross tab or not please replay me .</p>
  • <p>Hi Jalebi,</p>
    <p> </p>
    <p>You can use your parameters in the crosstab filter, either when you define the data cube or in the crosstab itself.  Without your report design it is impossible to say why it is not working for you.  Perhaps you could attach it and briefly explain what you are trying to do.</p>
  • jalebi
    edited September 30, 2016 #56
    Options
    <p>hi Mogwai ,</p>
    <p> </p>
    <p> thanks for giving reply. my question is </p>
    <p>1. In cross tab we give functionality like muti select. ?</p>
    <p>2. please find the below attachment i was developed with my requirements.</p>
    <p>3.i used two parameters with dynamic option, in dataset i given some script to pass multiselect values.</p>
    <p>4. when i am  running i can able to give multiple options but data retriving is not filtering the as per multi select.</p>
    <p> </p>
    <p>here i will attach screen shots and developed report , so i am kindly requesting you please give some solution for that.</p>
    <p> </p>
    <p>Thank & Regards,</p>
    <p>Gopalakrishna.</p>
  • <p>Hi Jalebi,</p>
    <p> </p>
    <p>It looks like multiselect2.rptdesign is the report design to look at.  You are using 2 multi-select parameters and adding them to your query, but looking at the SQL you have written, they are being added in the wrong place.  The javascript you have written adds the filters at the end - in this case after the group by clause.  They need to be part of the where clause.  To test this, I suggest you remove or comment out your group by clause in the data set query and it should work (without the grouping).  I can't test this because I don't have your data source, but it is definitely not going to work the way you have written the sql currently.</p>
    <p> </p>
    <p>If it works when you remove the group by clause, you can put back the clause at the end of your script:</p>
    <p> </p>
    <p>this.queryText = this.queryText + " group by c.firstname,  b.cp_prjct_name, DATE_FORMAT(date(a.totaltime),'%d-%b-%Y %W') "</p>
    <p> </p>
    <p>For future reference, it is best if you simulate your problem in a simple report based on the Classic Cars database, so that anyone participating in this forum can run, test and edit your example.</p>
    <p> </p>
    <p>Hope this helps.</p>
  • <p>Hi Mogwai,</p>
    <p> </p>
    <p> </p>
    <p>      i will try with default existing data with my requirements. as soon as possible i will develop the report as per you suggested.</p>
    <p> </p>
    <p>Thankyou. </p>
  • <p>hi Mogwai,</p>
    <p> </p>
    <p> thank you so much , i was changed the condition as you said . now its working fine as per i need.</p>
  • <p>You're welcome.  Good luck with your report.</p>
  • <p>Great post. Gives some really good ideas. Thanks a lot. In somewhat similar lines, I have the following requirement:</p>
    <p> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">I want to design crosstab report with <span style="color:rgb(0,0,205);"><u>two Dropdowns boxes being displayed on the report viewer page</u></span> for the user to make selections.</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Dropdown1 item is <em>MIS Period</em> and has values = Year, Quarter, Month</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Dropdown2 item is <em>General Dimension</em> and has values: Gender, Country</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">When I select, Dropdown1 = <strong>Quarter</strong> and Dropdown2 = <strong>Gender</strong>, the crosstab report page should look like following:</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Dropdown1: Quarter            Dropdown2: Gender</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">                                              Gender</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Quarter                Male      Female Others</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">                                           SUM(Sales)</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Q4 2014                4000       2000       4000</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Q1 2015                1000       1000       2000</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Now, I want to change the Dropdown1 value to <strong>Year</strong> and Dropdown2 value to <strong>Country</strong>. So, when I set Dropdown1 = <b>Year </b>and Dropdown2 = <strong>Country</strong>, the crosstab report page should change into the below view:</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Dropdown1: Year                 Dropdown2: Country</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">                            Country</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Year       USA       India      Srilanka</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">                          SUM(Sales)</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">2014       4000       2000       4000</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">2015       1000       1000       2000</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">The headers should change and the crosstab should display values as per the new dimension selected.</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">How can I possibly achieve such a design in OpenText?</p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
    <p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Best Regards</p>