Strange Matrix group by date question

I have the following data:
name
date
value
bob
1/1/2015
5
jane
1/1/2015
7
jim
1/1/2015
9
bob
1/2/2015
2
jane
1/2/2015
5
jim
1/2/2015
5
bob
1/2/2015
4
I am using a matrix with a group by date to produce the following:
1/1/2015
1/2/2015
bob
5
4
jane
7
5
jim
9
5
As you can see it only selected one value for bob on 1/2.
Is is possible to show all of the values while still grouping by date?
I would  prefer something like 
1/1/2015
1/2/2015
1/2/2015
bob
5
2
4
jane
7
5
jim
9
5

Hi ,
I have created sample report based on your question. Steps are listed below:-
Sample query is modified to get one more Column rowid as shown in below SQL query:-
select *,row_number() over(partition by name,date order by date )rowid from
SELECT 'bob' name, '1/1/2015' date ,5 value
UNION
SELECT 'jane' , '1/1/2015' , 7
UNION
SELECT 'jim' , '1/1/2015' , 9
UNION
SELECT 'bob' , '1/2/2015' , 2
UNION
SELECT 'jane' , '1/2/2015' , 5
UNION
SELECT 'jim' , '1/2/2015' , 5
UNION
SELECT 'bob' , '1/2/2015' , 4
)T
Now Create the matrix report rows --> Name
Columns---> Date
Detail---> Value
After creation of matrix, just go to the Group Properties of Column group and add as shown below
After this setting , run the report, it will give result as shown below:-
RDL Code for reference:-
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Tablix Name="matrix1">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Tahoma</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox3</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>1in</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.21in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Sum(Fields!value.Value)</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox2</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
<DataElementOutput>Output</DataElementOutput>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_date">
<GroupExpressions>
<GroupExpression>=Fields!date.Value</GroupExpression>
<GroupExpression>=Fields!rowid.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!date.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.21in</Size>
<CellContents>
<Textbox Name="date">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!date.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>date</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#6e9eca</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_name">
<GroupExpressions>
<GroupExpression>=Fields!name.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!name.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>1in</Size>
<CellContents>
<Textbox Name="name">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!name.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>name</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#6e9eca</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<RepeatRowHeaders>true</RepeatRowHeaders>
<DataSetName>DataSet1</DataSetName>
<Top>0.37in</Top>
<Height>0.42in</Height>
<Width>2in</Width>
<Style />
</Tablix>
<Textbox Name="textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Strange Matrix Group by Date</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontSize>14pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>SteelBlue</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.37in</Height>
<Width>5in</Width>
<ZIndex>1</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>1.04in</Height>
<Style />
</Body>
<Width>5in</Width>
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSource1">
<DataSourceReference>DataSource1</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>b2ebe046-5f1b-45c9-82e7-5baa7ed2460a</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText> select *,row_number() over(partition by name,date order by date )rowid from
SELECT 'bob' name, '1/1/2015' date ,5 value
UNION
SELECT 'jane' , '1/1/2015' , 7
UNION
SELECT 'jim' , '1/1/2015' , 9
UNION
SELECT 'bob' , '1/2/2015' , 2
UNION
SELECT 'jane' , '1/2/2015' , 5
UNION
SELECT 'jim' , '1/2/2015' , 5
UNION
SELECT 'bob' , '1/2/2015' , 4
)T</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
<Fields>
<Field Name="name">
<DataField>name</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="date">
<DataField>date</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="value">
<DataField>value</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="rowid">
<DataField>rowid</DataField>
<rd:TypeName>System.Int64</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<Language>en-US</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>dfd8f7e8-fcc1-4636-991e-d86824825c30</rd:ReportID>
</Report>
Thanks
Prasad
Mark this as Answer if it helps you to proceed on further.

