I am trying to put in a variable a value that the user has to introduce from a popup.
I have seen the function POPUP_GET_VALUES can be the adiente, but in the parameters that the function requires I see that there is a table to put the value into a field. As it is a unique value, I would like to put it within a single variable previously defined, in order to also be able to establish limits for the user to enter the value, since it has to be a percentage.
Any ideas?
Thanks!
You can use FM POPUP_TO_GET_ONE_VALUE and specify texts you want. But you should then check the format of input. For POPUP_GET_VALUES you need a table and field to reference, it will check the format for you.
Related
I have a report that requires 3 parameters, all 3 has q query to pre populate them using a dataset for each, so the under their properties the available values is selected with the query. Default were also set to use the same query. This work fine.
My problem is when the user of the report wanted to enter the values themselves rather than going into the list populated by the query. Users know the value that they wanted to enter so it's faster for them to enter rather than select. SSRS report seems not to give you the ability to enter if you have set the available values and default values for some reason. Is their a way to go around this please?
Many thanks.
There is one straight forward way to use comma separated multi value parameter rather than list where user enters input.
Below link explains in detail, but I am quite sure you do not want to stick to below solution.
https://www.mssqltips.com/sqlservertip/3479/how-to-use-a-multi-valued-comma-delimited-input-parameter-for-an-ssrs-report/
Another thing you could do is keep your multi value parameter as list as it is and create a text input parameter.
Now if user want to simply choose from list fair enough you will have to handle second parameter as null because user chose from list.
Then on your dataset check and apply filter as 2nd parameter value as not null.
Same goes if user does text input then multi value parameter as not null.
Is that possible to get multiple parameter values based on another parameter value. For example if I select facility id ,then it should populate below region and FQA parameters.
I think you want to use cascading parameters. Check out this URL to see if it is close to what you are aiming for... https://www.eclipse.org/forums/index.php/t/503715/
What you need is a cascading parameter group. Here is an example video on how to use it.
I have an SSRs Report with a parameter that gets information from SQL. If it hasn't found anything, at the moment it is just empty. Is there anyway to set it such that if it's empty it will return a different value, say "Please Extend Date Ranges" and disable the parameter?
If you using it to fill it using the SQL and using it for only internal purposes then there is option to make the parameter internal and it will be hidden and it will does not prompt the user.
Make a change to the stored procedure or query that populates the parameter. Include some logic so that if no results are returned by the query you are using now, it adds a row with the default label you want.
But no, you can't disable the parameter dynamically, I don't believe.
I have a cube with Account Numbers stored as text strings. I need to create a report with a parameter that users can enter a list of Account Numbers.
I've created my query and in the filter I have "Account Number". The Operator is "equals" and I have ticked the Parameter check box.
If I run the report now, I can select multiple Account Numbers, but we have over 40,000 accounts so it can take a while to find and tick all the ones I want to report on. I want to be able to type or paste a list of Accounts.
If I go in to the Parameter Properties and set Available Values to "none" I can enter my list of accounts, but when I try to view the report I get this error.
The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated.
I'm guessing I have to go in to the Dataset Properties and do something to the Account Number parameter to format the list of accounts in the correct way, but I have no idea how to do it.
Does anyone have any ideas?
Thanks
David
I finally figured out how to do this.
Create your query with Account Number as a parameter.
In the #CustomerAccountNumber parameter, make sure its type is Text and tick Allow multiple values. Set Available Values to None and set Default Values to No default value.
Go to the properties of your dataset and go to Parameters. In the CustomerAccountNumber parameter set the Parameter Value to this:
=Split(“[Customer].[Account Number].&["+Replace(Join(Parameters!CustomerAccountNumber.Value,"],”)+”]”,”,”,”,[Customer].[Account Number].&["),",")
Now run your report and you should be able to type in a list of account numbers and get results for just those accounts.
I found my answer here.
I have to create a birt report with user input parameters. It is something like when the para
meter is left blank it should fetch all values from a table otherwise when the user inputs the students roll no.,the corresponding data should be fetched. Can this be done through Birt report? If yes, then please suggest a way.
Thanks!
Yes, you can do that. If the parameter is optional you can't use the Dataset Parameter (with a ? in your query), because it will be null. Instead you have to modify your query using JavaScript.
Create a Report Parameter like usual, in this case 'stud_no'. Then add a comment in your SQL that you are reasonably sure is unique, I use something like --$stud_no$, wherever you want your clause inserted.
Then add a script like this to your Data Set, in beforeOpen:
if (params["stud_no"].value){
this.queryText = this.queryText.replace("--$stud_no$", "and stud_no = " + params["stud_no"]);
}
This replaces the comment with the clause when the parameter has a value. You can use regex in the search string, and then you can also insert it multiple places if you want.
Create your paremater using a like statement
where students_roll_no like ?
Create your report paramater using as a text box, with a defualt value of %
Because the percent '%' is the SQL wildcard, it returns all values. If the user enters a Student Roll number, it returns only that record. Additionally the user can enter 0500% and get all the records that begin 0500.