SSRS: expand the ultimate group of values by default upon initial execution - visual-studio-2012

Is there a way to get SSRS to expand the ultimate group of values by default upon initial execution, regardless of values?
My report looks like this:
Current scenario
What I want to achieve:
Ideal Scenario
I've searched for an answer without any success, I can't even find a similar question! Most require the current date values which can be done through the visibility settings and setting an expression to hide when not current date (or if not date then a specific value) - I get that. That's not what i'm asking, I simply want the ultimate values to be displayed when the report is initially rendered.
Any help is much appreciated. Thanks in advance!

Related

How do I update a list item after adding it with Power Automate

I can't figure out how to do a very simple update of a column value in Power Automate in SharePoint online. I've seen examples of how to update an item on another list, but nothing that updates a value on the same item that was just added and triggered the workflow. Can anybody give me an example and maybe a very brief explanation?
I want to multiply the values of two columns and add it to a third column on the same item which will be blank. I used the formula to update the column I want using values from other columns. =[Dollar Amount]*[% Chance] but it says invalid syntax. There seems to be nothing intuitive in this new power automation and it's a horrible failure compared to how easy it used to be. MS is always making these mistakes.
The first method, you could use a calculated column.
=[% Chance]*[Dollar Amount]
Second method,use Flow.
Test result:
It's Power Automate, not power automation. Details matter.
First, try to set the column value when you create the item. Then you won't have to edit it. If you already know the values for [Dollar amount] and [% Chance] (Chance, really? Or Change?), then you can use these to generate the value before you create the item. You can do that in a variable or with a Compose action. Then create the item and refer to the variable or the Output of the compose action.
If this is not an option, you can use the Edit Item action and get the ID for the item from the action above that you used to create the item.
You say "MS is always making these mistakes." - It's more likely that the problem is a mismatch of data types, e.g. using text fields in calculations, or typos, or wrong syntax. That's not a mistake made by MS. Again, details matter.
Edit after comments: If the workflow is triggered by an item getting created, then you can use an Edit Item action and refer to the ID from the trigger item.

Sharepoint 2013/2016 Calculated Column stops calculating

I have a calculated column in SharePoint On-Premises that shows the number of days till a due date which works perfectly for a day or so then stops calculating, but if I go to the list settings and click the column and click ok then it calculates again?
Has anyone experienced an issue similar to this. I had this issue in both 2013 but within a few weeks moved to 2016 and still the same issue.
I've tried " " blank and also "" empty so not sure if that is causing the issue??
Is it a problem with the formula?
Here is the formula:
=IF(ISBLANK([Due Date])," ",
IF(ISERROR(DATEDIF(NOW(),[Due Date],"d"))," ",DATEDIF(NOW(),[Due Date],"d")))
Calculated columns cannot contain volatile functions, which includes those that depend on the current date.
The values in SharePoint columns--even in calculated columns--are stored in SharePoint's underlying SQL Server database.
The calculations in calculated columns are not performed upon page load; rather, they are recalculated only whenever an item is changed (in which case the formula is recalculated just for that specific item), or whenever the column formula is changed (in which case the formula is recalculated for all items).
If you need to show a dynamic value that changes with the passage of time, you have a few alternatives.
Client-Side Rendering
Consider using client-side rendering which lets you use JavaScript to dynamically determine how records in a list view are displayed. This JavaScript runs upon page load, so it can handle current time-dependent values much better than a calculated column.
To use client-side rendering, you create a JavaScript file that controls how the view displays. You upload that file to somewhere on SharePoint where people will have at least Read access to it, then edit the list view web part that you want to display differently and set its "JSLink" property to point to your JavaScript file.
Check out this answer for an example of using a JSLink file to spoof a dynamic date field.
Microsoft also provides some documentation here but I think they do more work than is necessary (creating an entire new list definition project in Visual Studio for their example instead of just creating a JSLink JavaScript file for an existing list).
Other Options
A few other options are mentioned in the older question linked above:
Conditional Formatting: You can apply conditional formatting to highlight records that meet certain criteria. This can be done using SharePoint Designer or HTML/JavaScript.
Filtered List views: Since views of lists are queried and generated in real time, you can use volatile values in list view filters. You can set up a list view web part that only shows items where Created is equal to [Today]. Since you can place multiple list view web parts on one page, you could have one section for today's items, and another web part for all the other items, giving you a visual separation.
A workflow, timer job, or scheduled task: You can use a repeating process to set the value of a normal (non-calculated) column on a daily basis. You need to be careful with this approach to ensure good performance; you wouldn't want it to query for and update every item in the list if the list has surpassed the list view threshold, for example.
To expand on the Filtered List Views option, you can have a view that shows only items that are due within a certain number of days. For example, you can display all the items due within 7 days by filtering where the Due Date field is less than [Today]+7 and Due Date is greater than or equal to [Today]. You could also sort the view to show the items with earlier due dates closer to the top.