Similar Messages

  • Grouping the data

    Hello team,
    I have come up with a question at my work.
    I have a table that has several fields. When I group the data with one field, I get some counts which are equal to the original count of field before grouping. As I add more fields to the query and I add to my grouping, the my total count wouldn't be equal
    to the original count of the column.
    Can somebody please this?
    What query can take care of this?
    I generated this select statement, but it didn't work.
    SELECT DISTINCT c.code, c.Approved, Year(b.Date) AS [Year], Month(b.Date) AS [Month]
    FROM (SELECT a.Code, Sum(a.Approved) AS Approved FROM [MyTable1] AS a WHERE (((a.Approved)>0)) GROUP BY a.Code) 
    AS c INNER JOIN [MyTable2] AS b ON c. code = b. Code;
    Regards,
    GGGGGNNNNN
    GGGGGNNNNN

    Hi GGGGGNNNNN,
    I am not bale to understand the count of field means. Did it mean the numbers of records? If I understand correctly, I think the result is expected since the group by clause is changed.
    Here are some articles about SQL in Access for your reference:
    SELECT Statement (Microsoft Access SQL)
    GROUP BY Clause (Microsoft Access SQL)
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to show 2 groups of data in 1 XY plot at different time?

    Hi, all:
    I have a question and hope someone can help me figure out the solution or whether or not no solution for the question. I need to collect 2 groups of data [x(n),y(n)] and [x(n),z(n)]. I will collect x-y first then x-z. I need to collect and show the x-y data first, when I am satisfied, then collect and show the x-z data. It should be in the same plot. I got an error message so far and cold not figure out the solution. I attached my code and hope someone can help me. The code is in version 8.0 and I am sure there is no virus. Thank you a lot in advance.
    Attachments:
    plots.vi ‏13 KB

    Hello ccyang
    When you look the context help of the xy-graph in the diagram, you see the supported data types. An array of xy-clusters is accepted. You may look in the attached code how you could built the array  of the two plots.
    Check the example VIs included in LabVIEW (in the help menu). There are several examples on charts and graphs.
    Greetings
    shb
    Attachments:
    plots executable.vi ‏15 KB

  • Between operator for group by date in Apex Interactive Reports

    Hi,
    In the interactive reports filter, i couldn't find the 'between' operator for date field (got a 'group by date' in my sql query (source). I am just wondering, Is it beacuse of the group by date clause?. Is there any way to show the 'between' operator in the interactive reports filter.
    Thanks

    I just opened an existing IR style report, went to actions, filter, selected a date column and found between at the bottom of the list of values.. Are you sure the date you are trying to filter on is a true date column?
    Thank you,
    Tony Miller
    Webster, TX
    What if you really were stalking a paranoid schizophrenic... Would they know?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Displaying a SharePoint List in a ListView Control with Grouping by Date

    Dear All
    I have created a ListView to display items from a SharePoint list:
    <asp:ListView ID="UpAndComingEventsLV" runat="server">
    <LayoutTemplate>
    <ul>
    <li id="itemPlaceholder" runat="server" />
    </ul>
    </LayoutTemplate>
    <ItemTemplate>
    <li id="Li1" runat="server">
    <asp:Literal ID="CurrentDate" runat="server" />
    <%#Eval("Title")%> <%#Eval("Event_x0020_Category")%> <%#Eval("EventDate", "{0:HH:mm}")%>
    </li>
    </ItemTemplate>
    </asp:ListView>
    To perform the binding and then display the date I'm doing the following:
    Using oSiteCollection As New SPSite(_ListPath)
    Using web As SPWeb = oSiteCollection.OpenWeb()
    List = web.GetList(_ListPath)
    End Using
    End Using
    Dim Query As New SPQuery
    Query.Query = "<Where><And><Eq><FieldRef Name='Status' /><Value Type='Choice'>Approved</Value></Eq><Geq><FieldRef Name='EventDate' /><Value Type='DateTime'><Today Offset='4' /></Value></Geq></And></Where><OrderBy><FieldRef Name='EventDate' /></OrderBy>"
    'Query.RowLimit = 1
    Query.ViewFields = "<FieldRef Name='Event_x0020_Category' /><FieldRef Name='Title' /><FieldRef Name='EventDate' /></ViewFields>"
    Dim ItemColl As SPListItemCollection = List.GetItems(Query)
    UpAndComingEventsLV.DataSource = ItemColl.GetDataTable
    UpAndComingEventsLV.DataBind()
    dfgdfgfg
    I would like to group my events by date though, rather than display the date against each row. To make things even more complicated, I would like to use friendly names like Today, Tomorrow, Monday, Tuesday instead of dates:
    TODAY
    Event number one
    Event number two
    Event number three
    TOMORROW
    Event number 4
    Event number 5
    MONDAY
    Event number 6
    Event number 7
    At the moment, I've created a ItemDataBound event on the ListView control and I have been able to display the Today, Tomorrow, Monday etc bit but I can't figure out the best way to perform the grouping. Incidentally, I only want to group on the date not
    on time:
    Private Sub UpAndComingEventsLV_ItemDataBound(sender As Object, e As Web.UI.WebControls.ListViewItemEventArgs) Handles UpAndComingEventsLV.ItemDataBound
    If e.Item.ItemType = Web.UI.WebControls.ListViewItemType.DataItem Then
    'Retrieve data item
    Dim DataItem As ListViewDataItem = DirectCast(e.Item, ListViewDataItem)
    Dim RowView As DataRowView = DirectCast(DataItem.DataItem, DataRowView)
    Dim EventDate As DateTime = RowView("EventDate")
    'Get literal control
    Dim CurrentDate As Literal = e.Item.FindControl("CurrentDate")
    'Display friendly date
    If Not IsNothing(CurrentDate) Then
    Select Case EventDate.Date
    Case Is = Now.Date
    CurrentDate.Text = "Today"
    Case Is = Now.Date.AddDays(1)
    CurrentDate.Text = "Tomorrow"
    Case Is = Now.Date.AddDays(2)
    CurrentDate.Text = Now.Date.AddDays(2).DayOfWeek.ToString
    Case Is = Now.Date.AddDays(3)
    CurrentDate.Text = Now.Date.AddDays(3).DayOfWeek.ToString
    Case Is = Now.Date.AddDays(4)
    CurrentDate.Text = Now.Date.AddDays(4).DayOfWeek.ToString
    Case Is = Now.Date.AddDays(5)
    CurrentDate.Text = Now.Date.AddDays(5).DayOfWeek.ToString
    Case Is = Now.Date.AddDays(6)
    CurrentDate.Text = Now.Date.AddDays(6).DayOfWeek.ToString
    End Select
    Else
    CurrentDate.Text = "-"
    End If
    End If
    End Sub
    Please could you help me understand the best way to perform the grouping by date?
    Any help or advice is greatly appreciated!
    Many thanks
    Daniel

    When I've done this in the past I've always used a calculated field that translated the days into the groupings I wanted.  You couldn't do quite the groupings that you list above, but it would give you categories to group on.  You could then
    apply the groupings in the base view.  Then you could use the Row Databound event to change the labels on the Groupings at runtime to the ones you want to use.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How can shrink matrix group very urgent

    hello programmers
    how r u all? i have a little problem. i want to shrink my matrix frame when i donot want to print all columns of matrix group in report. suppose i haev three matrix groups and i want matrix group 2 all columns to be hide at runtime and matrix three group will automatically come at the position of matrix 2 group. please if ant body have any idea about it please email me. this is very urgent problem which i am facing.
    thanks for any reply
    kamran ahmed

    It's not very clear what you're looking for. However, one of the following may work for you:
    a) Restrict the data at query time through use of parameters and bind variables.
    b) Use format triggers to dynamically hide values at runtime (by returning false).
    If neither of these solutions works then please provide more details of the problem you're facing.
    Thanks,
    Danny

  • MS Project 2007 - Help with custom field calculation for grouped by dates view

    Hello 
    I am trying to creat a view that counts number of students in courses (while # Students is a custom field that is filled manually and courses are tasks).
    The view should be grouped by Quarters, Months, and weeks (Calculated custom Text fields)
    The weeks groups are displayed by the start day of each week.
    For example:
    The view counts how many students are in courses in a specific week/month/quarter.
    This is the group by definition:
    Those are the fields calculations:
    “WW_Start” field calculation:
    (Year([Start]) & "  W " & Format([Start],"WW") & " " & "   [" & Datevalue(ProjDateSub([Start],CStr(Weekday([Start])-1),"Standard")) & "]")
    “MM” field calculation:
    Year([Start]) & "  M " & Format([Start],"MM")
    Basically it works but it doesn't cover a situation where a course is more then a week.  
    Lets say that the duration of the task is 12 days, the task should appear on 3 different weeks groups.
    But what i did puts the tasks only in the group that shows the first week of the task.
    How can i change my calculations or my view so that in the second, and third week of the task it will also show the task and it's attributes.
    For example:
     - "UV5 ACM" task should also be in W 45 not just W 44.
    Anyone has an idea how to do that?
    Ofir Marco , MCTS P.Z. Projects

    Hi
    First, thanks for the comment "nice neat groups" :)
    I think you understood correctly what is my issue.
    Second, about your question:  the class have the same number of students during the course period.
    It will have 10 students even if the duration is 1 day or 10 days.
    if you look at the basic gantt chart you will see a row like this:
    Task name        Duration        Num_Students     Resource names (Instructors)
    Course YYY       10d                10                       
    Instructor X
    it is an attribute on the task, not the assiment.
    When i group by dates (Weeks, months, quarters) or by another field (can be course type for example) i the students are summed in the task summary level for all tasks.
    Lets say i group by all the tasks (Classes) that are in the 1st quarter, and lets say for the example that there are 3:
    Task 1 -->  5 students
    Task 2 --> 10 students
    Task 3 --> 7 students
    Then, the group by summary should count:
    Quarter 1 - 2014:   22 (students)
    Task 1 --> 5
    Task 2 --> 10
    Task 3 --> 7
    By the way, it doesn't matter if the version is project 2007,2010, 2013, the logic is the same.
    Hope it helps and i'll be glad to have some ideas or evan get examples for solution in a project file by e-mail.
    Ofir Marco , MCTS P.Z. Projects

  • Filling matrix with Dummy Data

    I am doing a demo screen for a client and I need to fill a matrix with hard coded data. I followed the sample code and I have the following code but it is not working for me (it throws a matrix-line exists exception):
    // Now get the matrix Item.
    SAPbouiCOM.Item matrixItem  = oForm.Items.Item("v33_Grid");
    theMatrix = (SAPbouiCOM.Matrix) matrixItem.Specific;
    Form.Freeze(true);
    SAPbouiCOM.UserDataSource uds;
    uds = oForm.DataSources.UserDataSources.Add("salesUds",SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 10);
    theMatrix.AddRow(1, theMatrix.RowCount);
    SAPbouiCOM.Column     col      = null;
    // Ready Matrix to populate data
    theMatrix.AutoResizeColumns();
    col = theMatrix.Columns.Item("desc1");
    col.DataBind.SetBound(true, "", "salesUds");
    uds.Value = "Test description";
    // setting the user data source data
    theMatrix.LoadFromDataSource();
    oForm.Freeze(false);
    oForm.Update();     
    I really need to get this working. ANyone got any ideas what I am doing wrong?

    Hi Laura,
    You should use theMatrix.SetLineData() which is the avaiable statement for user matrixes.
    Here is some code that loads a form with a matrix from an XML. This way you can edit form values in the XML, instead of hard coding.
    Dim oXMLDoc1 As Xml.XmlDocument = New Xml.XmlDocument
    oXMLDoc1.Load("C:BaseForm.xml")
    App.LoadBatchActions(oXMLDoc1.InnerXml)
    Dim oForm As SAPbouiCOM.Form = App.Forms.GetForm("ITA0002", 1)
    Dim oMatrix As SAPbouiCOM.Matrix = oForm.Items.Item("5").Specific()
    Dim Informes As SAPbouiCOM.UserDataSource = oForm.DataSources.UserDataSources.Item("Informes")
    Dim ID As SAPbouiCOM.UserDataSource = oForm.DataSources.UserDataSources.Item("ID")
    Dim i As Int16 = 1
    oMatrix.AddRow(ListaInformes.Length)
    For Each Informe As String In NameList
       Informes.ValueEx = Informe
       ID.ValueEx = i.ToString
       oMatrix.SetLineData(i)
       i = i + 1
    Next
    The xml is this one:
    <?xml version="1.0" encoding="UTF-16"?>
    <Application>
         <forms>
              <action type="add">
                   <form AutoManaged="1" BorderStyle="4" FormType="ITA0002" ObjectType="-1" SupportedModes="1" appformnumber="ITA0002" client_height="284" client_width="291" color="0" default_button="1" height="316" left="363" mode="1" pane="1" title="Informes" top="149" type="4" visible="1" width="297">
                        <datasources>
                             <userdatasources>
                                  <action type="add">
                                       <datasource size="254" type="9" uid="Informes"></datasource>
                                  </action>
                                  <action type="add">
                                       <datasource size="10" type="9" uid="ID"></datasource>
                                  </action>
                             </userdatasources>
                        </datasources>
                        <items>
                             <action type="add">
                                  <item AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" enabled="1" font_size="0" forecolor="0" from_pane="0" height="19" left="6" linkto="" right_just="1" supp_zeros="0" tab_order="10" text_style="0" to_pane="0" top="260" type="4" uid="1" visible="1" width="65">
                                       <AutoManagedAttribute></AutoManagedAttribute>
                                       <specific caption="OK"></specific>
                                  </item>
                                  <item AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" enabled="1" font_size="0" forecolor="0" from_pane="0" height="19" left="77" linkto="" right_just="1" supp_zeros="0" tab_order="20" text_style="0" to_pane="0" top="260" type="4" uid="2" visible="1" width="65">
                                       <AutoManagedAttribute></AutoManagedAttribute>
                                       <specific caption="Cancelar"></specific>
                                  </item>
                                  <item AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" enabled="1" font_size="0" forecolor="-1" from_pane="0" height="20" left="5" linkto="" right_just="0" supp_zeros="0" tab_order="0" text_style="0" to_pane="0" top="5" type="99" uid="3" visible="1" width="80">
                                       <AutoManagedAttribute></AutoManagedAttribute>
                                       <specific AffectsFormMode="1" caption="Informes" val_off="0" val_on="1">
                                            <databind alias="Informes" databound="1" table=""></databind>
                                       </specific>
                                  </item>
                                  <item AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" enabled="1" font_size="0" forecolor="-1" from_pane="1" height="224" left="8" linkto="" right_just="0" supp_zeros="0" tab_order="60" text_style="0" to_pane="1" top="28" type="127" uid="5" visible="1" width="276">
                                       <AutoManagedAttribute></AutoManagedAttribute>
                                       <specific SelectionMode="2" layout="0" titleHeight="0">
                                            <columns>
                                                 <action type="add">
                                                      <column AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" editable="0" font_size="12" forecolor="-1" right_just="0" text_style="0" title="2" type="16" uid="2" val_off="N" val_on="Y" visible="1" width="20">
                                                           <databind alias="ID" databound="1" table=""></databind>
                                                           <ExtendedObject></ExtendedObject>
                                                      </column>
                                                      <column AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" editable="0" font_size="12" forecolor="-1" right_just="0" text_style="0" title="Nombre" type="16" uid="1" val_off="" val_on="" visible="1" width="255">
                                                           <databind alias="Informes" databound="1" table=""></databind>
                                                           <ExtendedObject></ExtendedObject>
                                                      </column>
                                                 </action>
                                            </columns>
                                       </specific>
                                  </item>
                             </action>
                        </items>
                        <items>
                             <action type="group">
                                  <item uid="3"></item>
                                  <item uid="4"></item>
                             </action>
                        </items>
                        <FormMenu></FormMenu>
                        <DataBrowser></DataBrowser>
                   </form>
              </action>
         </forms>
    </Application>
    Regards,
    Ibai Peñ

  • TDMS - Writing a "Group" with data timestamp and values

    I'm trying to make building my trends from timewaveform max/mins easier.  Right now I have two TDMS groups: Measurement Data and Events.  Measurement data is the timewaveform data for all 32 channels.  The events group has two channels: Timestamps and Trend Data.  Is there a better way to organize these groups to build my trends easier.  Ideally I would want my data sent to my trend plot to have Measurement Data (Channel Name), Events (Timestamp), Events (Trend Data).
    What I want is similiar to what is contained in a waveform (to, dt, y) except I have a varying to and don't need the dt.
    This post may not make much sense, but I've found it much more difficult to build these trends then I think it needs to be.

    Hi LabViewer35242,
    I do not completely understand your question, would you provide some diagram, or code that you are working on?
    I would like to better understand this issue.  Here you can find a TDMS tutorial.
    Regards,
    steve.bm
    AE | NI

  • How to avoid grouping by date with dates as incoming parameters?

    Hello, I have the following Query from SAP Business One set as DataSource:
    SELECT  T1.SlpName as 'Vendor', convert(varchar(12), T0.[U_ER_PROV])as 'City', T0.[CardCode] as 'Client Code', T3.CardName as 'Client Name', T0.DocDate as 'Date', T2.ItemCode, T4.ItemName as 'Reference Description', sum (T2.Quantity) as 'Toal Units per Reference',
    avg (T2.Price)as 'Average Price', sum(T2.LineTotal) as 'Total'
    FROM ODLN T0
    INNER JOIN OSLP T1
    ON T0.SlpCode = T1.SlpCode
    INNER JOIN DLN1 T2
    ON T0.DocEntry = T2.DocEntry
    INNER JOIN OCRD T3
    ON T0.CardCode = T3.CardCode
    INNER JOIN OITM T4
    ON T2.ItemCode = T4.ItemCode
    group by  T1.SlpName, convert(varchar(12), T0.[U_ER_PROV]), T0.[CardCode], T4.ItemName, T0.DocDate, T2.ItemCode, T3.CardName
    order by  T1.SlpName, convert(varchar(12), T0.[U_ER_PROV]), T0.CardCode, T0.DocDate, T2.ItemCode
    What I´d like to do is, grouping in Crystal Reports, the result of this query by Item Code, not by date. The problem I have is that I need users introduce "from date" to "end date" as incoming paramater.
    The way I am running it, for example  I have some results like:
    date                         Item Code               Total
    01/01/2009               4646_R2                  120 u20AC
    10/01/2009               4646_R2                  34 u20AC
    And I´d like to take something like this:
    Item code                       Total
    4646_R2                         154 u20AC
    Not grouping by date ......
    Is there any way to do this using this query in Crystal Reports?
    Thanks very much for your time.
    Miguel A. Velasco

    Hello all, thanks very much to  Raghavendra for his helpfully answer.
    I followed your coments and now the report is running fine.
    Thanks again for your help without expecting anything in return.
    Miguel Velasco

  • How can i select some row from multiple row in the same group of data

    I want to select some row from multiple row in the same group of data.
    ColumnA        
    Column B
    1                  OK
    1                   NG
    2                   NG
    2                          NG
    3                          OK
    3                          OK
    I want the row of group of
    ColumnA if  ColumnB contain even 'NG'
    row , select only one row which  Column B = 'NG'
    the result i want = 
    ColumnA         Column B
    1                         NG
    2                   NG
    3                          OK
    Thank you

    That's some awful explanation, but I think this is what you were driving at:
    DECLARE @forumTable TABLE (a INT, b CHAR(2))
    INSERT INTO @forumTable (a, b)
    VALUES
    (1, 'OK'),(1, 'NG'),
    (2, 'NG'),(2, 'NG'),
    (3, 'OK'),(3, 'OK')
    SELECT f.a, MIN(COALESCE(f2.b,f.b)) AS b
    FROM @forumTable f
    LEFT OUTER JOIN @forumTable f2
    ON f.a = f2.a
    AND f.b <> f2.b
    GROUP BY f.a

  • Grouping of data based on user prompt having a list of dimensions

    Hi All,
    I have a requirement to be able to group data in OBIEE request or Dashboard based on user prompt selection.
    The prompt should list the Dimensions Available
    e.g.
    Dimensions: Product, Region, Employee
    Fact: Sales
    The report is to display sales total for the quarters of the current year.
    The user prompt should list the available dimensions (In this case - Location, Employee and Product).
    If I choose Product, the data is to be grouped by Products - Layout having a simple tabular grouping with Product names as Group headings.
    Similarly any other choice of Dimension from the prompt should group the data by that dimension and have the dimension values used in the group headings.
    How could we implement this? I understand this type of requirement (ability to choose dimension) is met in some OLAP reporting tools.
    I have used multiple views and the View Selector for similar requirements previously, but looking for a dynamic solution here.
    Any pointers or solution will be great.
    Thanks,
    Kiran
    Edited by: Kiran Kudumbur on Sep 8, 2009 5:43 PM
    Edited by: Kiran Kudumbur on Sep 9, 2009 12:42 PM
    Edited by: Kiran Kudumbur on Sep 10, 2009 2:26 PM

    Hi All,
    I used column view to address this requirement.
    Thanks,
    Kiran

  • TSQL query to calculate Count / Sum grouping by date on a Pivot Table

    Hi All
    I need help to group the pivot table output to group by dates and sum/count the values. I have a table like shown below.
    Date
    Student 
    Subject
    Hunt
    Marks
    18/02/2014
    Sam 
    Maths
    1
    20
    18/02/2014
    Sam 
    Maths
    1
    10
    18/02/2014
    Sam 
    Maths
    2
    30
    18/02/2014
    Luke
    Science
    1
    50
    17/02/2014
    Sam 
    Maths
    2
    50
    17/02/2014
    Luke
    Science
    2
    60
    16/02/2014
    Luke
    Science
    2
    20
    16/02/2014
    Luke
    Science
    3
    20
    I want to Group by dates and move the Hunt to columns calculating their counts and sum their marks too. Like given below.
    I wrote a pivot query like below but If i group it with dates and calculate the total marks it throws aggregate errors.
    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    select [DATE] , [Student], [Subject] ,[1],[2],[3],[4],Total =([1]+[2]+[3]+[4])
    from
    ( select [Date], [Student], [Subject],[Hunt],[Marks] from Student_Log
    )x
    pivot
    count ( [Hunt]) for [Hunt]
    in ([1],[2],[3],[4])
    )p
    order by [Date] desc
    I have done this far only. More than this I need to enhance it with the Percentage of Hunts for each Student.
    ie like below table.
    On 18th Sam in Maths he had 2 rows on 1st hunt  and 1 row on 2nd hunt. So On the Pivot table is it possible to represent it on percentage using the Total Attempts column.
    Thanks a lot in advance.
    Its runnung in SQL 2000 Server.

    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    ;with mycte as
    Select [Date], [Student], [Subject] ,
    Count(CASE WHEN [Hunt]=1 Then Hunt End) as Hunt1,
    Count(CASE WHEN [Hunt]=2 Then Hunt End) as Hunt2,
    Count(CASE WHEN [Hunt]=3 Then Hunt End) as Hunt3,
    Count(CASE WHEN [Hunt]=4 Then Hunt End) as Hunt4,
    Count(CASE WHEN [Hunt]=1 Then Hunt End)
    +Count(CASE WHEN [Hunt]=2 Then Hunt End)
    +Count(CASE WHEN [Hunt]=3 Then Hunt End)+
    +Count(CASE WHEN [Hunt]=4 Then Hunt End) as Total,
    ISNULL(SUM(CASE WHEN [Hunt]=1 Then Marks End),0) as Mark1,
    ISNULL(SUM(CASE WHEN [Hunt]=2 Then Marks End),0) as Mark2,
    ISNULL(SUM(CASE WHEN [Hunt]=3 Then Marks End),0) as Mark3,
    ISNULL(SUM(CASE WHEN [Hunt]=4 Then Marks End),0) as Mark4
    from Student_Log
    Group By [Date], [Student], [Subject]
    Select [Date], [Student], [Subject]
    , Cast(Hunt1*1./Total*100 as int) as [1]
    , Cast(Hunt2*1./Total*100 as int) as [2]
    ,Cast(Hunt3*1./Total*100 as int) as [3]
    ,Cast(Hunt4*1./Total*100 as int) as [4]
    ,Total,Marks=( Mark1+Mark2+Mark3+Mark4)
    from mycte
    order by [Date] DESC, Student desc
    drop table Student_Log

  • Grouping of Individual groups of Data Template in the RTF

    Hi All,
    We have a scenario where we may require the grouping of Individual groups of Data Template in the RTF.
    Lets say
    1. I have group of Invoices with the Group Name G_INV
    2. I have a list of Payments done for the Invoices under G_PAY
    3. I also have a list of Prepayment Applications that are happened on the Invoices G_PRE
    All the three groups G_INV, G_PAY, and G_PRE are independent and they are at same level
    G_INV (Main Header)
    G_PAY (Main Header)
    G_PRE (Main Header)
    Extract
    <ROOT>
    <G_INV>
    <INV>I1</INV>
    </G_INV>
    <G_INV>
    <INV>I2</INV>
    </G_INV>
    <G_INV>
    <INV>I3</INV>
    </G_INV>
    <G_PAY>
    <PAY>P1</PAY>
    <INV>I1</INV>
    </G_PAY>
    <G_PAY>
    <PAY>P2</PAY>
    <PAYINV>I2</PAYINV>
    </G_PAY>
    <G_PRE>
    <PRE>PRE1</PRE>
    <PREINV>I1</PREINV>
    </G_PRE>
    </ROOT>
    But in the Report output,
    we need the data to be displayed as follows
    G_INV (Main Header)
    G_PAY (Sub Group of Payments)
    G_PRE (Sub Group of Prepayments)
    Output
    I1
    P1
    PRE1
    I2
    P2
    I3
    So, Can you please suggest us,
    Whether we can get these Individual groups into the above required hierarchical manner. If so, please let us know how to achieve the same.
    Also, it will be great if you advice us regarding the Performance, how best will be if we group the queries in this heirarchical manner in the RTF rather than getting the hardcoded dependency through linking of the Data Queries in the Data Template file.
    Thanks,
    Praveen G

    Hi
    I dont think you can stop the table growing using Word controls. The easiest way to do it would be to limit the amount of data coming in.
    <?for-each:LOOPELEMENT[position()<5]?>
    This is take only the first 5 rows
    Tim

  • Grouping of Data in Advanced Datagrid

    Hii,
    I need to group the data in advanced datagrid. I used the Grouping collection class, but it it not working.
    My advanced datagrid has column groups...so will this have any impact on grouping.
    Thanks!!
    Vikas

    Assuming that the table (say WALK_IN_PER_LOG) that you have has atleast the following two columns
    walk_in_date DATE -- holds date time stamp
    dob DATE -- holds date of birth
    SELECT TO_CHAR(walk_in_date,'WW')&#0124; &#0124;'-'&#0124; &#0124;TO_CHAR(walk_in_date,'DAY') "Week#-Day"
    ,TO_CHAR(TRUNC(TO_CHAR(walk_in_date,'HH24')/02),'09')&#0124; &#0124;'-'&#0124; &#0124;
    TO_CHAR(TRUNC(TO_CHAR(walk_in_date,'HH24')/02)+2,'09')
    ,COUNT(*)
    FROM walk_in_per_log
    WHERE MONTHS_BETWEEN(SYSDATE,dob) > 18*12
    GROUP BY TO_CHAR(walk_in_date,'WW')&#0124; &#0124;'-'&#0124; &#0124;TO_CHAR(walk_in_date,'DAY')
    ,TO_CHAR(TRUNC(TO_CHAR(walk_in_date,'HH24')/02),'09')&#0124; &#0124;'-'&#0124; &#0124;
    TO_CHAR(TRUNC(TO_CHAR(walk_in_date,'HH24')/02)+2,'09')
    PS I might have complicated the query a little in trying to get the formatting as you had requested but the principle is simple
    First group by the day, so that all events of one day can be compared together, then extract the hour portion of each of those dates and divide by 2 and use the quotient of the division as a grouping factor.
    eg
    from hours
    00-02 the quotient is 0 (2 is taken as 1:59:59)
    02-04 the quotient is 1 (4 is taken as 3:59:59)
    and so on
    hope this helps....

Maybe you are looking for