SQL Server Report Builder Information in Parameter Pane - sql

Is it possible to show additional information in the parameter pane based on the parameter the user selects? What I would like to do is allow the user to select a store from the parameter dropdown list and after the user selects the store they would be able to see the Store name, street address, city, state and zip to ensure they selected the correct store before they 'View Report'.

Generally, this is not possible, but I can propose a workaround, which is a bit silly, though.
Create a dataset which takes a Store ID as a parameter and returns the store name, address etc.
Add another several report parameters of type text that will represent the name, address etc correspondingly, and set their default values to the required fields in the dataset created in step 1.
Link the dataset's parameter to the report Parameter Store.
Once a user selects a store from the parameter dropdown, the rest parameters will be populated with the data.
Hope it hepls.

Related

Laravel Jetstream how add custom input fields to the update user form

I have a question about laravel jetstream, in my application I use 2 tables to define information about a user. I have the users table and a table called fans that contains extra information about that specific role.
In the register function I was able to add custom input fields and send the information to the different database tables, in the CreateNewUser of Fortify.
When I tried adding these inputs in the update-profile-information.blade.php, i wanted the value of the input to be filled in with the information present in the database. I noticed that the values placed in the inputs are being controlled by wire:model.defer="state.something", but i cant figure out how to add information to the state so that the data from the fan table could also be set as values for input fields.

How to load parameter data based on the selection of another parameter?

I´m using BIRT Report Designer to create a report to obtain data of different tables.
Table 1:
ExhibitorStore:
IDExhibitor
IDStore
NameExhibitor
ExhibitionProduct:
IDExhibitor
IDStore
IDProduct
Each store have different exhibitors, and each exhibitor have different products.
So, I'm creating a BIRT that has a select list, that show a list of stores, and another select list that show the list of the exhibitors that belong to store.
I couldn't find a way to make that dynamic, when I change the store in the select list, change the list of exhibitors that belongs to the store.
This is image when I run the BIRT with default select option of stores, the exhibitor shows is right.
This is image when I run the BIRT with default select option of stores, and change value of select.
The options of exhibitors not change.
But if I change the option of the select show for default and I run the BIRT, show the exhibitors of the store that show for default.
Should I define some property in the parameter "Store" so that when change the option of the select list of store, the select of exhibitor is refreshed?
To achieve this behavior you have to create a cascading parameter group
You can download an example here:
https://download.eclipse.org/birt/downloads/examples/reports/2.1/cascade/cascade.rptdesign
A cascaded parameter group allows a group of parameters to be interlinked, where selecting a value for the first parameter affects the choices available in the subsequent parameters. Cascaded parameters can be tied to one or more Data Sets. The Data Sets populate each level of the cascade. Combined with Data Set parameters this offers very good flexibility for culling of returned data for a report.

Allow user to type in multi values instead of selecting

In SSRS 2008R2, how it is possible to allow a user type in multi values instead of selecting?
The report must have multiple filters and all are optional where user can select one or any parameter to filter. Transaction # and category code are parameters where its required allowing the user type in values or select.
Parameters are as below
from date:
To Date:
Transaction #:
Category code:
Using a multi value parameter where available values are based on a query is not a solution as the result will have a very long list and user wont be able to type in. thus we need the user to type the values to be filtered on.
transaction# is an integer and user may enter one or many or just keep it blank to get the result based on other used filters.
The following will work with an embedded query:
First set up your parameter with data type Text and to Allow multiple values.
Since the parameter needs to be optional, set a default value (such as All) and update the WHERE clause in your query to get results based on this parameter:
...
WHERE ('All' IN (#Customer) OR CustomerNumber IN (#Customer))
...
Now when you run the report you can highlight the default value in the dropdown:
and start typing in the values to search on (using Enter between each item):
the only solution integrated into SSRS i found so far is to sue single valued text parameters to be parsed by the underlying database.
multi-valued parameters are replaced by single valued parameters, your users can fill them as they please, you have to split/validate these input values in the report code or at the sql layer.
this is very quick to implement and integrated into SSRS but has some (imho) huge drawback: input validation and error handling.
if an external solution is an option you can go with an asp.net report viewer.
leveraging on web scripting, ajax and so on the input interface can be very user friendly while keeping SSRS as a backend to do the heavy work.

How to handle search for custom fields in form for FROM and TO fields?

I have just started implementing search module in a project, where I have a form with fixed fields consisting of combo box, text box, radio button etc (around 200 fields in multiple tabs), and later client should be able to add extra fields too. Once user fills the fields which he wants to search, that search criteria also he should be able to save. For all these reasons, for each field I am associating metadata in the following format.
"EntityName.attributeName": attributeValue
Once the user fills the form fields to search, I will validate form data and and only non empty fields metadata I am sending to server in JSON format. Everything is fine till now. But I am facing an issues now.
Using the metadata of each field I will create a new criteria for each field. but if there are fields where one field metadata depends on other field metadata I am struck.
In the form I have few special category fields in following format : for example DOB,
FROM DATE (meta data: entity1.dob)
TO DATE (meta data: entity1.dob)
both fields belongs to same entity and same column only field name in the UI is different
Like this I have around 20 fields which asks for FROM and TO to query the range (it need not be on date, for example no of bed rooms..it can be on integer, string etc)
My query formation should be in the following way depending on user search criteria. If user entered only FROM field of number of bed rooms then I have to query using EQUAL to operator in sql and if both mentioned then MORETHANEQUAL to for FROM field and LESSTHANEQUAL to for to field. So how I can handle this special case ?
like if he entered number of fields as 4 in TO field of number of bed rooms, then I have to query for houses having number of bed rooms equal to 4. but if in FROM he entered 3 and in To if he entered 7 then I have to query for houses having greater than or equal to 3 bed rooms and less than or equal to 7 bed rooms.
Since I have same metadata for these category fields also I am unable to proceed, to achieve this, what kind of metadata I need to prepare ?
How I can generalize this process to handle all the cases ?
my technology stack: ExtJs, Eclipse Link, spring.
and what are the best practices to follow to support custom fields adding feature in Forms in enterprise applications ?
Off of the top of my head, I would create wizards for these particular cases. So for example, have a custom wizard that allows the user to define a "from" field, a "to" field, and then the comparison operator in one action. This wizard could also be responsible for adding custom properties to the generated fields that could be used by your validation routine. So based on the combo of from, to, and operator, you could create a flexible validation mechanism for ensuring that correct values are entered, ranges are correct, whatever.
You might consider this "wizard" approach for all custom fields, in fact. I could see you predefining all the possible custom field types that could be used and create classes that can be used for those. The classes could be responsible not only for the field creation, but also for providing any custom validation, pre-submit transformation, etc. This approach would make adding new custom field types incredibly simple since all you'd have to do is follow the same implementation as the others that already exist, extend an existing one, etc.

Accessing a datatable via a string variable

This is probably one of those that is so simple I can't see it. I have a string variable called Market. The variable is user chosen and is the exact same name as one of many tables in my dataset. Basically I am having the user choose which table they want in a combobox, then I want to use that variable to access the table. So if the user picks "Market1" then I want to open the table named Market1.
I am simplifying here, but need to know how to open:
For ds.<variable here>.rows.count - 1
'perform steps
Next
How do I inject the variable correctly? Thanks ahead of time!
Dataset has Tables property, which accepts table name as a parameter. So in your case if string variable Market holds table name, you can access the table by referring to ds.Tables(Market)