Remove a button in SuiteScript

I need to be able to remove the delete button when today is greater than a particular calculated date.
There are 2 ideas I had and issues with each:
1 - Set a custom field on the record for the particular calculated date. Then use a workflow action of Remove Button where the custom field is <= today. My issue is I am wondering if there is a way to get "today" because I expected the condition to change allowing me to do that. I tried to use a formula and can't find Now() as a valid function listed.
2 - Workflow are truly scripts in the background. That means the Remove Button should be available in API. Therefore, my idea was to do my conditioning in suite script and then call this function. However, this function also does not exist in supported form. Has anyone hacked this to find what the function that is called in Remove Button is?
If we can get either idea to work, or if you have a third I haven't thought of that accomplishes the same task, that would be great.
I figured out my own answer. In case someone else ever needs this (as I didn't see anything like this on stack overflow), here is how to do option #1:
Save the value to a custom field - custbody_block_dlt_date
In a workflow, use the Remove Button function and use a formula condition
The condition is: {custbody_block_dlt_date} < sysdate
"sysdate" is the way you can get "Now()" or "today" in the condition
An alternative could be to create a User Event Script, on the before load function, get the button object then use the .setVisible(visible) method to hide it based on a date criteria, you may also want to set other restrictions based on roles that allow certain individuals to still be able to delete the record, like high positioned accountants. That avoids creating unnecessary fields on your records, while still providing the functionality that you desire. This could easily be done in < 4 lines of JavaScript.
See nlobjButton for examples.

ReportExport duplicates a row when exporting to Excel (not to other formats)

I am using tablix and group my entries by one of the properties. I have some trouble with SSRS when exporting my report to Excel. The very first row of each group is added to the end of its group.
This only(!) happens when exporting the report to Excel, exporting to any other format will leave my table the way it should be:
Thank you for your help!
I see that this is an old question but I have the same problem and I've been able to solve it just changing the Visibility property of the different tablix components.
In my case I have this.
Row Visibility: "Hide" and also set "Can be toogle by" with the parent group.
Group Visibility: "Show".
Each textbox of the detail row Visibility: "Show".
It looks like it is not removing dupes for you in the grouping that repeat. Are you doing a regular grouping with property or a function? There are two solutions for this:
Ensure your dataset is having distinct values (even if you think you are certain). If this is standard 'select' statement to a SQL Server just add Select 'Distinct' and your values.
I would try maybe making the properties in the table that are in the lowest level, shown as '[Details]' generally in the design section under 'Row Groups'. Change the properties to be something like:
[Max(propertyb)] and [Max(propertyc)]
This is not needed generally as the grouping should be taking care of this. But in cases where it is not it is an extra level of logic may fix the issue. You also need to be aware depending on your grouping logic that if it is not grouping properly you may get the same result for that many rows. This would not be as advised as it is more of a hack to get what you want, not an elegant solution.

How to change the color of a task list row when the due date comes nearer

I have a task list and it has a column called Due Date. So when your Due Date draws new, the row changes to the color orange, and when the Due Date is passed, then it changes to red. So it is done dynamically comparing the Current Date to Due Date.
Has anyone accomplished this kind of solution?
I'd recommend the use of SharePoint Designer to build a Data View Web Part over using JavaScript (which is reliant on being injected via a CEWP, or via the masterpage).
Here's a tutorial for creating conditional formatting rules in a DVWP, which may prove helpful.
http://blog-sharepoint.blogspot.com/2009/05/data-view-conditional-formatting-using.html
I'm just going to nod knowingly towards this post:
Sharepoint webpart for conditional formatting?
And not remention the thing I mentioned over there that I feel slightly guilty about mentioning in the first place.
You can add javascript to the target page, where loop through all rows (), looking in DueDate column and mark that rows as you wish. This is the simpliest solution I know. For achieve this you need to look to target page HTML markup.
UPD:
You didn't say what Sharepoint version you are using. There is a better solution for 2010, explore this link: http://www.sharepoint.stackexchange.com/questions/7478/highlight-row-color-based-on-field-values-in-sharepoint-2010-list-view
There are third party add-ons(sharepoint highlight rows) that allows you highlight SharePoint list rows based on field values.

Resources