Problem with 'Word edit cell.vi' , Inputs transduced with the value of every row repeated
Hello,
Im using LV2013 with office 2013 report tool kit. I am trying to use Word edit cell to input values in table previously created in template .doc.
Indeed, i trying the example Generate report from template and didnt works well. I search for solution and I see it was a problem with previous version but it seems not solve totally in this version for word office 2010.
http://digital.ni.com/public.nsf/allkb/4041ECB5D02BA57D862579A00002FE8D
I checked this thread but i didnt get it to works. http://forums.ni.com/t5/LabVIEW/Problem-with-append-table-and-Word-2010/m-p/2190960#M702610
Any way to solve it?.
Thanks for help.
Fred
Attachments:
error.png 32 KB
Untitled 1.vi 19 KB
exampleTemplate.doc 37 KB
Hello, I solve it adding this to Word_insert_Table.
http://forums.ni.com/t5/LabVIEW/Report-Generation-MS-Word-Table-Bug/td-p/1605170
Thanks.
Open [LabVIEW installation folder]\vi.lib\addons\_office\_wordsub.llb\Word_Insert_Table.vi
There is a nested for loop that interprets the provided string array data and reformats it into a long ASCII string for the copy buffer. It should look like this:
Change the nested loop to look like this:
The changes I've made are twofold:
1. Within the inner loop, replace the "\n" char with a Tab character
2. Just after the inner loop, add a new "concatenate strings" function that adds "\n".
Similar Messages
-
Editable cell in ALV OO with F4 Help
Hi Abapers,
i have an ALV with an editable cell wich an F4 help is available on it. When clicking on the F4 button i'm getting the list of possible values but when choosing a value it is not updating the alv cell. (F4 help is on a Z* field wich i created already with its matchcode).
Does anyone have a piece of code wich can help ?
Thanks in advance,
SoufianeHi,
Check the following code:
*Type pools for alv
TYPE-POOLS : slis.*structure for t582a tbale
TYPES : BEGIN OF ty_table,
infty TYPE infty,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_table.*Structure for infotype text
TYPES : BEGIN OF ty_itext,
infty TYPE infty,
itext TYPE intxt,
sprsl TYPE sprsl,
END OF ty_itext.*Structure for output display
TYPES : BEGIN OF ty_output,
infty TYPE infty,
itext TYPE intxt,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_output.*internal table and work area declarations
DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_pbo TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
wa_table TYPE ty_table,
wa_output TYPE ty_output,
wa_ittext TYPE ty_itext.*Data declarations for dropdown lists for f4
DATA: it_dropdown TYPE lvc_t_drop,
ty_dropdown TYPE lvc_s_drop,
*data declaration for refreshing of alv
stable TYPE lvc_s_stbl.*Global variable declaration
DATA: gstring TYPE c.
*Data declarations for ALV
DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container object
c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo. "Layout*ok code declaration
DATA:
ok_code TYPE ui_func.
initialization eventINITIALIZATION.start of selection event
START-OF-SELECTION.*select the infotypes maintained
SELECT infty
pnnnn
zrmkz
zeitb
dname
davo
davoe
FROM t582a UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE it_table.* *Select the infotype texts
IF it_table[] IS NOT INITIAL.
SELECT itext
infty
sprsl
FROM t582s
INTO CORRESPONDING FIELDS OF TABLE it_ittext
FOR ALL ENTRIES IN it_table
WHERE infty = it_table-infty
AND sprsl = 'E'.
ENDIF.
*Apppending the data to the internal table of ALV output
LOOP AT it_table INTO wa_table. wa_output-infty = wa_table-infty.
wa_output-pnnnn = wa_table-pnnnn.
wa_output-zrmkz = wa_table-zrmkz.
wa_output-zeitb = wa_table-zeitb.
wa_output-dname = wa_table-dname.
wa_output-davo = wa_table-davo.
wa_output-davoe = wa_table-davoe.* For texts READ TABLE it_ittext INTO wa_ittext WITH KEY infty = wa_table-infty.
wa_output-itext = wa_ittext-itext.
APPEND wa_output TO it_output.
CLEAR wa_output. ENDLOOP.* Calling the ALV screen with custom container CALL SCREEN 0600.*On this statement double click it takes you to the screen painter SE51.
*Enter the attributes
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen ,
Here we can give a title and customized menus
*create 2 buttons with function code 'SAVE' and 'EXIT'.
GIVE A SUITABLE TITLE&---------------------------------------------------------------------
*& Module STATUS_0600 OUTPUT
text
MODULE status_0600 OUTPUT.
SET PF-STATUS 'DISP'.
SET TITLEBAR 'ALVF4'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
*& Module PBO OUTPUT
text
MODULE pbo OUTPUT.*Creating objects of the container
CREATE OBJECT c_ccont
EXPORTING
container_name = 'CCONT'.* create object for alv grid
create object c_alvgd
exporting
i_parent = c_ccont.* SET field for ALV
PERFORM alv_build_fieldcat.* Set ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.* Call ALV GRID CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
i_save = 'A'
CHANGING
it_outtab = it_output
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.ENDMODULE. " PBO OUTPUT&----
*& Form alv_build_fieldcat
text
<--P_IT_FCAT text
*subroutine to build fieldcatFORM alv_build_fieldcat. DATA lv_fldcat TYPE lvc_s_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '1'.
lv_fldcat-fieldname = 'INFTY'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 8.
lv_fldcat-scrtext_m = 'Infotype'.
lv_fldcat-icon = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '2'.
lv_fldcat-fieldname = 'PNNNN'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Structure'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '3'.
lv_fldcat-fieldname = 'ITEXT'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 60.
lv_fldcat-scrtext_m = 'Description'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '5'.
lv_fldcat-fieldname = 'ZRMKZ'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 1.
lv_fldcat-scrtext_m = 'PERIOD'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '6'.
lv_fldcat-fieldname = 'ZEITB'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 5.
lv_fldcat-scrtext_m = 'Time constraint'.
lv_fldcat-edit = 'X'.
*To avail the existing F4 help these are to
*be given in the field catalogue
lv_fldcat-f4availabl = 'X'.
lv_fldcat-ref_table = 'T582A'.
lv_fldcat-ref_field = 'ZEITB'. APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '7'.
lv_fldcat-fieldname = 'DNAME'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Dialogmodule'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '8'.
lv_fldcat-fieldname = 'DAVO'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Start'.
lv_fldcat-edit = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '9'.
lv_fldcat-fieldname = 'DAVOE'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'End'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
*To create drop down for the field 'DAVO'
with our own f4 help
ty_dropdown-handle = '1'.
ty_dropdown-value = ' '.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '1'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '2'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '3'.
APPEND ty_dropdown TO it_dropdown. CALL METHOD c_alvgd->set_drop_down_table
EXPORTING
it_drop_down = it_dropdown.
LOOP AT it_fcat INTO lv_fldcat.
CASE lv_fldcat-fieldname.
To assign dropdown in the fieldcataogue
WHEN 'DAVO'.
lv_fldcat-drdn_hndl = '1'.
lv_fldcat-outputlen = 15.
MODIFY it_fcat FROM lv_fldcat.
ENDCASE.
ENDLOOP.ENDFORM. " alv_build_fieldcat&----
*& Form alv_report_layout
text
<--P_IT_LAYOUT text
*Subroutine for setting alv layout
FORM alv_report_layout.
it_layout-cwidth_opt = 'X'.
it_layout-col_opt = 'X'.
it_layout-zebra = 'X'.ENDFORM. " alv_report_layout* PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes
*and based on the user command we can do the coding.
*& Module PAI INPUT
text
MODULE pai INPUT.*To change the existing values and refresh the grid
*And only values in the dropdown or in the default
*F4 can be given , else no action takes place for the dropdown
*and error is thrown for the default F4 help and font changes to red
and on still saving, value is not changed c_alvgd->check_changed_data( ).Based on the user input
*When user clicks 'SAVE;
CASE ok_code. WHEN 'SAVE'.*A pop up is called to confirm the saving of changed data
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'SAVING DATA'
text_question = 'Continue?'
icon_button_1 = 'icon_booking_ok'
IMPORTING
answer = gstring
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.*When the User clicks 'YES'
IF ( gstring = '1' ).
MESSAGE 'Saved' TYPE 'S'.
*Now the changed data is stored in the it_pbo internal table
it_pbo = it_output.
*Subroutine to display the ALV with changed data.
PERFORM redisplay.
ELSE.
*When user clicks NO or Cancel
MESSAGE 'Not Saved' TYPE 'S'.
ENDIF.
**When the user clicks the 'EXIT; he is out
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE. CLEAR: ok_code.ENDMODULE. " PAI INPUT
*& Form REDISPLAY
text
--> p1 text
<-- p2 text
FORM redisplay .*Cells of the alv are made non editable after entering OK to save CALL METHOD c_alvgd->set_ready_for_input
EXPORTING
i_ready_for_input = 0.*Row and column of the alv are refreshed after changing values stable-row = 'X'.
stable-col = 'X'.*REfreshed ALV display with the changed values
*This ALV is non editable and contains new values
CALL METHOD c_alvgd->refresh_table_display
EXPORTING
is_stable = stable
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.ENDFORM. " REDISPLAY
Regards,
Bhaskar -
Problem with Set/Get volume of input device with single channel
from Symadept <[email protected]>
to Cocoa Developers <[email protected]>,
coreaudio-api <[email protected]>
date Thu, Dec 10, 2009 at 2:45 PM
subject Problem with Set/Get volume of input device with single channel
mailed-by gmail.com
hide details 2:45 PM (2 hours ago)
Hi,
I am trying to Set/Get Volume level of Input device which has only single channel but no master channel, then it fails to retrieve the kAudioDevicePropertyPreferredChannelsForStereo and intermittently kAudioDevicePropertyVolumeScalar for each channel. But this works well for Output device.
So is there any difference in setting/getting the volume of input channels?
I am pasting the downloadable link to sample.
http://www.4shared.com/file/169494513/f53ed27/VolumeManagerTest.html
Thanks in advance.
Regards
Mustafa
Tags: MacOSX, CoreAudio, Objective C.That works but the the game will not be in full screen, it will have an empty strip at the bottom.
I actually found out what's the problem. I traced the stageWidth and stageHeight during resizing event. I found out that when it first resized, the stage width and height were the size with the notification bar. So when I pass the stage into startling, myStarling = new Starling(Game,stage), the stage is in the wrong size. For some reason, I can only get the correct stage width and height after the third resizing event.
So now I need to restart Starling everytime a resizing event happened. It gives me the right result but I am not sure it is a good idea to do that.
And thanks a lot for your time kglad~I really appriciate your help. -
I often have to open files .cue with Text Edit. Right Click, Open with, Others, Text Edit. Is it possible to put Text Edit in the menu avoiding to use "others"?
The easiest way is to keep Textedit in the Dock and drag the .cue file(s) to the Dock icon.
You can also create an Automator Service:
Open Automator
Select: Service
Select Service receives selected [files or folders] in [Finder]
and:
Then select one or more .cue file, right click (or Control-click) on the selection to display the contextual menu. Scroll to the bottom of the contextual menu and select Services -> (what you named the Service). -
Manually input ( or type ) the value of the node in hierarchy
Dear all,
I have the following requirement :
In the query, I am using a hierarchy node variable. Now, by default, on the selection screen the valued can be passed to this hierarchy node var. by a drill down on the hierarchy on which the variable is created and selecting one of the nodes.
Now, I would like to manually input ( or type ) the value of the node instead of performing the drilldown on the hierarchy and selecting the node..
It is this possible for a hierarchy node variable ?
Thanks,
KenpsHi Carlos,
You create a Variable with following selections
Type of variable : Hierarchy node
processing : Manual Input/Default value
Reference Char : Mention the CHAR that contain this hierarchy
Define it as SIngle value & Mandatory entry.user can see all the nodes in F4 help and selects the node as he wants
Hope it helps
Sriman
Edited by: Sreeman on Apr 21, 2008 8:34 PM -
Hi all,
I create a vi that inserts in a word template table values .
This work's fine but the table have 4 columns and if i update less than 4 column (example 3) the other is filled with the last column inserted (the last column is replied in the remains column).
I attach the code created.
Another question is why, also if i add an 2d array in the table, if i don't repeat the insertion for each column (for loop) the only column recorded is the first?
I attach the part of code
Bytelabs.it
Attachments:
edit cell to insert data in a exist table on word template.jpg 24 KBThese are expected behaviors. I suggest you to implement an high level API that do what you are planning to do.
Best regards,
Enrico -
JTable/jlist with word wrapping cells?
Hello all,
I got a simple looking problem but i can't seem to find any working solution for it:
A jtable or jlist with cells that wordwrap text (cells differ in height).
I found many examples on groups.google and this forum but they all seem to suffer a 100% processor load when 2 or more cells differ in height.
Can anyone point me to a working example?
Kind regards,
TwanThanks! That's a real live saver.
I had been looking for a solution for several days, strange google did not yet found the mentioned page, cause it contains usefull information.
I've just implemented the multiline table and it works without any problems and most important without 100% cpu usage.
The bucks are comming your way ;-) -
Passing the values to table row with search help
Hello experts,
I was developed one custom component which is displayd in table format.here in one column i was put F4 functionality.whenever the user click on that f4 one pop up window will come with few columns and few records then user selects one row from that pop up window.Now my requirement is whatever the row is selected by user that row will come and set in my table .its very needful..
Regards,
Bixamaiah.Hi Bussa,
If the field for which you are trying to get F4 help is a context node attribute, its very simple.
First, make sure that the field is an input field.
In the corresponding context node class, implement the get_v method of the attribute. A utility class has been created to simplify the definition of F4 Help -
CL_BSP_WD_VALUEHELP_F4DESCR.
Check out the implementation of this class in any of the standard code, that will guide you. Also, make sure that you have defined the input and output mapping properly.
The input mapping defines the search criteria that is used and output mapping defines in which fields the selected values have to be transferred.
Hope this helps!
Regards,
Padma Guda -
How to concatenate the values in single row with images or colours
hi all,
i am apex 4.2,
i tried to execute a plsql query for the values concatenate two values into same column
example in my table
i am having teachers list one can teach two or three subjects
in table i am saving like
teacher_id teacher_name salary subjects
1 ram 5000 science,maths
2 gang 4000 maths,science,english
but my report should come like
teacher_id teacher_name salary subjects
1 ram 5000 science maths i have to highlighting these subjects with images or with different colors
2 gang 4000 maths english science
can any one help me please
thanks & regards
pavan
Edited by: Pavan on Apr 9, 2012 4:15 AM
Edited by: Pavan on Apr 9, 2012 4:22 AMFirst of all, i would split the subjects column.
If you for sure only need up to 3 subjects, you could make three columns subject1, subject2, subject3.
If you may have an indefinite number of subjects for each teacher, you might create a detail-table with the subjects for each teacher.
I also would create a list of values for the subjects, either based on static values or based on another table with the subjects allowed.
Now that the subject-names are fixed you could create a subject-image for each subject, named as the subject itself. Then you "construct" the image for each subject as
<img src="#APP_IMAGES##SUBJECT_NAME#.png"/> -
Hello,
I am wondering if the following scenario is possible:
Cell B contains a formula which refers to a number of other cells.
Cell A refers to Cell B such that the formula in Cell B is applied in Cell A.
I am aware that I can copy and paste, but I am wanting to do this dynamically, for the following reason.
In order to avoid constructing a very complicated formula which involves lots of tricky IF functions, I use a formula with a chain of simpler IF functions, such as follows:
=IF(A1=1,B1,IF(A1=2,B2,IF(A1=3,B3,IF(A1=4,B4,IF(A1=5,B5,IF(A1=6,B6,IF(A1=7,B7,"" )))))))
Then in B1-B7 I include the complicated formulas, and depending on which value is actually in cell A1 that particular formula is applied in the cell (i.e the cell is populated with the respective formula).
Is it possible to use Numbers in this way, or if not, is there another way of achieving my goal (i.e. to avoid having to construct one very long and complicated formula)?
Thanks,
Nick.It depend of what you want to achieve.
Here, in standard cells of column B the formula is :
=IF($A=1,C,IF($A=2,D,IF($A=3,E,IF($A=4,F,IF($A=5,G,"")))))
Here, in standard cells of column C the formula is :
=$A*10
Here, in standard cells of column D the formula is :
=$A^2
Here, in standard cells of column E the formula is :
=$A*12345
Here, in standard cells of column F the formula is :
=$A+10000
Here, in standard cells of column G the formula is :
=20000-$A
Here, in standard cells of column H the formula is :
=OFFSET($A$1,ROW()-1,A+1)
Here, in standard cells of column I the formula is :
=CHOOSE($A,C,D,E,F,G)
Here, in standard cells of column J the formula is :
=IF($A=1,$A*10,IF($A=2,$A^2,IF($A=3,$A*12345,IF($A=4,$A+10000,IF($A=5,20000-$A," ")))))
As you see, the formulas used in column B,H, I, require the use of the columns C, D, E, F, G
The one used in column I doesn't require these columns.
When a task requires a complex formula, I often used the columna A thru G
then when I'm sure that the formula in column B return behave exactly what I want, I replace in the formula of column B the references to columns C thru G by the formula embedde in the pointed columns minus the equal symbol.
It's what I did to build the formula of column J.
If you build the sample table, you will see that the formula in column I isn't perfect because it return a red triangle when the cell in column A is empty.
I decided to leave it as is and created an enhanced synthetic formula for column K:
=IFERROR(CHOOSE(A,$A*10,$A^2,$A*12345,$A+10000,20000-$A),"")
As you see a single problem may receive different answers.
Sometimes, one is clearly the best, sometimes it's matter of taste.
Here my best choice would be the very last one which I added for column K.
Yvan KOENIG (VALLAURIS, France) mardi 23 août 2011 16:44:11
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
i add a picture from the web to the final cut project and as my poem is playing some pictures are getting blurry when it plays but when i pause it the picture seems to be more clear
Possibly it's just a matter of switching Quality to Better Quality in Viewer Display Options. Or rendering the clip.
Russ -
Create a new column in a table that compares the value of one column with its previous value
The DDL:
DECLARE
@T TABLE
IDNO
int,
name
varchar(40),
[Date]
datetime2,
Price1
float,
Price2
float
DECLARE
@K TABLE
IDNO
int,
name
varchar(40),
[Date]
datetime2,
Price1
float,
Price2
float
INSERT
INTO @T
VALUES(22,'C_V_Harris','2014-01-02 10:23:49.0000000',
23.335,
23.347)
INSERT
INTO @T
VALUES(21,'C_V_Harris','2014-01-02 10:05:13.0000000',
23.357,
23.369)
INSERT
INTO @T
VALUES(20,'C_V_Harris','2014-01-02 09:56:15.0000000',
23.364,
23.377)
INSERT
INTO @T
VALUES(19,'C_V_Harris','2014-01-02 09:45:26.0000000',
23.351,
23.367)
INSERT
INTO @T
VALUES(18,'C_V_Harris','2014-01-02 09:43:20.0000000',
23.380,
23.396)
INSERT
INTO @T
VALUES(17,'C_V_Harris','2014-01-02 09:34:28.0000000',
23.455,
23.468)
INSERT
INTO @T
VALUES(16,'C_V_Harris','2014-01-02 09:30:37.0000000',
23.474,
23.486)
INSERT
INTO @T
VALUES(15,'C_V_Harris','2014-01-02 09:18:12.0000000',
23.419,
23.431)
INSERT
INTO @T
VALUES(14,'C_V_Harris','2014-01-02 09:16:06.0000000',
23.360,
23.374)
INSERT
INTO @K
SELECT
ROW_NUMBER()
OVER (ORDER
by IDNO)
AS RN,*
FROM
@T
SELECT
* FROM
@K
--not working:
SELECT
a.RN,a.Price2
FROM
@K a
INNER
JOIN @K
b
ON
a.RN=b.RN-1
WHERE
a.Price2>b.Price2
I need to create a view with a column (say 'Comp' below) that compares the value of each row in Price2 with the previous Price2 row, and it is greater then +1, the
same 0, and less -1.
The processed table should be:
IDNO
name
Date
Price1
Price2
Comp
22
C_V_Harris
1/2/2014 10:23:49
23.335
23.347
0
21
C_V_Harris
1/2/2014 10:05:13
23.357
23.369
1
20
C_V_Harris
1/2/2014 9:56:15
23.364
23.377
1
19
C_V_Harris
1/2/2014 9:45:26
23.351
23.367
-1
18
C_V_Harris
1/2/2014 9:43:20
23.38
23.396
1
17
C_V_Harris
1/2/2014 9:34:28
23.455
23.468
1
16
C_V_Harris
1/2/2014 9:30:37
23.474
23.486
1
15
C_V_Harris
1/2/2014 9:18:12
23.419
23.431
-1
14
C_V_Harris
1/2/2014 9:16:06
23.36
23.374
-1
How can I structure the statement to get (the most recent - order by date ) result for Comp?Satheesh Variath, I just had to make some corrections from your script to get the correct answer:
CREATE
VIEW vw_Comp
AS
SELECT
TOP 1 t.IDNO,t.name,t.[Date],t.Price1,t.Price2,
CASE
WHEN t.Price2
> LAG(Price2,1)
OVER (PARTITION
BY name
ORDER BY IDNO)
THEN 1
WHEN t.Price2
< LAG(Price2,1)
OVER (PARTITION
BY name
ORDER BY IDNo)
THEN -1
ELSE 0
END
AS Comp
FROM
@T t
ORDER
BY DATE
DESC
The adjustments: the selection of the most recent comparison (Top 1) and the use of the function LAG (instead of LEAD) to get the previous value of the column. -
Tree view with editable cells?
Hi,
I have written a GTK+-2 based graphical visualizer for the NEC2 antenna simulation and analysis tool http://www.qsl.net/5b4az/pages/nec2.html and I am now considering a companion graphical editor for the NEC2 input file. This file is normally produced with a text editor and specifies antenna geometry and then commands to calculate various data regarding antenna characteristics (gain, input impedance etc).
Luckily the original NEC2 was written in FORTRAN and the input was punched cards with a fixed format, so the current file format is line-based and with a fixed number of parameters per line: you can get an idea by looking into examples files in http://www.qsl.net/5b4az/pkg/nec2/examples/
What I need is an idea on how to code a graphical line editor with editable cells for each parameter and the ability to add or delete lines as needed. The data in the cells may be numerical or textual or both and there may be inter-relations between cells, e.g. one cell may have a value that is a fixed proportion of another cell's value etc.
Tips please? Thanks!tranquility wrote:
Well, just about any language with bindings for gtk will work in a very similar manner. If I understand correctly, you might want to investigate the GTK treeview and GTK CellRenderer classes. Try to check the tutorials too.
Hope this helps.
Yes, thanks! Unfortunately though there is no easy way to have a spin button type editable cell, which would have been best for my needs. However, I found an example in a tutorial for the TreeView which could make a basis for a home brew second-best solution! -
Unable to edit document using "Edit with Word" option
Hi All,
i am having an issue with Office web apps. i am using SharePoint 2013 and Office web apps 2013. all the configurations have been done successfully. but i have a different kind of issue.
i am able to open documents in browser
i am able to edit document using " edit with word/excel web" option
but i am unable to edit document using "edit with word/excel" option
i have Office 2010 installed on my local machine.
do we need to have MS office of 2013 version? or is there anything missing from configuration part.
Please help me.
Thank You,
Bhaskar.Hi,
According to your post, my understanding is that you could not use the "edit with word/excel" option.
I had tested the issue with the Office 2010, the option worked well.
You don’t need to install the Office 2013 to use this option.
What did you mean “but i am unable to edit document using "edit with word/excel" option
Did you mean the option gray out? Did the issue occur in other browsers?
You can use compatibility mode to check whether it works.
Open IE->Tools->Compatibility View Settings
You can also add the site into Trusted sites.
Open the IE->Internet Options->Security->Sites->add the site into the Websites, then check whether it works.
What's more, you can also use other browsers to check whether it works, such as Firefox, Chrome.
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Problem with Word 2013 through VPN
Hello,
From several weeks my company has a problem
with Word 2013 when laptop is connected to the network
via VPN.
Symptoms:
- Word 2013 is opening very slow (even
opening a blank card)
- there are no matter if I try to open blank page or network files
- All other Office 2013 components are working fine (Excel, Powerpoint etc).
- When I disconnect from a VPN, Word is opening properly.
It is not a problem with VPN because:
- Word is opening locally (not network files)
- before we had Word 2010 and it was working smoothly
Does anyone know a similar case
and could help solve this problem?
Regards,
PawelHi,
"- before we had Word 2010 and it was working smoothly" -
Word 2013 might deal with documents in different ways.
Since Word will open properly when you disconnect from a VPN, you might want to start by analyzing the network traffic, VPN connections.
Please try to check the option "Copy remotely stored files onto your computer and update the remote file when saving" in
FILE>Options>Advanced>Save section, and then verify result.
The other thing to check is add-ins. I'd suggest you to start Word in safe mode and see if issue persists:
Press Win + R and type "winword /safe" in the blank box, then press Enter.
Thanks,
Ethan Hua CHN
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.
Maybe you are looking for
-
hi everyone. since last night i cannt start my mail program. i tried the SHIFT key trick but still won't start. i have repaired permissions and verify the disk. still the mail won't boot. i have tried with a diferent user and all seems ok. here is a
-
After updating 10.7.4, I am getting following error
Hello Gurus, Just now, I updated my iMac to 10.7.4, I am seeing errors in console log . I tried restarting, resetting SMC and PRAM and it keeps showing up when I restart. Anyone experiencing similar issues, Thanks, Paddy BTW, I updated the OS on my M
-
Error message when trying to receive messages
hi i am unable to send or receive messages. when trying to send an email i get this message: 'An error occurred sending mail: The mail server sent an incorrect greeting: Cannot connect to SMTP server 213.8.196.24 (213.8.196.24:25), NB connect error 1
-
Hi, I am try to handle portal event in my WD ABAP i view. The event is fired by WD Java team viewer iView in MSS. What I want is when someone select an employee from team viewer iview from MSS, my WD ABAP iview should react accordingly. I check SAP n
-
Hi, I'm a new Network admin, and I have some configuration questions about my installation (see attachment). I have 3 web servers behind a router. Public interface: 3 public ip adresses Private interface: router on a stick config ( 3 sub-interfaces,