Append table with multi-line cells to word report
Hi,
I am using LabView 7.0. I need to append table to word report and I am using Append Table to Report VI. My VI works fine as long as the table cells do not have multiple lines. For multiple lines, each line is put is a seperate cell in the word report.
Is there a way to append multi-line cells to Word Report??? If not, any suggestions on how I can copy the multi-line table to Word report???
Please kindly help!!
Please see the attached document for details on the problem.
Thanks,
Mim
Attachments:
Table with multiple line cells.doc 33 KB
Hi Mim,
Yes I understood the multiple-lines part. I think the doc is the report you want. Correct ?
The doc is generated with your VI without any modifications.
I am using XP, Office 2002 SP3 and LV7.1
Attachments:
Verification Report.doc 39 KB
Similar Messages
-
Help creating tables with multi line cells (variable height cells)
Hi -
I am trying to create a table where the row height of various rows might not
be one unit (i.e. there would be wrap around text) but I DO NOT want every cell
to be the same height. i.e. I only want rows with wrap around to be taller.
What I have done already is
- Create a new text renderer and set it as default table renderer.
- played around with the table.serRowHeight method.
what I noticed is this. If i call
table.setRowHeight (32);
All the rows will be a height of 32 which is expected.
However, if I do something like:
table.setRowHeight (0,16);
table.setRowHeight (1,32);
All the rows render as height 16.
I am trying to do this on the fly so to speak. I am setting the table model
fully and then listening to the tableModelChanged event and then want to
adjust the rows accordingly.
I have below listed the code snippit and what i WANT to do and what only seems
to work:
public void tableChanged(TableModelEvent e) {
int rows = table.getRowCount();
//// Using the api i would expect this to make each row taller
for (int i = 0; i < rows; ++i) {
table.setRowHeight(i,16+16*i);
//// However this one alone makes then all the same height.
//// I do not want this but want the snippit of code above to work
//// if possible
table.setRowHeight(32);
Thanks in advance....
mattHi bbrita
Sorry for the confusion. But basically yes the code below in my system does NOT
work. In my model i have
public class ApplicationTableModel extends AbstractTableModel {
//// other stuff here
public void setApplicationData(SimpleApplication[] appData) {
//// set the new data here
this.fireTableDataChanged();
and then it does call :
tableChanged(TableModelEvent e)
and in there i DO change the heights of the cells but they still all render the same height.
The basic code snippits I am useing are:
//// in my table model
public class ApplicationTableModel extends AbstractTableModel {
//// other stuff here
public void setApplicationData(SimpleApplication[] appData) {
//// set the new data here
this.fireTableDataChanged();
//// in the panel i create the table
public class ApplicationDataTablePanel extends JPanel
implements ListSelectionListener, TableModelListener {
//// other stuff here...
public ApplicationDataTablePanel() {
appModel = new ApplicationTableModel();
table = new JTable(appModel);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.getSelectionModel().addListSelectionListener(this);
table.getModel().addTableModelListener(this);
// not used at the moment
// table.setDefaultRenderer(Object.class, new MultiLineCellRenderer());
this.add(new JScrollPane(table));
public void tableChanged(TableModelEvent e) {
System.err.println("GET Row count="+table.getRowCount());
for (int i=0; i<table.getRowCount(); i++) table.setRowHeight(i,i*3+10);
/// not used
// table.invalidate();
for (int i=0; i<table.getRowCount(); i++)
System.err.println("HEIGHT="+table.getRowHeight(i));
This does dump to the screen the following (i have triggered something in the
system to update the model):
GET Row count=5
HEIGHT=10
HEIGHT=13
HEIGHT=16
HEIGHT=19
HEIGHT=22
Which is what I expect BUT the cells do not change in height (they are all the
standard size). This is what is baffling me because it seems to be the thing
you suggested below but does not work. Which seems like exactly what
should work.
I was wondering if there was somewhere else in the event flow that I should be
making these modifications or if I needed to for force any refresh or anything on
the graph cells. ???
Thanks so much for the help and any more you might have.
matt -
Dynamic Creation of Internal table WITH HEADER LINE
Dear,
Please show me the way of creating Internal table WITH HEADER LINE dynamically..
Thanks,
Nirav<font color='blue'>Hi Parekh,
Have a look at the sample program for Dynamic internal table
This program has been developed to update any table data in the dictionary. We give table name and File name as Input fields.
<pre>
REPORT znpmmm0201.
*Types
TYPES:
BEGIN OF ty_file,
data(4096) TYPE c,
END OF ty_file.
*Type-pools
TYPE-POOLS:
truxs.
*Work areas
DATA:
wa_file TYPE ty_file.
*Internal tables
DATA:
it_file TYPE STANDARD TABLE OF ty_file,
it_data TYPE truxs_t_text_data.
DATA:
gv_dref TYPE REF TO data,
file_name TYPE string.
*FIELD-SYMBOLS
FIELD-SYMBOLS:
<gf_itab> TYPE STANDARD TABLE,
<wa> TYPE ANY.
*& Selection-screen
PARAMETERS:
p_table TYPE rsrd1-tbma_val,
p_file TYPE ibipparms-path.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM f4_for_p_file CHANGING file_name .
*& START-OF-SELECTION
START-OF-SELECTION.
CREATE DATA gv_dref TYPE TABLE OF (p_table).
ASSIGN gv_dref->* TO <gf_itab>.
PERFORM upload_data USING file_name.
MODIFY (p_table) FROM TABLE <gf_itab>.
*& Form UPLOAD_DATA
FORM upload_data USING file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file
filetype = 'ASC'
TABLES
data_tab = it_file.
APPEND LINES OF it_file TO it_data.
CLASS cl_abap_char_utilities DEFINITION LOAD.
DATA: l_field_seperator.
l_field_seperator = cl_abap_char_utilities=>horizontal_tab.
REPLACE ALL OCCURRENCES OF '|' IN TABLE it_data WITH l_field_seperator.
CALL FUNCTION 'TEXT_CONVERT_TEX_TO_SAP'
EXPORTING
i_field_seperator = l_field_seperator
i_tab_raw_data = it_data
TABLES
i_tab_converted_data = <gf_itab>.
ENDFORM. " UPLOAD_DATA
*& Form F4_FOR_p_file
FORM f4_for_p_file CHANGING file.
DATA:
l_field_name LIKE dynpread-fieldname VALUE 'P_FILE'.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = l_field_name
IMPORTING
file_name = p_file.
file = p_file.
ENDFORM. " F4_FOR_p_file </pre>
Thanks,
Venkat.O</font> -
Passing an internal table WITH HEADER LINE to abap object
Hi. In another thread, it was explained how to pass an internal table to an abap object method. Is it possible to pass an internal table that has a header line, and RETAIN the header line once the table has been passed?
My problem is, that I can pass the table, update it, but the read buffer is not populated when returning from the object's method. This is the result of being able to pass a STANDARD TABLE type, but not a STANDARD TABLE WITH HEADER LINE.
This means that I have to read the table into a work area instead of doing a READ TABLE LKNA1 within the method, which is what I need to do.
Thanks.Please check this sample program, notice that it is modifing the internal table and passing it back modified as well as passing the "work area" or "header line" back thru the exporting parameter.
report zrich_0001.
* CLASS lcl_app DEFINITION
class lcl_app definition.
public section.
types: t_t001 type table of t001.
class-data: it001 type table of t001.
class-data: xt001 like line of it001.
class-methods: change_table
exporting ex_wt001 type t001
changing im_t001 type t_t001.
endclass.
data: w_t001 type t001.
data: a_t001 type table of t001 with header line.
start-of-selection.
select * into table a_t001 from t001.
call method lcl_app=>change_table
importing
ex_wt001 = w_t001
changing
im_t001 = a_t001[] .
check sy-subrc = 0.
* CLASS lcl_app IMPLEMENTATION
class lcl_app implementation.
method change_table.
loop at im_t001 into xt001.
concatenate xt001-butxt 'Changed'
into xt001-butxt separated by space.
modify im_t001 from xt001.
endloop.
ex_wt001 = xt001.
endmethod.
endclass.
Regards,
Rich Heilman -
The color of text item with multi-line in web
I tried to change the background color of text item with multi-
line, but it does not work when I run in the web, if some body
knows that, please give a hint.
Thanks
Frank
nullI tried to change the background color of text item with multi-
line, but it does not work when I run in the web, if some body
knows that, please give a hint.
Thanks
Frank
null -
Getting error of Defining an internal table with header line, SELECT-OPTIO
Hi all,
i have a coding for my smart form,In this coding i have define an structure which being used,but when i execute it it give me
error of Defining an internal table with header line, SELECT-OPTIONS, and RANGES is not allowed within a structure.Even tough you can see that in my coding im not using SELECT-OPTION or RANGES,but can't understand why it gives me this error.
Following are the code:
DATA: BEGIN OF traptab OCCURS 50.
INCLUDE STRUCTURE mseg.
DATA: vgart LIKE mkpf-vgart,
blart LIKE mkpf-blart,
blaum LIKE mkpf-blaum,
bldat LIKE mkpf-bldat,
budat LIKE mkpf-budat,
cpudt LIKE mkpf-cpudt,
cputm LIKE mkpf-cputm,
aedat LIKE mkpf-aedat,
usnam LIKE mkpf-usnam,
tcode LIKE mkpf-tcode,
xblnr LIKE mkpf-xblnr,
bktxt LIKE mkpf-bktxt,
frath LIKE mkpf-frath,
frbnr LIKE mkpf-frbnr,
wever LIKE mkpf-wever,
END OF traptab.
Thanks & Regards,
sappk25thanks
-
BADI cant use an internal table with header line
hi,
In BADI, we cant use an internal table with header line, and I am calling a function module which requires internal table as import parameter, now, the table I am passing is without a header line, So how to solve this problem ?You can use a type and then create an internal table of that type.
types :
begin of t_<example>
*field list
end of t_<example>
data :
gt_<table> type standard table of t_<example>
pass this to the FM -
Dynamicly creating an internal table with header line
Hi experts,
I am trying to do a read on an internal table using field symbols of type any table. To be able to read more than one row at once, I'd like to read it into another internal table (instead of just one line and instead of looping through them one by one).
So far the following line rendered an error that the target internal table doesn't have a header line
read table <fs_v_tab> WITH KEY (<fs_comp>) = <fs_param>-low INTO <fs_v_tab>.
(also attempted using "<fs_v_tab>->*" & "<fs_v_tab>[]" to be silly)
Based on the following article, I was wondering if it were possible to dynamicly create an internal table with header line.
[http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html|http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html]
Any help or tips on how to dynamicly filter an internal table field-symbol is greatly appreciated!Just read the online help:
This statement reads a row from internal table itab.
Or more exact:
This statement reads one row from internal table itab.
Therefore you can not read multiple lines into another table. The header line is needed to put the result in. And this is not what you intended, the result will be in the header line, not in the table itself.
If the row to be read is not uniquely specified, the first suitable row is read. In the case of index tables, this row has the lowest table index of all matching rows.
At least you have to do what you dont wanna do: looping. -
Error: Tables with Header line No longer Supported In WD-ABAP
Hi folks,
I am working on WD4A functionality.I have to use Abap code to retrive data from database and i am doing it by declaring internal table with header line in one of the Methods.I have to do manipulation on table before i can bind table to result node.I can do manipulation in Header in ABAP,but now it is no longer supported in WD4A.What can i do for this?
Nirad.hi nirad.
The example is not of much sense
but explains the funtionality. Hope this is what you are searching for.
data:
lt_flights type table of sflight.
data:
ls_flight type sflight.
select * from sflight
into corresponding fields of table lt_flights.
loop at lt_flights into ls_flight.
ls_flight-price = 1000.
modify lt_flights from ls_flight.
endloop.
Cheers,
Sascha -
Print JTable with multi line header
I need to print a JTable with multi line header, I want to know if I can use the method jTable.print(int, MessajeFormat, MessageFormat) by manipulation of the MessageFormat. How I can manipulate it?
Otherwise, How I can print this?hi again,
To print pdf in a swing application you don't need servlet.jar.
You'll only need itext.jar and a printer connected to your pc.
Download the iText source code and unzip it. See the following classes:
com.lowagie.tools.LPR and com.lowagie.tools.BuildTutorial. This latter is the main class of a swing tool that you can run.
Silent Print:
You have only to embed this javascript code in your pdf:
writer.addJavaScript("this.print(false);", false);
document.add(new Chunk("Silent Auto Print"));Then, you have to send the document to the printer.
Google : java print pdf
http://forum.java.sun.com/thread.jspa?threadID=523898 or
http://www.exampledepot.com/egs/javax.print/pkg.html for printing task.
Under unix system, I used this:
String PRINTER = ...;
try {
String cmd = "lp -d " + PRINTER + " " + PDF_PATH;
Runtime.getRuntime().exec(new String[] { "sh", "-c", cmd });
} catch (Exception e) {
//handle the exception
e.printStackTrace();
}hth -
Cell.text with multi line content
Hello anybody.
Here is my code .
story_title = [[NSMutableArray alloc] init];
scripture_location = [[NSMutableArray alloc] init];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
cell.text = [story_title objectAtIndex:indexPath.row];
cell.lineBreakMode = UILineBreakModeWordWrap;
cell.text = [scripture_location objectAtIndex:indexPath.row];
return cell;
How can i make multi line in single cell . My code is diplayed last array list content. The line break is not working.
Please help me with example
Nalan.Double click on the text box and look in properties. There are many different options there including text wrap.
(of course I'm referring to a form field and not a bunch of text that was included in the original document) -
How to create an internal table with header line in smartforms
Hello Guys,
I need to append the data in my internal table in smartforms by the problem is an error occurred "a table without header line and therefore no component called tdline"
i already declared the data under types declaration tab
types : begin of ts_tline,
TDFORMAT type tdformat,
tdline type tdline,
end of ts_tline.
types : it_tline type table of ts_tline.
and declare these in global data
WA_TLINE type TS_TLINE
XT_TLINE type IT_TLINE
my syntax in program lines :
LOOP AT gy_lines INTO WA_PROJ.
SPLIT wa_proj AT cl_abap_char_utilities=>cr_lf
INTO table IT_SPLIT.
LOOP AT IT_SPLIT.
MOVE it_split-commentext TO xt_TLINE-tdline.
an error occured at this part ****
append xt_TLINE.
ENDLOOP.
ENDLOOP.
what is wrong with my code..it cannot append data to xt_tline.
Please help.Will reward points
Thanks in advance
aVaDuDzcheck this link
this will help u......
http://www.****************/Tutorials/Smartforms/SFMain.htm
reward IF..........
regards
Anbu -
Create dynamic internal table with deep structure;cell coloring dynamic ALV
Hi,
My requirement is to do cell colouring for a dynamic ALV.
So I am creating a dynamic internal table using the following method.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = i_fieldcatalog[]
IMPORTING
ep_table = i_output.
But how do I define field COLORS which should be again an internal table ?
Is there any other way for cell colouring?
Putting my problem in another way:
How do I create a dynamic internal table with one field as another internal table.
Quick replies are highly appreciated.
Thanks,
Nisha Vengal.halo Nisha
Before building the display table . you can add the field in the feild catalog right . This display table gets generated from the field catalog right
1 Create a global structute say ZEXTEND_FIELDCAT
2 Have fields like STYLE type lvc_t_styl
COLOR type LVC_T_SCOL.
3 Now you have to extend ur fieldcatalog
l_fieldcat-fieldname = COLOR'.
l_fieldcat-ref_field = 'COLOR'.
l_fieldcat-ref_table = 'ZEXTEND_FIELDCAT'.
APPEND l_fieldcat TO lt_field_catalog.
CLEAR l_fieldcat. -
Why does my internal table(with header line) ignore 4 of its fields?
Hi Gurus,
I am a newbie to ABAP how has spent far to much of my weekend time trying to solve the following problem;
when trying to insert data from table cdpos into my internal table, I only get the two object* fields, the other 3 are not even part of the internal table according to the debugger.
my select code is:
SELECT fname tabkey changenr objectclas objectid
FROM cdpos
INTO CORRESPONDING FIELDS OF i_cd_index
WHERE tabname = 'XXX'
AND fname = 'XXX'
AND chngind = 'U'
ENDSELECT.
IF sy-subrc <> 0.
ENDIF.
- If I use a wa like line of i_cd_index the other fields will show up.
- I have tried with including 'TABLE' in the INTO statement, same result.
Please help out, getting very frustrated here....
/MikeHi Magdic,
I have completely coded for but i have taken as parameters rather direct values (XXXX). Under stand the code and select statement you will get it. Program which i have shown is working fine.
Do one thing first go the table CDPOS take one entry of Objectid, Tabname, fname and chngind and then enter in the selection and find whether the values are fetched correctly or not.
To my knowledge there might be no data in your table.
Anyhow try the below code.
TABLES: CDPOS.
DATA: ITAB LIKE CDPOS OCCURS 0 WITH HEADER LINE.
parameters: p_CHGID like CDPOS-chngind,
p_TAB like CDPOS-TABNAME,
P_FNAM LIKE CDPOS-FNAME.
SELECT OBJECTID TABNAME FNAME CHNGIND FROM CDPOS INTO CORRESPONDING FIELDS OF ITAB WHERE OBJECTID = P_CHGID
AND TABNAME = P_TAB
AND FNAME = P_FNAM.
APPEND ITAB.
ENDSELECT.
WRITE: ITAB-OBJECTID, ITAB-TABNAME, ITAB-FNAME, ITAB-CHNGIND.
Cheers!!
Balu -
I'm a language translator. My source files are very often pdf's containing huge tables with hundreds of embedded figures as well as text. So far, I've been unable to find a way to automatically convert such a structure to MS Word format. When selecting the table, the figures do not copy. Figures can be selected and copied only one at a time. Tried Reader, tried Acrobat, tried third party software like ABBYY PDF Transformer+ to no avail. Is there a way to do it?
Hi pielassss,
Could you share a sample file with me at [email protected] so that I can check at my end?
What version of Acrobat are you uisng?
Regards,
Rave
Maybe you are looking for
-
WBL 7.0 and SSL private key problem
Having generated certificate request, and associated private key, I obtained the corresponding server level certificate. I am having problems starting the server with the cert. I have configured my server appropriately, here is the SSL configuration
-
BAPI_GOODSMVT_CREATE error messages
Hi, I'm using BAPI_GOODSMVT_CREATE for Goods issue. I'm trying to find out the possible error conditions when using this BAPI. But I'm not able to get te list of error return messages given by this BAPI. My program is calling this BAPI. To prepare
-
Satellite L300 - Hot key function is not working
After the superb help I got from Jimi I'm hoping I can solve my last problem, I have changed my OS from Vista to WXP and I have managed to get all drivers working even though some from the Toshiba site dont work like the Wi-Fi, I have managed to acqu
-
This is irritating!!
-
Now is show this meassage "Your Purchase could not be completed" in the Tower of saviors app. I want to buy a diamond T-T