I have cascading parameter that contains list of employees that produced reports for a certain date period. The parameter Employees is multi-select list and it's cascading parameter, i.e. depends on Beginning & Ending date parameters, so only employees that were active in this period will be displayed in the dropdown.
Here is the issue - when I modify dates to a longer period, my Employee list expands (so refresh happens correctly), but among all employees only those are selected, which were part of previous list, before changing beginning/ending date parameters. I need Employee list always to be SELECT ALL by default. SELECT ALL option does appear in the list, but it's not being selected after the refresh.
This SELECT ALL requirement is important as users may run report assuming all employees are selected, which in fact will not be the case, so current functionality is very misleading.
For your knowledge, default values for the Employee list are the same as Available values - getting list of employees from DB query based on period specified.
Appreciate your help on this matter.
Related
I am creating a data entry form for employee information in Access 2016, which contains a fairly standard subform for work history.
In this subform, I have a SQL query to limit the items being pulled. The query itself works fine and is returning the correct results.
It essentially chekcs if the job position is open, (i.e. does not exist in history without an end date), or if it is the same as the current record.
The problem I am having is that I cannot seem to make the desired text display consistently.
The combobox itself is pulling 3 fields; job_id (index), job_title, and shift (job_title and shift are a unique combination, with job_id just being an autogenerated number).
The actual value being stored is the job_id, but I would like for the combobox to display the job_title after being selected.
This displays correctly when it is first selected, but if I then select a new job_id on a different record (where an event to requery occurs), any item without an end date stops displaying.
I have an event to requery this combobox on getfocus. I am almost positive that the problem has to do with anything missing an end date re-querying, and then not finding itself in the list, and then displaying a blank.(The data itself is not being deleted, just the display)
If I allow the index-column to be displayed, it no longer shows up as a blank, but it only displays the ID number which is not inherently useful to the end user.
If there is anything I can do to clarify please let me know.
I have a SQL database and using SSRS to produce reports. They are both 2012 version. The data is well water levels that are record every hour. Originally I have the report displaying ALL of the data for a user selected well (dropdown list). The user can also select the start and end date (text box) But the well levels don't change that much every hour unless there is a significant rain/flooding event. So I want the user to have the option to choose only the noontime values for each day. Is there a way to have a checkbox that would either 1) change actual query the report is using or 2) include filter that says only display 12:00:00? The parameter options seems to want to include a date and I only want to filter by time.
Thanks
I think the solution for you is to add a parameter to your report to be able to select what information to show with 2 possible values - All / Noon only. Then add a new field / calculated field to your dataset to indicate which ones are noon values. Then use the new parameter to filter the values showed in the report.
Hope it makes sense.
I have a report that displays employeeID, employeeEmail, supervisorID, and expirationDate. I then use this LookUp function to find the supervisor email:
=Lookup(Fields!supervisorID.Value, Fields!employeeID.Value, Fields!employeeEmail.Value, "DataSet1")
The problem occurs when I set parameters for specific date ranges on the expirationDate
expirationDate >=#startdate
AND expirationDate <=#enddate
This narrows the search result to only show employees with an expiration date in the date range. However, it also filters out my supervisor email address if the supervisors expirationDate doesn't fall within the range as well.
I don't want the LookUp expression to be subjected to the parameters of the date range. I want the supervisor email to always show. Because the date range parameter is meant to filter out the employees by expiration date, not the supervisors.
So when the employee is displayed because their expirationDate is in the range, their supervisorID should always be displayed, but because the LookUp expression then re-queries the dataset to find the email, the results are being blocked when the expirationDate isn't in the range for supervisors too.
Is there a way to exclude my LookUp/Expression from the parameters? Or for the parameters to only filter out specific column fields?
So you're filtering "DataSet1" on the Dates too? You should just be able to remove that filtering so that the dataset contains all the email addresses available to be looked up. This won't affect which supervisors are shown in the report since presumably the content is coming from a different dataset than DataSet1 and that's why you're using lookup!
Where are you specifiying the date range filter? If it's on the dataset then there is no way for the lookup function to reference rows that are not included in the dataset. One possibility is to add the date filter to the table (or whatever data region you're using), thus leaving all rows in the dataset to be referenced by the lookup function. This is an ok solution for small data sets but obviously doesn't scale well if the unfiltered dataset is very large.
A better solution in general would be to retrieve the supervisor details for each row in your dataset, by editing the query to do the join between employee and supervisor. This will be more efficient and you can then filter the dataset on employee dates and forget the lookup function, which means less work for your report to do.
I have an SSRS report that is currently pulling a single dataset. This dataset contains records of inventory we have. Each record is a separate asset.
I want my report to group by a certain field, and then subgroup by certain criteria that are determined with a couple different fields. Basically there is one parent group, and three adjacent subgroups. My grouping functionality is working correctly, however I am finding it difficult to add totals to each of the adjacent subgroups. When I add a total, it is totaling the specific field within the scope of the entire dataset, instead of limiting the total to just that subgroup.
How can I add totals per field within subgroup?
EDIT: Added sample data and explanation:
You can ignore the function code field, that is what I am using to group on the parent group.
asset number,description,first year,acquisition cost,function code
190,random asset,2008,5000,100
193,random asset45,2008,56000,100
197,random asset26,2014,3000,100
191,random asset27,2014,7000,100
192,random asset36,2013,15000,100
I can't seem to attach screenshots, so here goes..
In the report you can see three subgroups; Assets, AssetAdditions, AssetDeletions. In the tablix, you can see where these groups are positioned. You can also see a row directly beneath the group that is supposed to total the subgroup at the end. However, for some reason the scope is only taking into account the entire dataset. I have tried to modify the expression in the Sum function [Sum(acq_cost), "Assets"], adding in the scope parameter but then it does not allow me to even run the report. It yells at me saying that "Assets" is an invalid scope.
The easiest way I have done this in 2012 VS is to have it return as part of the data set and have it sum up the value.
For instance if you have a quantity for inventory, and you have a subset where you only want the total quantity for that set, you add another column to your dataset called TotalSetQuantity and the subtotal field will have the expression =SUM(Fields!TotalSetQuantity.Value) rather than =SUM(Fields!Quantity.Value).
You can try iif statements within your report like =sum(iif(Fields!ColA.Value=1,Fields!Quantity.Value,0) but I had some troubles getting that to work.
Hope that helps, I ran into this issue this past week and the first option worked like a charm for me.
Firstly, a bit about my setup.
I have a primitive database of three tables:
A. Table that lists various locations: [location_code], [location_name]
B. Table that describes items: [item_code], [item_name], [item_price]
and finally a table that ties the roo^H^H^H whole database together
C. Table says which items are stored at each locations and in what quantities: [location_code], [item_code], [item_quantity]. This table can have multiple entries with the same [location_code], since different items can be stored at the same location. Basically, this is a schoolbook implementation of one-to-many relationship from locations to items, with a extra attribute (quantity) attached to each location-item link.
Now, all I need to do is to create a form that would list all items stored at certain location. This is a basic use-case for "subform" feature in Access. The main form simply navigates through different locations, while the subform lists the items.
I use
SELECT C.location_code, B.item_name, B.item_code, B.item_price, C.item_quantity
FROM B INNER JOIN C ON B.item_code=C.item_code
as a record source for the subform. The main form is linked to subform by [location_code]. The subform is set up with list layout (not table layout), i.e. each database field is given its own control element.
So far everything works perfectly. I select the location in the main form, and the subform gives me a list of editable [item_name]-[item_price]-[item_quantity] triplets for the current location.
As the next step, I want to add a calculated control to each of the above triplets. I want to know the total price for each kind of item (i.e. simply the [item_price] * [item_quantity] in each line). Easy, I add a calculated control to the "repeatable" area of the subform and specify
= [item_price] * [item_quantity]
as the formula for the value. Again, everything works perfectly. Now instead of the above triplets, my list has four entries per line: [item_name]-[item_price]-[item_quantity]-[total_item_price]. And, what is important, when I edit [item_price] or [item_quantity], the [total_item_price] gets automatically reevaluated once I finish editing.
And as the final step, I want to add another calculated control that would display the total price of all items stored at the current location (let's call it "grand total"). A also place that control into the subform (into the "footnote" area this time) and specify the following formula as its value
= SUM([item_price] * [item_quantity])
Now, this works. The total value is calculated correctly each time I change the location in the main form. Also, when I change [item_price] for any item at the current location, the grand total is also updated automatically. However, when I change [item_quantity], the grand total does not update (???). Hitting F9 will make it update. Changing the current location back and forth will update it. But, unfortunately, a mere change to [item_quantity] does not trigger an automatic update.
Does anyone know, what could be wrong here? Why do changes in [item_price] trigger the automatic update of the grand total, while changes in [item_quantity] do not? Intuitively, these fields seem to have the same status (except that the former comes from table B, while the latter comes from table C). Why is the behavior different? How do I make it update automatically?
In your subform's after update event, explicitly recalculate the total price control.
Me.txtTotalPrice.Requery
If you tab through the record and advance to the next record does it still not update. I am thinking that the price is the last field in tab order so when you change it, you tab on to the next record and the change is committed. If I am right then when you edit the quantity, your tab advances you to the price field which is still in the current record so the change is not committed to the table yet. If you advance further through, that should complete the processing.