How to Hide selected group Column in Kendo Angular 6 Grid, - kendo-grid

I have a requirement in which some selected group columns should be hidden, and rest group columns should display.
How can we achieve it using Kendo ui + Angular 6.

You can bind the ColumnComponent's hidden input to an expression that returns the respective boolean value after performing the required custom logic that will determine whether a column should be hidden or not.
The grouping configuration is available in the object the Grid group input is bound to.
Here is an example that demonstrates hiding all columns the data is grouped by, but ProductName:
EXAMPLE

Related

SSRS hiding a row group if there are no detail rows

Can someone please help me write a custom code that will check if the details of the row group = nothing? I'd like to use this as a show/hide expression such that table 0 will not display if there are no records within the group.
I can't seem to use aggregations for the row group details at the row group level.
Edit:
example 1 with a detail row
example 2 with without a detail row but the group header still displays. I'd like to hide this group completely:
OK, so it looks like you want to hide a table, not just a group within a table.
If this is not correct , please post your full report design.
You should be able to just count the rows in the dataset that the table is bound to.
So if your table is bound to `DataSet`` the 'Hidden' property would just be
=COUNTROWS("DataSet1") = 0
"DataSet1" is the name of the dataset, it is case sensitive and must be enclosed in double quotes.
The table will be hidden but the space it consumes will not be used, in other words, you will have a blank space where the table should be.
Alternatively, you can set the NoRowsMessage property to simple text message or an expression which will be displayed instead of just hiding the table.
I ended up using an IIF(IsNothing(Fields!MyField.Value), Parameters!ShowMissingGroup.Value,False) for the row group expression visibility then using a parameter to hide/show it.

SSRS Report Builder 2012 - How to hide list based on field value?

I'm using Report Builder 2012 to create a report. I have inserted multiple text boxes and other controls inside a list box so that I can hide all the controls at once just by hiding the list box. I'm using a SQL Server stored procedure to fetch rows of data. I'm using below expression to hide/show the list box.
=iif(Fields!certificateType.Value = "CT", False, True)
It works fine but it only checks the first row of data. If certificateType field is "CT" in the first row of data, it shows the list box but it doesn't hide the list box back for the next row of data in which certificateType is not "CT". It seems like list box visibility only checks the first row of data and applies it for all the other rows as well. How can i check the visibility of list for all the data rows?
Okay, based on our chat I have updated this solution.
I mocked up some data that looks like this:
certificateType
---------------
AT
BT
CT
DT
ZT
I created a quick and dirty report with a list. In that, I added a rectangle with a textbox in it. I set the dataset for the list to the main dataset (DataSet1 in my case). I set the expression for the textbox to this:
=Fields!certificateType.Value
Image in design mode:
I clicked on the list, and in the Row Groups pane, I right-clicked the Details rows, and chose Group Properties. On the General section, I clicked Add to add a new group expression. Then I chose certificateType from the dropdown.
I moved to the Page Break section of the Group Properties dialog and ticked the Between each instance of a group check box. Click OK.
Now, the report will break for each instance of a certificate type that comes in the dataset. So, if you have ten different cert types in the data, you will get one page for each.
You can't see it in my image below, but there are 5 pages now.
Hope this helps!!

Display data member in group header template in Kendo UI Grid ASP.NET MVC

I have a member that I want to display other member from data in group header. Look at below code:
#Html.Kendo().Grid<MailModel>()
...
.Columns(c=>
{
...
c.Bound(b=> b.ReceivedDate).ClientGroupHeaderTemplate("#:data.ReceivedDateStandard#");
...
})
.DataSource(ds=> ds
.Ajax()
.Group(g=>g.Add(i=>i.ReceivedDate))
);
Everything work great, but the group header text is "undefined"!!!
How can I show another member data in group header text?
Thanks for fallowing.....
Unfortunately, I don't think what you are trying to achieve is possible.
Logically, when you are grouping, the only members that you have available are the members that you are grouping by and the aggregates of that group.
Unless you can group by both ReceivedDate and ReceivedDateStandard or calculate ReceivedDateStandard from ReceivedDate then you wont be able to show ReceivedDateStandard in the group header.
for anyone with problem binding to the current value but with custom template, use this binding:
#:value#
instead of
#:data.FieldName#

SSRS - Replace the Chart

I have a question, want some assistance.
Q) My question is that i have a chart in which analyst assigned for many incidents and some analyst have 1 or two incident assigned. just because of this the bar chart looks ugly some time. So thats why i used a new chart to represent Min incident count. But i want there some creativeness, for which i want there a radio button or OnClick event ( I do not know how to use both these. When report runs by default it`ll show Max incidents count chart and when we used radio button it will show Min incidents count chart, on the same chart area no need of new area or on new page.
Kindly help me or refer me some links and with ideas. As i have searched many blogs but i didn`t get any big achievement.
Below is my Simplified query;
SELECT
Count(IncidentDimvw.Id)
,UserDimvw.FirstName AS Analyst
FROM
IncidentDimvw
FULL JOIN WorkItemDimvw
ON IncidentDimvw.EntityDimKey = WorkItemDimvw.EntityDimKey
JOIN WorkItemAssignedToUserFactvw
ON WorkItemDimvw.WorkItemDimKey = WorkItemAssignedToUserFactvw.WorkItemDimKey
JOIN UserDimvw
ON WorkItemAssignedToUserFactvw.WorkItemAssignedToUser_UserDimKey = UserDimvw.UserDimKey
WHERE
WorkItemAssignedToUserFactvw.DeletedDate IS NULL
GROUP BY
UserDimvw.FirstName
Having (Count(IncidentDimvw.Id) = (#Count))
Having Clause is right or wrong, i donot know.
I used the following expresion in series as you suggested.
=iif(Parameters!Count.Value, Max(Sum(Fields!ID.Value)), Min(Sum(Fields!ID.Value)))
Sample data is as folows;
Regards
Muhammad Ahsan
I can think of a couple of ways to approach this:
Dynamic expressions based on parameter
Say you have a simple DataSet like:
And also a boolean parameter called showMax.
We can create a simple bar graph based on this:
The most important thing to note is that Series value is expression-based:
In the above example the expression is:
=IIf(Parameters!showMax.Value
, Max(Fields!value.Value)
, Min(Fields!value.Value))
i.e. when showMax is true, report the Max values, otherwise report the min values.
In this case I've also updated the Axis title, Chart title, and Custom legend text to be expression-based:
Axis Title: =IIf(Parameters!showMax.Value, "Max", "Min")
Chart Title: =IIf(Parameters!showMax.Value, "Max per group", "Min per group")
Custom legend text: =IIf(Parameters!showMax.Value, "Max value", "Min value")
The chart behaviour changes based on what parameter is selected as required:
Set Visibility based on parameter
Another option is simply to have to charts and hide one depending on parameter selection.
For example, for the Max chart the Hidden property can be set to:
=Not(Parameters!showMax.Value)
Setting this property correctly for each report will mean only one is ever displayed to the user, i.e. it will look dynamic.
Either of these options should work; the first keeps the layout simple in the designer makes the chart more complex, the second makes the layout more complex but keeps the charts simple.
Hopefully one option will work for you.

ms-access calculated controls

can someone give me an example of what a calculated control is in ms-access?
Say you add a text box to a form, normally it binds back to a specific field in a table, and its contents reflect the contents of that field. A calculated control does not refer to a specific field in a table, rather it displays the calculation done on one or multiple fields in the database. Sometimes, it may not use any fields.
Example of control source value from a calculated control
=[YearlySalary]/52
Presuming that there is a field called yearly salary in the table the form is based on.
A control that simply displays this field would have the following in the control source
YearlySalary
Note the control source for a calculated control starts with an =
you mean this?
Setting the Control Source of a control, generally a textbox, to a calculation creates a calculated control:
=1 * 2
=[TheDate] - 1
=[Stock] * [UnitPrice]
=DlookUp("TheField","TheTable","FieldX=1")
Different cases:
Text box control: here you may be using a trim("text") function to remove spaces and clean up the data--that process requires some calculation
List box control: a calculation may be involved in the query that comprises it's row source. The calculation could be the combination of some kind of cyclic function on a numeric field value which then dramatically changes the order of the data if so directed.
Command Button: a variable could change with the number of presses which in turn changes the command mode of the button. Could change the color of the button, or could hide the button after a certain number of clicks, or could change the column of the listbox that is sorted in a query--each click advances the sort to the adjacent column to the right.