First Row with $s n below w/o $s
For a hierarchy is it poss to show the amounts with $ sign in the first row & without the $ signs below ??
Something like say for a country Hierarchy :
<b>-Month--
Year to date</b>
2007|2006|INC ( Diff ) |%________________2007|2006|INC ( Diff ) |%
USA Amount----$50,000|$40,000_|$10,000______|25(10/40)_________$1000|$800|$200____|25
TexasAmount----50,00|40,00_|10,00______|25(10/40)_________1000|800|200____|25
How do I accomplish or any workaround to get close by..
I have tried scaling factor but that is showing a seperate grey column with dollar signs....
I found a close workaround to suppress all $ amounts :
I had to create 4 new Formulaes with the Nodim Function & make the other 4 as formula NODIMS and Hide the 4 Selectoins .
Ex : NODIM ( SELECTION1 )
_____Selectoin1 - Hidden.
However this is not I wanted
<b>Is there any other efficient way to get $ signs in first row only suppressing the signs in all below rows ?</b>
Message was edited by:
Jr Roberto
Hi Roberto,
Try to include the $ sign in the Header.(i.e. in Structure Selections)
Your header should look like
2007|2006|Diff|
$ $ $
Then use the NODIM Function to suppress the $ sign in below row results.
Cheers
Praveen
Similar Messages
-
Problem: I search for 20 companies with highest turnover in a table. Its a dynamic SQL (created at runtime), I can not use a hard coded fetch of 20 rows.
(Example is a simple table with companyID, turnover and a key)
I read in documentation, that first rowno is applied, then the order (to be fast and not access the whole big table). Ok.
Oracle goes same way, this is the work around:
SELECT * FROM (SELECT t1.Firmid_i AS t1_Firmid_i, SUM( t1.Amount_dc ) AS t1_Amount_dc FROM DEMO.turnover t1 GROUP BY t1.Firmid_i, t1.Productid_i ORDER BY 2 desc ) WHERE rownum <= 20
I try this on a MaxDb :
SELECT * FROM (SELECT t1.Firmid_i, MAX( t1.Amount_dc ) FROM DEMO.turnover t1 GROUP BY t1.Firmid_i ORDER BY 2 asc) WHERE rowno <= 20
-> an error occur (General error;-5016 POS(103) Missing delimiter: ), the order in the inner sql is not allowed
I can change the statement:
SELECT * FROM (SELECT t1.Firmid_i, MAX( t1.Amount_dc ) FROM DEMO.turnover t1 GROUP BY t1.Firmid_i) WHERE rowno <= 20 ORDER BY 2 asc
Now I got 20 row (20 rows sorted), but not the results I need (sort is used to late).
Does anyone knows a workaroud?
TIA
ChristianHello Christian,
Unfortunately, MaxDB does not support the ORDER BY/GROUP BY condition in sub-selects to achieve such a result set limitation, nor does it support a kind of LIMIT statement
as MS-SQL does.
Anyway, to give the correct results, the query will anyway
create the complete result set, to apply the correct sorting (as the rows can only be sorted when for all rows the values are known).
There is unfortunately no way to formulate such a query
in a single SQL statement, and so you can only
fetch as much rows you need, and discard the rest,
which you said is not possible for you.
Sorry
Alexander Schröder -
I am trying to change the following code so then the fixed rows will stay on top(but below the headers!), but when I change getContentPane().add(fixedScroll, BorderLayout.SOUTH); to getContentPane().add(fixedScroll, BorderLayout.NORTH); it stays above the headers. How can I put the first rows on top, but below the headers ? Thanks.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
* @version 1.0 03/05/99
public class FixedRowExample extends JFrame {
Object[][] data;
Object[] column;
JTable fixedTable,table;
private int FIXED_NUM = 2;
public FixedRowExample() {
super( "Fixed Row Example" );
data = new Object[][]{
{ "a","","","","",""},
{ "","b","","","",""},
{ "","","c","","",""},
{ "","","","d","",""},
{ "","","","","e",""},
{ "","","","","","f"},
{"fixed1","","","","","","",""},
{"fixed2","","","","","","",""}};
column = new Object[]{"A","B","C","D","E","F"};
AbstractTableModel model = new AbstractTableModel() {
public int getColumnCount() { return column.length; }
public int getRowCount() { return data.length - FIXED_NUM; }
public String getColumnName(int col) {
return (String)column[col];
public Object getValueAt(int row, int col) {
return data[row][col];
public void setValueAt(Object obj, int row, int col) {
data[row][col] = obj;
public boolean CellEditable(int row, int col) {
return true;
AbstractTableModel fixedModel = new AbstractTableModel() {
public int getColumnCount() { return column.length; }
public int getRowCount() { return FIXED_NUM; }
public Object getValueAt(int row, int col) {
return data[row + (data.length - FIXED_NUM)][col];
table = new JTable( model );
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.setAutoCreateRowSorter(true);
fixedTable = new JTable( fixedModel );
fixedTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
fixedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
JScrollPane scroll = new JScrollPane( table );
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
JScrollPane fixedScroll = new JScrollPane( fixedTable ) {
public void setColumnHeaderView(Component view) {} // work around
// fixedScroll.setColumnHeader(null);
fixedScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
JScrollBar bar = fixedScroll.getVerticalScrollBar();
JScrollBar dummyBar = new JScrollBar() {
public void paint(Graphics g) {}
dummyBar.setPreferredSize(bar.getPreferredSize());
fixedScroll.setVerticalScrollBar(dummyBar);
final JScrollBar bar1 = scroll.getHorizontalScrollBar();
JScrollBar bar2 = fixedScroll.getHorizontalScrollBar();
bar2.addAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent e) {
bar1.setValue(e.getValue());
scroll.setPreferredSize(new Dimension(400, 100));
fixedScroll.setPreferredSize(new Dimension(400, 52)); // Hmm...
getContentPane().add( scroll, BorderLayout.CENTER);
getContentPane().add(fixedScroll, BorderLayout.SOUTH);
public static void main(String[] args) {
FixedRowExample frame = new FixedRowExample();
frame.addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit(0);
frame.pack();
frame.setVisible(true);Sorry, this code missed a very important line:
table.setAutoCreateRowSorter(true);
So you meant:
Object[][] header;//class atribute
header=new Object[][]{//in the constructor
{ "h","i","j","k","l","m"},
{ "h","i","j","k","l","m"}
public Object getValueAt(int row, int col) {//in the TableModel
if (row==0){
return header[row][col];
else {
return data[row][col];
I tried, but when I sort, the first row get sorted with the rest. -
How to join each row with other in the same table without repeating, please help
Hi,
I have a table say Adjustment having following data
Emp_Id
Adjustment_id
Date
1000101
1000300
2014-02-12 00:00:00.000
1000101
1000301
2014-02-12 00:00:00.000
1000101
1000302
2014-02-12 00:00:00.000
1000101
1000303
2014-02-12 00:00:00.000
1000102
1000302
2014-02-12 00:00:00.000
1000102
1000303
2014-02-12 00:00:00.000
1000102
1000304
2014-02-12 00:00:00.000
And I want following records:
Emp_Id
Adjustment_id Adjustment_id1
Date
1000101
1000300 1000301
2014-02-12 00:00:00.000
1000101
1000300 1000302
2014-02-12 00:00:00.000
1000101
1000300
1000303
2014-02-12 00:00:00.000
1000101
1000301 1000302
2014-02-12 00:00:00.000
1000101
1000301 1000303
2014-02-12 00:00:00.000
1000101
1000302 1000303
2014-02-12 00:00:00.000
1000102
1000302 1000303
2014-02-12 00:00:00.000
1000102
1000302 1000304
2014-02-12 00:00:00.000
1000102
1000303
1000304
2014-02-12 00:00:00.000Hi Uri,
I am using SQL Server 2008, and I am trying join each adjustment_id with all other adjustment_id having same Date and Emp_id.
so for following table records:
Emp_Id
Adjustment_id
Date
1000102
1000302
2014-02-12 00:00:00
1000102
1000303
2014-02-12 00:00:00
1000102
1000304
2014-02-12 00:00:00
Output should be:
Emp_Id
Adjustment_id Adjustment_id
Date
1000102
1000302 1000303
2014-02-12 00:00:00 (first row with 2nd)
1000102
1000302 1000304
2014-02-12 00:00:00 (first row with 3rd)
1000102
1000303 1000304
2014-02-12 00:00:00 (2nd row with 3rd) -
Date Controls in repeating table of Infopath 2013 only showing Calendar in first row date controls
I am using SharePoint 2013 and InfoPath 2013.
and using form library which uploaded at server.
I am using repeating table over section . and place Date Controls.
At the run time it is showing first row with START and END
date controls.
when I click INSERT Item it is showing second row with
Date Controls.
It is opening and showing calendar only on first row.
But when I click Date Control button at second row it is not showing or opening calendar.
Yesterday it was working. but today is not working at site.
Although it is working on InfoPath 2013 Preview.Hi John,
Based on your description, my understanding is that the Date Control cannot work correctly in the InfoPath form.
I recommend to re-publish the form to SharePoint and then compare the results.
Please go to the Library setting page of the library where the form is published > click Advanced Settings > click Edit Template in the Document Template > now the form will be opened in InfoPath Designer and then click Quick Publish button in the
top of the menu tab.
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
How to render a Custom LOV Pop Up with its first Row selected
Hi All,
I have a requirement in my Custom LOV ,
I want to render my custom LOV with Query panel and resulset table in such way, where the first row is selected and the users are able to use the KEY Up and Down Arrows and Enter key to select it.
Currently, the user as to do a single Click atleast one time on a row , so that they can use their KEYs to do the selection.
How can I achieve the above requirement ? Any thoughts ?
Thanks
TKHi,
The answer to your query is 'Yes'. You need to design a 'UPDATE' metadata type custom integrator. The custom integrator shall use a parameter based view to first download data and then use a PL/SQL wrapper/API to re-upload it back. The brief steps are listed below:
1. Create a 'UPDATE' metadata type custom integrator. Give a parameter list name, std/custom view for data download and a PL/SQL wrapper.
2. Create a form function and associate the form function with the custom integrator created.
3. Add the form function to the std WebADI menu for access.
4. Define a layout for the custom integrator defined.
4. To create a parameter use the standard integrator 'HR Standalone Query'. As a part of this integrator you can define the SQL WHERE clause (parameter based) that you will like to use with the custom/std view defined in the custom integrator definition.
Note: You can use a max of 5 parameters only. For each parameter, one needs to define the datatype and also the HR standalone query has a size limitation of 2000 chars in 11i10. You increase this length you may apply patch - 3494588 to get 4000 chars.
Hope this information helps.
Thanks,
Nitin jain -
I have created a crystal report with credit and debit column. Balance column created on the report. Report running with cummulative balance. THis report contain an option for date range. If i filtered this report its not showing the actual balance. I need
a first row to indicate previous balance as opening balance in this report. And following is the formula for balance column.
Whileprintingrecords;
Shared Numbervar balance;
Shared Numbervar display;
balance:={@debit}-{@credit};
display:=display+balance;
displayAs this question is out of the T-SQL queue, thus I would suggest you consult Crystal Report questions to the correct forums.
C#
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
VB
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral
people there have more knowledge on Crystal Report. -
Issue with empty value of LOV of first row after clicking on add row button
JDeveloper 11.1.14
I have a page with table-form layout.
In the form I have two detail tables on the same page (tabbed).
I have an issue with using model-choicelist LOV's in the detail tables.
I am able to add a new row in the detail table, select a value from the model-choiceList LOV (which is required) and save the new row.
After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database,
I have checked it in the datbase. Only the value of the LOV of the first row on the page is being cleared after clicking on the add row button.
After saving the new row I get the following error on the screen:
Error: a selection is required. --> first row
Does anyone have a suggestion how to solve this issue?After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database, Is the complete LOV blank or only the selected value .. can you try putting autoSubmit=true in the LOV and try ? Also check if you have any partialTriggers on the LOV from the add button ?
-
EditCellAt() with mouseclick is not working for first row of the jtable
Hi All,
I have extended JTable.changeSelection() & editCellAt() methods to force the text to select when focus is brought to the cell.
I have a page which has both editable and non-editable columns. when I do a mouse click on FIRST ROW of the editable cell and type the value, The value is not displayed in the cell. when I click on any other editable field in the page, The typed value is displayed in the cell. In the first row of the cell, only the first attempt is not working. When I remove the editCellAt() call in changeSelection(), it works as expected.
But, If I reach the FIRST ROW editable cell using TAB key instead of Mouse click and type the value, its working fine.
Kindly suggest me what could be the problem in my code. I think something wrong in editcellat() or mouseclicked/released or focusgained in our versions of JTable or jtextfield.
Kindly let me know if you need any more functions of my version of implementation.
Thanks In advance.
My JTable Version of editCellAt:
public boolean editCellAt(int row, int column, EventObject e) {
try {
if (getCellEditor() != null && !getCellEditor().stopCellEditing()) {
return false;
if (!isCellEditable(row, column)) {
return false;
if (isShowStarRow() /*&& !starRowAdded*/) {
VSDataControl ds = getDataSource();
if (ds != null) {
VSResultSet rs = ds.getResultSet();
if (rs != null) {
if (row == rs.getRowCount()) { // This is the star row
// Go to the last record
if (row > 0) {
try {
rs.getRowAt(row + 1, true);
rs.last();
} catch (Exception ex) {
return false;
if (ds.insert() == null) {
return false;
currentRow = row + 1;
starRowAdded = true;
TableCellEditor editor = getCellEditor(row, column);
if (editor != null && editor.isCellEditable(e)) {
editorComp = prepareEditor(editor, row, column);
if ( editorComp instanceof VSGridChoice && lastKeyEvent != null ) {
VSGridChoice choice = (VSGridChoice) editorComp;
choice.handleMissingCharEvent( lastKeyEvent );
if (editorComp instanceof VSChoiceBase && lastKeyEvent != null ) {
VSChoiceBase hack = (VSChoiceBase)editorComp;
hack.addMissingChar(lastKeyEvent);
lastKeyEvent = null;
if (editorComp == null) {
removeEditor();
return false;
editorComp.setBounds(getCellRect(row, column, false));
add(editorComp);
editorComp.validate();
editorComp.requestFocus();
setCellEditor(editor);
setEditingRow(row);
setEditingColumn(column);
editor.addCellEditorListener(this);
return true;
return false;
} catch (Exception ex) {
showValidationError(e, ex);
return false;
public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
super.changeSelection(rowIndex, columnIndex, toggle, extend);
editCellAt(rowIndex, columnIndex);
if (getEditorComponent() != null)
if (getEditorComponent() instanceof CustomJTextField)
((CustomJTextField)getEditorComponent()).selectAll();
}i will suggest you to override your requetFocus()
like.
public void requestFocus()
super.requestFocus(); // may be panel or container.
textPane.setSelectionStart(0); // textpane is the editor for the cell.
textPane.setSelectionEnd(textPane.getText().length());
} Gud luck. -
Re:colors in Excel sheet (first row should be completely filled with yellow
I am using the type pools OLE2 to put colors in the Excel sheet.
What is the property to fill color in the Excel sheet cell.
i got the text in colors but not the background...
for example:
i need the first row ie..the heading to be in yellow.
Can some one send me some sample code .plz its urgent..........Hi,
Check to see the following code:
Sub Find_match()
Dim Range1 As Range
Dim Range2 As Range
Set Range1 = Application.InputBox("Select the range on the first sheet to Compare", Type:=8)
Set Range2 = Application.InputBox("Select the range on the second sheet to Compare", Type:=8)
Dim range_row1 As Integer
Dim range_row2 As Integer
Dim loop_row1 As Integer
Dim loop_row2 As Integer
Dim find_value As String
range_row1 = Range1.Rows.Count
range_row2 = Range2.Rows.Count
For loop_row1 = 1 To range_row1
find_value = Range1.Cells(loop_row1, 1)
For loop_row2 = 1 To range_row2
If Range2.Cells(loop_row2, 1) = find_value Then
If Range1.Cells(loop_row1, 2) = Range2.Cells(loop_row2, 2) Then
Range1.Rows(loop_row1).Interior.Color = vbYellow
End If
End If
Next
Next
End Sub
When the macro run, it will prompt to select the range in both sheet, the range is where the cells contain the data, it contains two columns.
Jaynet Zhang
TechNet Community Support
Jaynet,
Thank you so much. This is exactly how I wanted it to work. The only thing I wanted to know which I will try and figure out while I await your answer is if I can make this work between workbooks instead of worksheets? Currently, it does not allow me to switch
workbooks when running the macro to select the second range. Thank you. -
SSRS report with cube – MDX query how to get an extra row with value '0'.
Hello everyone,
I'm unable to write the MDX query to get '0' value as first row in output. Following is my MDX query:
WITH MEMBER [Measures].[Dummy] AS '0'
SELECT NON EMPTY Union( {[Measures].[Amount] },{[Measures].[Dummy]}) ON COLUMNS,
NON EMPTY { ([Customer].[Customer Nbr].[Customer Nbr].ALLMEMBERS * [Fiscal].[Year].[Year].ALLMEMBERS ) }
having [Measures].[Amount] > 5000
ON ROWS FROM [cube]
With above query, the output returns the value '0' as a separate column.
I would like to get it in form of first row for [Measures].[Amount]. Like,
Amount
0
500
200
100
What needs to be changed to achieve the above result? I'm planning to use the above value in line chart to start the line from 0th value as described in following URL. (Note: The below URL is using SQL query and not MDX expressions.)
http://spinerain.blogspot.in/2013/09/ssrs-line-chart-create-stacked-line-and.html
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlThe round brackets in your expression are forcing an implicit crossjoin between the 3 lines. I would do the following which creates a set of the DummyYear plus the real year members and then crossjoin that with the customer set.
WITH MEMBER [Fiscal].[Year].DummyYear AS '0'
SELECT NON EMPTY {[Measures].[Amount]} ON COLUMNS,
NON EMPTY {[Fiscal].[Year].DummyYear,
[Fiscal].[Year].[Year].MEMBERS} *
[Customer].[Customer Nbr].[Customer Nbr].MEMBERS
having [Measures].[Amount] > 5000
ON ROWS FROM [cube]
http://darren.gosbell.com - please mark correct answers -
How to select first row of each group in a group by statement
Table
ProdCode PackType BatchCode ExpDate
BURSLO 1 BS20GO-2001 01/12/2004
BURSLO 1 BS20GO-2011 01/01/2007
BURSLO 2 BS20GO-2027 01/02/2003
BURSLO 3 BS20GO-2060 01/02/2004
BURSOI 9 BU10F12 01/02/2006
BURSOI 9 BU10GO-1301 01/05/2005
BURSOI 11 BU10GO-131 01/06/2008
BURSOI 2 BU10GO-1311 01/06/2007
BURSOI 13 BU10GO-1328 01/07/2006
Output
ProdCode PackType BatchCode ExpDate
BURSLO 1 BS20GO-2011 01/01/2007
BURSLO 2 BS20GO-2027 01/02/2003
BURSLO 3 BS20GO-2060 01/02/2004
BURSOI 9 BU10F12 01/02/2006
BURSOI 11 BU10GO-131 01/06/2008
BURSOI 2 BU10GO-1311 01/06/2007
BURSOI 13 BU10GO-1328 01/07/2006
i need first row after group by ProdCode, PackType and decreading order of ExpDate
Please Help me.
Thanks.
Try the below:
;With cte
as
(Select *,Row_Number()Over(partition by Prodcode,Packtype Order by expdate desc) Rn From Tablename)
Select * From cte where rn=1 -
hi
i have sorted the internal table by field f1 and i need to insert the first row for each f1 entry.
I tried AT NEW f1. But that doesnt seem to work.
Kindlly help.
Thanks.*--ENSURE THAT age IS FIRST FIELD IN INTERNAL TABLE it_gir while declaring it.....
SORT it_gir BY age ASCENDING.
LOOP AT it_gir INTO wa_gir.
AT NEW age.
<b>*--if there are fields which are getting populated with **** instead of original values....then use below statement...</b>
read table it_gir index sy-tabix.
MOVE-CORRESPONDING wa_gir TO wa_final1.
APPEND wa_final1 TO it_final1.
clear wa_final1.
ENDAT.
ENDLOOP.
now it should definitely work.....
if not check in debugging mode if data exists or not....!!!
Regards
Vasu -
Export in Excel- always first row blank
hi,
if i export in excel file always i am getting first row as blank with line. how can i eliminate this row.Hi Kayadhu,
Generally, if we design a report and the top of report body remain extra blank space, it will result in the extra blank row after export the report to Excel. Please see the screenshot below:
In your case, please try to reduce the blank space in the report body. If the issue still persists, please post more information about your report design structure to us.
Regards,
Bin Long
Bin Long
TechNet Community Support -
How to ignore the first row in a csv import
Hello
This is the file we want to add to the datamodel:
https://www.mediafire.com/?a9xrwrwu79whu18
(BTW this is the csv output from a neat & free software called Jstock)
Here is an image of the problem:
As you can see they add automatically a timestamp in the A1 cell ruining the possibility of a clean import.
Can anyone help with a query to fix this and get the real headers?Hi NicoPer,
To follow your M code. You have this lines #"First Row as Header" = Table.PromoteHeaders(Source).
This mean you use first line ( the line include "timestamp=1415926728041" ) to make
table header. So you no need to use Table.Skip function. You just use one more Table.PromoteHeaders to make second line to your table header. Below is your code:
let
Source = Csv.Document(File.Contents("C:\PATH\JSTOCK.csv"),null,null,null,1252),
#"First Row as Header" = Table.PromoteHeaders(Source),
#"Changed Type" = Table.TransformColumnTypes(#"First Row as Header",{{"timestamp=1415926728041", type text}}),
FirstRowAsHeader = Table.PromoteHeaders(#"Changed Type")
in
FirstRowAsHeader
Regards,
Maybe you are looking for
-
How to restrict users from printing documents and exporting to local file
Hi SAP gurus, I have two questions. 1. How can I restrict users from printing a document? i.e. billdoc? I would like to know if I could block it though authorization. If yes, what auth obj to use? 2. How to restrict certain users from exporting to lo
-
How to add jQuery to master page
Hi, I'm using designer to add jQuery to master page. But i get this error below. Please help me to understand this and solve this. Many thanks for your response in advance.
-
MM reports, extraction help request
Hi Experts, I have new requirement of ECC u2013 SAP PO NO, SAP PO LINE ITEM, Date of Order, SAP Code, Description, Quantity Ordered ,Quantity received, Quantity Pending, Ageing of Order, Net price, PER,
-
802.1x with VLAN assignment through MS IAS radius
What is the correct input syntax of the cisco VAS at the MS IAS? Cisco Vendor ID = 9 - [64] Tunnel-Type = VLAN - [65] Tunnel-Medium-Type = 802 - [81] Tunnel-Private-Group-ID = VLAN NAME Thanks
-
http://www.pinterest.com/pin/create/extension/Hello, I have had a Behance account for awhile and had several projects listed there. I must not have done something right when you were bought by Adobe and recently when I tried to log in, it made me cho