SSRS Report Parameters Interactive - ssrs-2012

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.

Related

How pull in fields value from created parameter

I created a parameter [GroupID] that is used to query several datasets in my SSRS report. It is using the field [GroupID] from my GroupList_Rolling12 dataset. An example of [GroupID] is 77610N. When 77610N is selected, all of my datasets are correctly 'filtering' for this [GroupID].
I now need to create a text box that returns the [GroupName] of [GroupID]. In other words, when 77610N is selected from my GroupID parameter, I want the [GroupName] that is associated with the selected GroupID parameter to display.
I'm still very new to SSRS and cannot figure this out. I tried creating the expression =First(Fields!GroupName.Value, "GroupList_Rolling12") but that did not work since it simply returns the first value from the query.
I also tried =First(Parameters!GroupID.Value(0)) but this also did not work
I also tried this expression =Lookup(Fields!GroupID.Value, Fields!GroupID.Value, Fields!GroupName.Value, "GroupList_Rolling12")
)
Can you please help?
You can reference the parameter label directly like this
=Parameters!GroupID.Label
There is no need to put the index on the end (=Parameters!GroupID.Label(0)) unless your parameter is multi-value, in which case it would select the first selected entry.

Catching user input from popup with validation?

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.

JMeter - Need to submit POST data but I only wish to modify a single field

I'm running some JMeter tests for editing a field. If I use the JMeter HTTP(S) Test Script Recorder, I can get an accurate representation of the page and edits I made.
It creates a HTTP POST request with a parameter for every field, checkbox and dropdown on the page. I only really care about modifying ONE of them.
My problem is I can't just remove all the other parameters from the POST data because the page interprets this as if I removed all of them from the page (and then complains that there's missing data). So I'm left with trying to obtain the current values for the remaining editable fields and checkboxes so that I can re-submit them when I only want to modify a single field.
For an example, imagine I'm submitting some user data with fields for Name, Email and Address. I want to change the name by adding a 1 to the end of it and leave the other two fields as they are.
My thoughts for accomplishing this:
1) Use XPath to try to get the values shown on the page, store them all in variables and re-submit them in the post request. This is messy and also very difficult as the page is shown in a pop-up window, adding to the complexity of it.
2) Query the database for all the information and re-submit it. Seems like a lot of overhead, plus the data isn't freely available .. I'd rather not have to try to do this.
3) Use some other element of JMeter I'm not aware of to obtain the specific element data from the page. Maybe some listener I haven't figured out yet? If I could pull the parameters from the page and save them, that would be VERY convenient.
4) Somehow submit a POST request with only one field, specifying that I do not wish to clear out the remaining fields, I just want to leave them alone. I will freely admit that I am not super familiar with web applications so there may be a very obvious reason as to why this can't be done (or it's dependent on how its handled by the back-end of the application).
Thoughts?
From the whole post, I understand that you want to parameterise a field, where each time different value will be passed.
If my understanding is correct, the answer lies in CSV Dataset Config, where you can pass the values from a CSV file.
From your Example:
For an example, imagine I'm submitting some user data with fields for
Name, Email and Address. I want to change the name by adding a 1 to
the end of it and leave the other two fields as they are
To achieve this:
Steps to follows:
Create a csv file. fill the names as follows:
names
name1
name2
name3
name4
names is the column header and remaining are values.
Add CSV Dataset Config to your Test Plan.
Specify the file path.
replace the value in the name field in HTTP Post request as ${names}. that's it.

Live field update in form in Access 2013

So I'm somewhat new to access 2013, anyways, I've created a form in access 2013 based directly off a table, so no queries involved if that matters, and what I'm trying to do is just have a text box that updates the total value of 3 different fields as they're entered.
right now it's just a plain-text box, the control source is "=[Search Cost]+[Update Cost]+[Copy Cost]", and if I close the form entirely and reopen the record it updates the text box with the total for all three, but the customer wants it to update in real time. Any suggestions?
I just tried your scenario in Access 2013 on a simple form and it updated for me in real time as I entered values. However, that was because each of the three fields values had a Default Value of 0 in my test table.
So I suspect this is not updating for you in real time because one or more of those values is null while you are entering data in the form. Access doesn't know what [Some field value]+Null should be (it's an unknown thing) so it won't display a calculated value in real time on your form until you provide a value for each of the three fields.
So how can you get around this?
You can add a Default Value of 0 or some other value to each of the three fields at the table level.
Or you could modify your form expression to use the NZ function which will convert any null values to zero. So use this expression:
=Nz([Search Cost])+Nz([Update Cost])+Nz([Copy Cost])
Either of those options should achieve your end goal I believe. They did in my quick tests.

How do I add a Parameter for Multiple Customer Numbers?

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.

Resources