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

13»

Comments

  • <p>These are 2 completely different crosstabs.  The easiest way to do this is to create both crosstabs under each other whilst disregarding the parameter values in the crosstab definitions, but setting the visibility of the crosstab depending on the parameter values.</p>
    <p>You can repeat this for as many parameter combinations as are relevant.  Just make sure only the corresponding crosstab is visible.</p>
  • <blockquote class="ipsBlockquote" data-author="mogwai" data-cid="145704" data-time="1477909610">
    <div>
    <p>These are 2 completely different crosstabs.  The easiest way to do this is to create both crosstabs under each other whilst disregarding the parameter values in the crosstab definitions, but setting the visibility of the crosstab depending on the parameter values.</p>
    <p>You can repeat this for as many parameter combinations as are relevant.  Just make sure only the corresponding crosstab is visible.</p>
    </div>
    </blockquote>
    <p> </p>
    <p>Thanks for the prompt reply mogwai.</p>
    <p> </p>
    <p>My concern now would be that, I have 5 values for DropDown1 i.e. Year, Quarter, Month, Week and Day and for DropDown2, I have 50+ values i.e. Gender, Country, Bank Branch, Employment Type etc etc. Does that mean, I have to create 250+ odd crosstabs, one for each combination ? I was looking for some way to put these two dropdowns on report page and parametrize the Rows and Column headers that will change as per the selection in the two dropdowns!</p>
    <p> </p>
    <p>Best Regards</p>
  • <p>What you are trying to do is change the dimensions of your crosstab based on parameter values.  That's quite a different ball game than simply filtering your query.  Essentially you need to build the whole crosstab using Javascript.  The row dimensions aren't that hard because it is essentially a single group of hierarchical dimensions.  All you need to do is select which dimension to display based on the first parameter.  The columns present a different story.  Every single dimension needs to be pre-defined in the cube and then the crosstab must be built using Javascript.</p>
    <p>Since this is a different topic, I suggest you create a new topic titled 'Building a crosstab using parameters'.</p>
  • Hi,
    In the first couple of posts Michael references an attached report but I do not see an attachment. Would it be possible to get the report back into this thread? I would really like to see it since we have the same issue with our design.
    Thank you!
    B RGDS
    Hendrik

  • I have the same request for dropdown. I do not see the attachments that Michael is referring to as well. Can somebody please attach it?

    thanks

  • @mwilliams said:
    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.

    @JFreeman said:
    I've attached an example that demonstrates having two select elements and a button to trigger rerunning the report with the parameters selected.

     

    This example is a modified version of the original example report Michael attached.

    sorry i am new to this. can you please tell me how to see the attached report designs i am not able to see any report here.