Group and sort in group2
CREATE TABLE [dbo].[Table_1](
[group] [int] NULL,
[sort] [int] NULL,
[Item] [nchar](10) NULL
) ON [PRIMARY]
GO
INSERT [dbo].[Table_1] ([group], [sort], [Item]) VALUES (1, 1, N'Car ')
INSERT [dbo].[Table_1] ([group], [sort], [Item]) VALUES (2, 1, N'Bus ')
INSERT [dbo].[Table_1] ([group], [sort], [Item]) VALUES (1, 0, N'Bike ')
INSERT [dbo].[Table_1] ([group], [sort], [Item]) VALUES (2, 0, N'Lorry ')
INSERT [dbo].[Table_1] ([group], [sort], [Item]) VALUES (1, 1, N'Train ')
INSERT [dbo].[Table_1] ([group], [sort], [Item]) VALUES (1, 1, N'Ship ')
Data
My Dataset Query in ssrs table
Group2 expression
Group on Group
Sort on Sort
Group 1 expression
Sort on Sort
First(Item.value ) is not working.. i need to fix in ssrs since this is an an sample data of sp with more columns
my problem is once group2 is grouped, it is not taking the sort and just dispalying the First item in the sort of the item.
ShanmugaRaj
I beg your pardon, but in your example in the insert statement you have 1, 1, Ship , whereas in your report you display 1, 0 , Ship.
Why not avoid the problem at the source, byt letting T-sql do the work:
with a ([Group], [FirstSort])
AS (SELECT [GROUP], MIN(sort) As FirstSort from dbo.Table_1 group by [group])
select a.[GROUP], a.FirstSort, c.[Item] AS FirstItem , b.[sort], b.[item]
from a
inner join dbo.table_1 as b on a.[Group] = b.[group]
inner join dbo.Table_1 as c on a.[Group] = c.[group] and a.[FirstSort] = c.[Sort]
order by a.[group], b.[sort] -- LEAVE OUT the order BY in the report dataset
Gives this result (I took the insert statements from your example)
GROUP FirstSort FirstItem sort item
1 0 Bike 0 Bike
1 0 Bike 1 Car
1 0 Bike 1 Train
1 0 Bike 1 Ship
2 0 Lorry 0 Lorry
2 0 Lorry 1 Bus
Jan D'Hondt - SQL server BI development
sorry for that .. will take care heare by
ShanmugaRaj
Similar Messages
-
I have a requirement to group and sort in a report. Group should be based on id, sort based on time. Time sort should be the priority. Meaning, first criteria to sort is time, but if the id is repeated, time should be sorted for that id.
e.g, If I have ids A,B,C and values are such that A - 9:15 AM, B - 9:00 AM, A - 10:00 AM, C - 9:30 AM.
Requirement is as below
B - 9:00 AM
A - 9:15 AM
A - 10:00 AM
C - 9:30 AM
If I apply sort on time without group on id, I am getting data in the below manner which is not correct.
B - 9:00 AM
A - 9:15 AM
C - 9:30 AM
A - 10:00 AM
If I apply group first, I am not able to apply sort. Since the requirement is to show the least time first.
Please advice.use the variable
=Min([Time]) In ([ID])
to sort. Then hide the column by reducing the width and making the font and background color as white. -
Use Parameter to choose Group and Sort options
I've got a report that gets used for several different puposes, and needs to be grouped or sorted differently each time. How can I use a parameter to let the user choose the group and sort options at runtime?
I'm using CR2008, and SAP B1 2005. The various grouping options I want to offer include SKU, Vendor and Description, and sorting within those Groups by SKU or Description.
I'm a newbie with CR, so detailed instructions would be really helpful.You can create a report using parameter field. Follow these steps
-- Create new parameter in the field explorer window
-- The parameter shouls be static and enter all the field names on which you want to create in the values option
-- Now create a formula like this
if {?Parameter}="fieldname1" then
else
if {?Parameter}="fieldname2" then
else
-- Now insert new group and select this formula
-- Now the group will change according to the parameter selected
Please note that if you have different data types of fields you must need to convert totext()
as If condition will allow only one data type output.
Also when you insert any group by default the data is sorted on grouped field. If you want to sort on another field then you need to insert a summary field on that and go to report>group sort expert>select the field-->All based on the summary inserted.
Hope this helps!
Raghavendra -
Grand Totals functionality under Group and Sort
Hello community,
Does anyone know if there is a solution for rolling up text fields in the summary line item (under the Show Grand Totals functionality under Group and Sort)? I can only find that date fields and formula fields summarize. I would like to be able to summarize all the data in one line items so I wont have a really long schedule and I can present to my end users accordingly.
Thanks,
P6GURUYOUHope I understand, if you have the groups setup, you should be able to (CRXI instructions) right click on the item in the Details line, insert a summary, you can select sum, add the sum to the group. For the locations, insert a summary count, and add that to the groups.
What I do sometimes, is select the option to add summary to all groups, Perhaps change the font to red, I can see the totals
I want, and just suppress the other groups. Just a quick and dirty way to do the totals. -
Hi, I am a new PPM user I am trying to group my activities but the Group and Sort window does not respond. Any ideas?
I beg your pardon, but in your example in the insert statement you have 1, 1, Ship , whereas in your report you display 1, 0 , Ship.
Why not avoid the problem at the source, byt letting T-sql do the work:
with a ([Group], [FirstSort])
AS (SELECT [GROUP], MIN(sort) As FirstSort from dbo.Table_1 group by [group])
select a.[GROUP], a.FirstSort, c.[Item] AS FirstItem , b.[sort], b.[item]
from a
inner join dbo.table_1 as b on a.[Group] = b.[group]
inner join dbo.Table_1 as c on a.[Group] = c.[group] and a.[FirstSort] = c.[Sort]
order by a.[group], b.[sort] -- LEAVE OUT the order BY in the report dataset
Gives this result (I took the insert statements from your example)
GROUP FirstSort FirstItem sort item
1 0 Bike 0 Bike
1 0 Bike 1 Car
1 0 Bike 1 Train
1 0 Bike 1 Ship
2 0 Lorry 0 Lorry
2 0 Lorry 1 Bus
Jan D'Hondt - SQL server BI development
sorry for that .. will take care heare by
ShanmugaRaj -
Dashboards PowerShell Grid Widgets - Grouping and Sorting?
First of all, to those who made Dashboard PowerShell Grid Widgets possible - Thank you, Thank you, Thank you. Love it! So much more power except for the output......
Is there a way to group and sort my results or is it my system? Clicking the column header doesn't seem to work, no personalize option, nor does sorting in the script seem to work.
Thank you.
BTW, it looks like the dashboard is sorting by ID no matter what one does.Tried it, doesn't work. Moreover, the example in the link uses CreateInstance
whereas I'm using CreateFromObject. Below is my code. If I run the first two lines from the SCOM PS command prompt, I receive a nicely sorted results. Not so in the PowerShell Grid Widget (PsGW). If I change
my sort property to Id, then the output order matches the PsGW. So is this a result of using
CreateFromObject?
Editorial Feedback for the SCOM Team: From all the examples I've seen on the web, and most seem to be derivative of two or three MS examples, the trend appears to be that CreateInstance
is used for the PowerShell Web Browser Widget and everyone seems to be enamored by its capabilities. It sure is pretty, but for my environment doesn't offer a great deal. I feel the real meat and potatoes is PsGW - being
able to create one's own output. I'd love to see more examples of the methods in ScritpContextObject (who's link I'm unable to add) that have nothing to do with the web.
$class = Get-SCOMClass -Name Microsoft.Windows.Cluster.Group
$clstrGrpRes = Get-SCOMClassInstance -Class $class | ? { $_.HealthState -ne "Uninitialized" } | sort-object -property Name -Descending
foreach ($gRes in $clstrGrpRes)
$dataObject = $ScriptContext.CreateFromObject($gRes,"Id=Id,Health=HealthState", $null)
$dataObject["Cluster"] = $gRes.Name.Split(".")[0]
$dataObject["Group Resource"] = $gRes.Name.Split(".")[1]
$dataObject["Hosting Node"] = ($gRes | % { $_.values } | ? { $_.Type.ToString() -eq 'GroupActiveOnNodeDuringDiscovery' } ).value
$ScriptContext.ReturnCollection.Add($dataObject)
-
Grouping and sorting the data based on the parameter
Hi,
I need to display the total of item Cost i.e sub total based on parameter in Excel format
if value = 1 then (Subtotal by Manufacture) and sorting by Manufacture, Receipt Date, Organization, Item Code
if value = 2 then (Subtotal by Organization ) and sorting by Organization, Item, Serial Number
and at the end of report need to display full total
is it possible in excel output using the below xml , please guide me if i need to change the way of getting XML ouput or can be acheived using this.
Please find the xml , thanks in advance
<?xml version="1.0"?>
<!-- Generated by Oracle Reports version 6.0.8.27.0 -->
<ASWRECDTREP>
<LIST_G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>10</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PARTS</ORGANISATION_NAME>
<SERIAL_NUMBER>90699100802262</SERIAL_NUMBER>
<ITEM_CODE>OM906LA.007</ITEM_CODE>
<DESCRIPTION>MERCEDES SERIES 900 OFF HWY ENGINE 205 KW 0852</DESCRIPTION>
<MANUFACTURER>MER</MANUFACTURER>
<APPLICATION>INDL</APPLICATION>
<ITEM_COST>15009.09</ITEM_COST>
<MATERIAL_COST>685.25</MATERIAL_COST>
<PO_NUMBER>1001395</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>22-MAY-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>EUR</CURRENCY_CODE>
<PO_UNIT_PRICE>7431.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>10</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PARTS</ORGANISATION_NAME>
<SERIAL_NUMBER>90699100802285</SERIAL_NUMBER>
<ITEM_CODE>OM906LA.007</ITEM_CODE>
<DESCRIPTION>MERCEDES SERIES 900 OFF HWY ENGINE 205 KW 0852</DESCRIPTION>
<MANUFACTURER>MER</MANUFACTURER>
<APPLICATION>INDL</APPLICATION>
<ITEM_COST>15009.09</ITEM_COST>
<MATERIAL_COST>685.25</MATERIAL_COST>
<PO_NUMBER>1001395</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>22-MAY-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>EUR</CURRENCY_CODE>
<PO_UNIT_PRICE>7431.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>30</ORGANIZATION_CODE>
<ORGANISATION_NAME>Melbourne</ORGANISATION_NAME>
<SERIAL_NUMBER>6520107896</SERIAL_NUMBER>
<ITEM_CODE>3500.010</ITEM_CODE>
<DESCRIPTION>ALLISON 3000 SERIES ON HWY TRANSMISSION E018179</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>11126.11</ITEM_COST>
<MATERIAL_COST>664.23</MATERIAL_COST>
<PO_NUMBER>971515</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>14-APR-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>8063.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>30</ORGANIZATION_CODE>
<ORGANISATION_NAME>Melbourne</ORGANISATION_NAME>
<SERIAL_NUMBER>6510869062</SERIAL_NUMBER>
<ITEM_CODE>3200.010</ITEM_CODE>
<DESCRIPTION>ALLISON 3000 SERIES ON HWY TRANSMISSION E017944</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>11853.57</ITEM_COST>
<MATERIAL_COST>707.66</MATERIAL_COST>
<PO_NUMBER>982120</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>12-MAY-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>8251.6</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>40</ORGANIZATION_CODE>
<ORGANISATION_NAME>Brisbane</ORGANISATION_NAME>
<SERIAL_NUMBER>D6002 G6003</SERIAL_NUMBER>
<ITEM_CODE>520 SERIES.002</ITEM_CODE>
<DESCRIPTION>KONRAD 520 SERIES MARINE STERN DRIVE</DESCRIPTION>
<MANUFACTURER>OTH</MANUFACTURER>
<APPLICATION>MARI</APPLICATION>
<ITEM_COST>9296.95</ITEM_COST>
<MATERIAL_COST>482.91</MATERIAL_COST>
<PO_NUMBER>1009062</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>24-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>6939.29</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>40</ORGANIZATION_CODE>
<ORGANISATION_NAME>Brisbane</ORGANISATION_NAME>
<SERIAL_NUMBER>ABC123</SERIAL_NUMBER>
<ITEM_CODE>GM20541-KP1.001</ITEM_CODE>
<DESCRIPTION>KOHLER GENSET</DESCRIPTION>
<MANUFACTURER>KOH</MANUFACTURER>
<APPLICATION>PGEN</APPLICATION>
<ITEM_COST>756.83</ITEM_COST>
<MATERIAL_COST>.78</MATERIAL_COST>
<PO_NUMBER>1015156</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>14-OCT-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>AUD</CURRENCY_CODE>
<PO_UNIT_PRICE>20</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>40</ORGANIZATION_CODE>
<ORGANISATION_NAME>Brisbane</ORGANISATION_NAME>
<SERIAL_NUMBER>ABC124</SERIAL_NUMBER>
<ITEM_CODE>GM20541-KP1.001</ITEM_CODE>
<DESCRIPTION>KOHLER GENSET</DESCRIPTION>
<MANUFACTURER>KOH</MANUFACTURER>
<APPLICATION>PGEN</APPLICATION>
<ITEM_COST>756.83</ITEM_COST>
<MATERIAL_COST>.78</MATERIAL_COST>
<PO_NUMBER>1015156</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>14-OCT-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>AUD</CURRENCY_CODE>
<PO_UNIT_PRICE>20</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>06R1017763</SERIAL_NUMBER>
<ITEM_CODE>6062HK30.005</ITEM_CODE>
<DESCRIPTION>DETROIT SERIES 60 MARINE ENGINE 615 KW 2949322</DESCRIPTION>
<MANUFACTURER>MDD</MANUFACTURER>
<APPLICATION>MARI</APPLICATION>
<ITEM_COST>99125.34</ITEM_COST>
<MATERIAL_COST>2028.31</MATERIAL_COST>
<PO_NUMBER>883339</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>05-MAR-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>63768</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310935001</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1000221</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>01-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310935002</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1000221</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>01-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310935003</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1000221</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>01-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6510876301</SERIAL_NUMBER>
<ITEM_CODE>T350R.004</ITEM_CODE>
<DESCRIPTION>ALLISON TORQMATIC ON HWY TRANSMISSION</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>9465.69</ITEM_COST>
<MATERIAL_COST>597.33</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>6936.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6510876302</SERIAL_NUMBER>
<ITEM_CODE>T350R.004</ITEM_CODE>
<DESCRIPTION>ALLISON TORQMATIC ON HWY TRANSMISSION</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>9465.69</ITEM_COST>
<MATERIAL_COST>597.33</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>6936.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6510876303</SERIAL_NUMBER>
<ITEM_CODE>T375R.002</ITEM_CODE>
<DESCRIPTION>ALLISON TORQMATIC ON HWY TRANSMISSION</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>10224.19</ITEM_COST>
<MATERIAL_COST>645.19</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>7433.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940354</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940355</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940356</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940357</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>5272003543</SERIAL_NUMBER>
<ITEM_CODE>T1637K33.002</ITEM_CODE>
<DESCRIPTION>DETROIT SERIES 4000 INDUSTRIAL ENGINE 1865 KW 2456291</DESCRIPTION>
<MANUFACTURER>MDD</MANUFACTURER>
<APPLICATION>MNIG</APPLICATION>
<ITEM_COST>420083.16</ITEM_COST>
<MATERIAL_COST>3785.85</MATERIAL_COST>
<PO_NUMBER>921170</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>30-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>301549</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
</LIST_G_ASW_REC_DATE>
</ASWRECDTREP>
Best Regards,
MahiHi Vetri,
I tried to implement the solution you have given and i am getting error,
I tried to see the output by loading the xml to the template given in BIP Blog in the following Link,
http://blogs.oracle.com/xmlpublisher/2007/05/left_up_down_right_group.html
I am getting the same error,Please help me how to overcome this.If possible send me the template that was working for you.
The error log is as follows:
ConfFile: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config\xdoconfig.xml
Font Dir: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
Run XDO Start
Template: C:\Users\MAHESH\Desktop\Grouping.rtf
RTFProcessor setLocale: en-us
FOProcessor setData: C:\Users\MAHESH\Desktop\EmployeeListing.xml
FOProcessor setLocale: en-us
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at RTF2PDF.runRTFto(RTF2PDF.java:629)
at RTF2PDF.runXDO(RTF2PDF.java:439)
at RTF2PDF.main(RTF2PDF.java:289)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at oracle.xdo.parser.v2.XSLTContext.peekExprValue4Grouping(XSLTContext.java:871)
at oracle.xdo.parser.v2.XPathFunctionCall.evaluate(XPathFunctionCall.java:536)
at oracle.xdo.parser.v2.XPathFunctionCall.evaluate(XPathFunctionCall.java:583)
at oracle.xdo.parser.v2.XSLVariable.getValue(XSLVariable.java:205)
at oracle.xdo.parser.v2.XSLVariable.processAction(XSLVariable.java:117)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:512)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
... 15 more
Best Regards,
Mahi -
Grouping and sorting multiple cells
Is there a way to group multiple contiguous cells so that they act as one large "super" cell, then have Numbers sort the groups according to a value in one of the individual cells in the group?
I have created a document that has several columns and rows that are added together to arrive at a value that is put into a cell in the bottom right corner of the group. I need to sort these groups according to the value in that last cell in each group.
I hope that makes sense.Seth,
Consider putting the group value in each row so that when you sort, rows with the same group value will stay together. The column with this value can be hidden and you can repeat it in another column on the last row of each group. This will probably require another auxiliary column to keep the rows in the proper order within a group, and a two-level sort.
Jerry -
Hi,
I am sorting the ALV Display on the basis of Assignment Field. It is getting sorted, but it is displaying the value in all the lines/rows. I want to display it only once(the first row) if the value is same.
Also, the first line of the ALV Output is a checkbox.
At present the check-box is displayed in all the rows.
My requirement is to display the check-box once for every new Assignment. So, if there are 5 rows with the same Assignment Value then only one check-box should appear, either in the first or fifth row.
Your help will be definitely appreciated.
Thanks,
~ PayelThere is no Direct solution in this case....
1. Hade one extra field of type lenght 4 chars.
2. populate the ICON value for unselected checkbox.
3. Change the Fieldcatalog for the field which is added in step1.
4. Populate the sort information.
5. Handle the usercommand to check or uncheck based on action.
Check the sample code..
REPORT zalv_total_sub.
TYPE-POOLS: slis.
INCLUDE <icon>.
DATA: BEGIN OF it_flight OCCURS 0,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
check(4), "Step1
END OF it_flight.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv.
DATA: it_sort TYPE slis_t_sortinfo_alv,
wa_sort LIKE LINE OF it_sort.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
SORT it_flight BY carrid.
"Step 2....
LOOP AT it_flight.
it_flight-check = icon_wd_iframe.
MODIFY it_flight.
ENDLOOP.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
CLEAR wa_fcat.
"Step3...
wa_fcat-hotspot = 'X'.
wa_fcat-icon = 'X'.
wa_fcat-col_pos = 1.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING col_pos icon hotspot
WHERE fieldname = 'CHECK' .
wa_sort-fieldname = 'CARRID'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO it_sort.
" Step 4.
CLEAR wa_sort.
wa_sort-fieldname = 'CHECK'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_user_command = 'USER_COMMAND' "Step5
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
"Step 5 implementation.
FORM user_command USING ucomm TYPE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
CASE selfield-fieldname.
WHEN 'CHECK'.
READ TABLE it_flight INDEX selfield-tabindex.
IF sy-subrc EQ 0.
IF it_flight-check = icon_checkbox.
it_flight-check = icon_wd_iframe.
ELSE.
it_flight-check = icon_checkbox.
ENDIF.
MODIFY it_flight TRANSPORTING check
WHERE carrid = it_flight-carrid.
ENDIF.
ENDCASE.
ENDCASE.
selfield-refresh = 'X'.
ENDFORM. "user_command
Check it and let me know if any issues with the code. -
Is it possible to have sorting by group and checkboxes in the same ALV
Hi there,
Does anyone know whether it is possible to have sorting and group on one field in ALV and checkboxes set on another field in ALV?
eg.
Fieldname
===========
Name----
Text
Allowance----
Numeric -> Sort & Group
Verified----
Checkbox
How do I code it if it is possible to have grouping and check box all in one ALV. Meaning I want some data that are the same to merge using sort, while still having the checkbox available for my other field (Verified).
Thanks in advance.
Lawrencehi,
GROUP BY clause is used on database tables with select statement.
sort is used on internal tables.
can u clearly explain y u need group by and sort on the same field.
if u are extracting from dbtable using grou by clause on a field, then no need to sort it again.
if u want sort u can do it by giveing "sort itab by field". thats not a problem.
now coming to check box.instead of using SLIS type field catalog, u use LVC type.
in LVC_S_LAYO, u can fine box_fname.
while defining layout, u declare a variable of type LVC_S_LAYO
AND GIVE BOX_FNAME = internal table field name -
Group by sort order and display accordingly
I have two groups - primary sort order and a secondary sort order in my report, formula for both follows:
If {?Sort Order}='1' then {PRODUCT_CUSTOMER_MNT_V.CUSTOMER_NAME}
else if {?Sort Order}='2' then {PRODUCT_CUSTOMER_MNT_V.PRODUCT_ID}
else if {?Sort Order}='3' then {PRODUCT_CUSTOMER_MNT_V.CUST_REVISION_LEVEL}
else if {?Sort Order}='4' then {PRODUCT_CUSTOMER_MNT_V.CMS_UD36}
else if {?Sort Order}='5' then {PRODUCT_CUSTOMER_MNT_V.CMS_UD38}
else if {?Sort Order}='6' then totext(year({PRODUCT_CUSTOMER_MNT_V.PURCHASE_DATE}),0,"")"/"
right("0" + totext(month({PRODUCT_CUSTOMER_MNT_V.PURCHASE_DATE}),0,""),2)"/"
right("0" + totext(day({PRODUCT_CUSTOMER_MNT_V.PURCHASE_DATE}),0,""),2)
Groups are suppressed and fields are placed in the detail the line. I have a request to group by Customer name with selected product ID's listed or vice versa. My quandry is how do I accomodate the descriptive fields in the page header since the user can select any number of combinations using the sort order parameter. Sure, right now they are only looking at customer and product ID but let's face it, that requirement could change in the future. Seems simple enough but it's been awhile since I've touched reports and my brain is fuzzy. Is what I'm trying to do possible? Crystal XI (11.0.0.1282)I was overthinking the problem. The report was already sorting on customer or product based on user selection. I placed the customer ID/Name field and the Product ID field into group one and checked the underlay following section box in section expert. This is will work fine for our purposes.
-
Russian and English combined Index Group Title and sort order
How should I create the combined index Group Title and sort order in Russian and Greek documentations?
The final product one Russian manual which contains some English Index marker ...
And what is the problem?
You can control the sorting by placing a [...] tag in the Marker Text, such as:
[Сплайн] Spline
The term(s) in the brackets are used only for sort. What appears in the Index is the following text.
Or you can just edit the Marker Text.
But it sounds like there might be more than one question here, re: Group Titles. -
Hash GROUP BY And Sort GROUP BY
Can anyone please explain how does Hash GROUP BY And Sort GROUP BY exactly work ?
Thank you.As the name suggests, SORT GROUP BY achieves the same goal by sorting.According to Tom SORT GROUP BY doesn't always sort correctly .. tried to understand his explanation as he said "It always did a BINARY SORT - not a character set sort. So the data would be sorted incorrectly if you use anything but very simple ASCII strings..."
can you give me an example where binary value of a string A is greater than string B while ascii value of string B is greater than string A ?
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:75397449124988
Thank you -
Hi All,
I like to keep track of Groups and Users added into our Domain Admins. Yes, it should always be minimal, but if I can have a daily report just to be certain, I'll sleep better.
The following works just fine if there is a single nested group. I cannot get it to work properly if there is more than one. I'm hoping you'll see what I'm missing.
Works fine:
$admins = get-adgroupmember "domain admins"
foreach($i in $admins){if($i.objectClass -eq "group"){ get-adgroupmember $i.samaccountname |foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($i.name)}} | select username,group | export-csv c:\Users_and_Groups.csv -Notypeinformation}}
Does not work well. Result is that the "Group" information doesn't change to the correct group:
$myCol=@()
foreach($admin in $admins){if($admin.objectClass -eq "group"){$myCol+=$admin.samaccountname}{foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group
| export-csv c:\Users_and_Groups.csv -Notypeinformation}}}
Here is what I have in $myCol:
PS C:\Users\Administrator> $myCol
MarketingPSO
RMSysAdmins
I tried shortening up the one-liner a bit more, but for some reason the "RMSysAdmins" is the only Group listed even though Leia and Han are in the MarketingPSO Group:
foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group }
username
Group
Leia Organa
RMSysAdmins
Han Solo
RMSysAdmins
c3po
RMSysAdmins
Darth Vader
RMSysAdmins
Boba Fett
RMSysAdmins
Thank you very much for your time,
Mr MisterHi Mr Mister,
To get nested group members, this script is for your reference:
function Get-ADNestedGroupMembers {
[cmdletbinding()]
param ( [String] $Group )
Import-Module ActiveDirectory
$Members = Get-ADGroupMember -Identity $Group|sort-object objectClass -descending
$members | % {
if($_.ObjectClass -eq "group") {
Get-ADNestedGroupMembers -Group $_.samaccountname
} else {
New-Object PSObject -Property @{ username = $_.name;Group = $Group }}
Get-ADNestedGroupMembers "groupname"
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Album Info and Sort Order?
Two Questions really, both of which I think (I hope!) are just me not quite getting the interface:
1) In iPhoto an album can have comments associated with the it. I tended to put in notes that related to all the pictures in the album, when I did the import from iPhoto I can't seem to find these album comments anywhere, I can only get the inspector to show a given image version info.
2) When looking at the listing of albums on the left I have them in folders by year 2001, 2002, etc. Within each folder everything seems to be alphabetical - if I have albums called:
"A Album 2005-10-05" and "B Album 2005-01-10" then A comes before B and they are not in the proper order. Is there anyway to tell the Aperture to either:
- Sort in date order?
- Don't sort at all and allow me to just drag and place the albums in whatever order I want?
I know I can rename my albums to have the date info at the start of the album in order to get this to work, but I don't really have a ton of motivation to do that for hundreds of albums. I guess a third question is if there would be some useful way to automate that?I had the same issue. I compared the "get info" for two songs from the same U2 album, and the difference in my case was that the song from group A had U2 listed as the album artist. Song B was in a different group and that field was blank. I typed U2 into that field, and voila! The wayward songs migrated into the correct album.
Maybe you are looking for
-
Alternative Periods in Report Painter
I'm trying to create a report painter report for labour efficiency, it compares actual labour confirmations to a statistical key figure for payroll hours. I have the basic elements, but my problem is this. We currently run our accounts on a calendar
-
Photos not showing in media viewer
Hi.. I am using iweb 09 to build my website. However I cant view my photos that I have in Aperture, in the media viewer in iweb. I only have the one Aperture project on my laptop, and all of the non-edited... and edited photos within that project don
-
ABAP Runtime error when doing component assignment in routing creation.
Hi All, I have a problem in component assignment while creating routing (CA01) by using Copy from function. We are creating a Sale order specific routing for a finished material by copying it from the same material. The Transaction runs very slow and
-
Modified pictures not updated in iPhoto
Hi everyone, I'm using iPhoto 11(9.3.2) to manage my photolibrary. Best tool ever. For modifying my pictures, I use the external application Photoshop Elements 10(10.0) Opening the external app, including the chosen picture works fine. Saving also. H
-
Webi Reports - Stale data when saved a pdf/xls
Hi Webi Guru's - we have a peculiar issue in our BOBJ Production system. To give you a bit of background on our production system - is hosted on O/S - EL 2.6 Database - Oracle 11g IE version - 9 2 Tomcat 6 servers, load balanced using F5 load balance