How to make column editable in Normal ALV report
Hi experts,
I Have one push button In ALV tool bar like Fields to be change..when i click this..i need to get one pop up with all fields which is having in Filedcatalog..so i need to doule click on any field which i want to be midified..then in ALV that particular entire column should be editable.Can anybody please help me what is procedure to get pop up with fields..
Thanks & regards,
Veena..
here is the required code
type-pools: slis.
types: BEGIN OF TY_MKPF,
MBLNR TYPE MKPF-MBLNR,
MJAHR TYPE MKPF-MJAHR,
VGART TYPE MKPF-VGART,
BLART TYPE MKPF-BLART,
BLAUM TYPE MKPF-BLAUM,
END OF TY_MKPF.
TYPES: BEGIN OF TY_WA, "STRUCTURE FOR POP UP ALV
CHECK TYPE C,
FIELDNAME TYPE DFIES-FIELDNAME,
FIELDTEXT TYPE DFIES-FIELDTEXT,
END OF TY_WA.
data: lt_mkpf type table of ty_mkpf,
ls_mkpf type mkpf,
IT TYPE TABLE OF TY_WA, "INTERNAL TABLE FOR POP UP ALV
WA TYPE TY_WA, "WA FOR POP UP ALV
IT_FCATP TYPE SLIS_T_FIELDCAT_ALV, "FCAT FOR POP UP ALV
WA_FCATP LIKE LINE OF IT_FCATP, "WA FOR POP UP ALV
ok_code type sy-ucomm,
lt_fcat type lvc_t_fcat,
ls_fcat type lvc_s_fcat.
data: o_alv type ref to cl_gui_alv_grid,
o_doc type ref to cl_gui_docking_container.
start-of-selection.
select MBLNR
MJAHR
VGART
BLART
BLAUM
into corresponding fields of table lt_mkpf from mkpf up to 100 rows.
*---create fieldcatalog
clear ls_fcat.
ls_FCAT-FIELDNAME = 'MBLNR'.
*WA_FCAT-TABNAME = WA-TABNAME.
ls_FCAT-REF_TABLE = 'MPKPF'.
ls_FCAT-REF_FIELD = 'MBLNR'.
APPEND ls_FCAT TO lT_FCAT.
clear ls_fcat.
ls_FCAT-FIELDNAME = 'MJAHR'.
*WA_FCAT-TABNAME = WA-TABNAME.
ls_FCAT-REF_TABLE = 'MPKPF'.
ls_FCAT-REF_FIELD = 'MJAHR'.
APPEND ls_FCAT TO lT_FCAT.
clear ls_fcat.
ls_FCAT-FIELDNAME = 'VGART'.
*WA_FCAT-TABNAME = WA-TABNAME.
ls_FCAT-REF_TABLE = 'MPKPF'.
ls_FCAT-REF_FIELD = 'VGART'.
APPEND ls_FCAT TO lT_FCAT.
clear ls_fcat.
ls_FCAT-FIELDNAME = 'BLART'.
*WA_FCAT-TABNAME = WA-TABNAME.
ls_FCAT-REF_TABLE = 'MPKPF'.
ls_FCAT-REF_FIELD = 'BLART'.
APPEND ls_FCAT TO lT_FCAT.
clear ls_fcat.
ls_FCAT-FIELDNAME = 'BLAUM'.
*WA_FCAT-TABNAME = WA-TABNAME.
ls_FCAT-REF_TABLE = 'MPKPF'.
ls_FCAT-REF_FIELD = 'BLAUM'.
APPEND ls_FCAT TO lT_FCAT.
*---collect the field names of alv in a itab
clear wa.
WA-FIELDNAME = 'MBLNR'.
WA-FIELDTEXT = 'Number of Material Document'.
APPEND WA TO IT.
clear wa.
WA-FIELDNAME = 'MJAHR'.
WA-FIELDTEXT = 'fiscical year'.
APPEND WA TO IT.
clear wa.
WA-FIELDNAME = 'VGART'.
WA-FIELDTEXT = 'Transaction/Event Type'.
APPEND WA TO IT.
clear wa.
WA-FIELDNAME = 'BLART'.
WA-FIELDTEXT = 'Document Type'.
APPEND WA TO IT.
clear wa.
WA-FIELDNAME = 'BLAUM'.
WA-FIELDTEXT = 'Document type of revaluation document'.
APPEND WA TO IT.
*----------create field catalog
CLEAR WA_FCATP.
WA_FCATP-FIELDNAME = 'CHECK'.
WA_FCATP-SELTEXT_M = 'Selection Field'.
WA_FCATP-TABNAME = 'IT'.
APPEND WA_FCATP TO IT_FCATP.
CLEAR WA_FCATP.
WA_FCATP-FIELDNAME = 'FIELDNAME'.
WA_FCATP-TABNAME = 'IT'.
WA_FCATP-REF_TABNAME = 'DFIES'. "CHECK IN SE11 TYPE GROUP SLIS
WA_FCATP-REF_FIELDNAME = 'FIELDNAME'. "CHECK IN SE11 TYPE GROUPB u201CSLIS
APPEND WA_FCATP TO IT_FCATP.
CLEAR WA_FCATP.
WA_FCATP-FIELDNAME = 'FIELDTEXT'.
WA_FCATP-TABNAME = 'IT'.
WA_FCATP-REF_TABNAME = 'DFIES'. "CHECK IN SE11 TYPE GROUP SLIS
WA_FCATP-REF_FIELDNAME = 'FIELDNAME'. "CHECK IN SE11 TYPE GROUPB SLIS
APPEND WA_FCATP TO IT_FCATP.
CLEAR WA_FCATP.
call screen 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS '100'.
* SET TITLEBAR 'xxx'.
if o_doc is not bound.
CREATE OBJECT O_DOC
EXPORTING
RATIO = 95.
CREATE OBJECT O_ALV
EXPORTING
I_PARENT = o_doc.
endif.
CALL METHOD O_ALV->SET_TABLE_FOR_FIRST_DISPLAY
CHANGING
IT_OUTTAB = lt_mkpf
IT_FIELDCATALOG = lt_fcat.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'BACK'.
CLEAR :O_ALV,
O_DOC.
LEAVE TO SCREEN 0.
when 'CHNG'.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'select fields to make it editable'
I_ZEBRA = 'X'
I_CHECKBOX_FIELDNAME = 'CHECK'
I_TABNAME = 'IT'
IT_FIELDCAT = IT_FCATP
TABLES
T_OUTTAB = it.
loop at it into wa where check = 'X'.
*---change fieldcatalog dynamacally
case wa-fieldname.
when 'MBLNR'.
read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
if sy-subrc = 0.
ls_fcat-edit = 'X'.
endif.
when 'MJAHR'.
read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
if sy-subrc = 0.
ls_fcat-edit = 'X'.
endif.
when 'VGART'.
read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
if sy-subrc = 0.
ls_fcat-edit = 'X'.
endif.
when 'BLART'.
read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
if sy-subrc = 0.
ls_fcat-edit = 'X'.
endif.
when 'BLAUM'.
read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
if sy-subrc = 0.
ls_fcat-edit = 'X'.
endif.
endcase.
modify lt_fcat from ls_fcat index sy-tabix transporting edit.
clear ls_fcat.
endloop.
*---change fieldcatalog dynamically
CALL METHOD O_ALV->SET_FRONTEND_FIELDCATALOG
EXPORTING
IT_FIELDCATALOG = lt_fcat
*CALL METHOD O_ALV->REFRESH_TABLE_DISPLAY
** EXPORTING
** IS_STABLE =
** I_SOFT_REFRESH =
** 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.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Edited by: zjason on Dec 29, 2010 7:47 AM
Edited by: zjason on Dec 29, 2010 7:52 AM
Edited by: zjason on Dec 29, 2010 7:54 AM
Similar Messages
-
How to make the editable col. in alv grid scrollable?
friends,
i have made the last col. in my alv grid editable..even though i have declared it as char of length 255, it's showing only 50 characters in the grid..but when i try to type beyond 50 characters, it's not allowing...how to make it scrollable so that it extends beyond 50 char. and capture all the characters typed in that col.? pl suggest..thanks all..
Sathish. RHi, u can extend the length of your last field.
LOOP AT t_fieldcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN text-001.
ls_fcat-outputlen = c_10. "10
WHEN text-002.
ls_fcat-outputlen = c_20. "20
WHEN text-003. "your lastfield
ls_fcat-outputlen = c_255. "255
"do nothing
ENDCASE.
*fixed column
ls_fcat-fix_column = c_x.
*changes to take effect
MODIFY t_fieldcat FROM ls_fcat.
IF sy-subrc = 0.
"do nothing
ENDIF.
CLEAR ls_fcat.
ENDLOOP. -
How to make fields editable in an alv tree
hi
there is an alv grid for which tree view shud also be made. The cells that are editable in the grid should also be editable in the tree.
please let me know how to make the specific cells of the tree editableafter setting the edit field in the field catalogue its bot working.
i am posting the code snippet.
please let me know what else should be done and how to add INPUT field to the fieldcat.
field-symbols: <fs_fieldcat> type lvc_s_fcat.
data: l_tabix type sy-tabix.
data: g_fieldcatalog type lvc_t_fcat,
wa_fcat like line of g_fieldcatalog.
data : hide type c value 'X'.
call function 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'RSTHIE_M'
i_client_never_display = 'X'
i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = g_fieldcatalog.
***-set table header on middle width
LOOP AT g_fieldcatalog ASSIGNING <fs_fieldcat>.
<fs_fieldcat>-FIX_COLUMN = 'X'.
<fs_fieldcat>-edit = 'X'.
ENDLOOP. -
How to make cell editable in new alv
hi experts:
i'm use cl_salv_table=>factory to display data,
but I can't make some cell or column editable,does any body can help me?thanks!hI,
With this class editing is not possible.
Check the documentation for CL_SALV_TABLE it says
"Tables displayed with ALV are not available for input."
Regards -
How to make subtotal when first displaying ALV report
Hi friends,
I develop a report need to subtotalize some column, for example Goods Receipt Qty and DN quantity by Purchase order or PO line item. My parts of ABAP coding are below:
******fieldcat coding
CLEAR fieldcat_in.
fieldcat_ln-fieldname = 'EBELN'.
fieldcat_ln-tabname = 'I_OUTPUT'.
fieldcat_ln-key = 'X'.
fieldcat_ln-no_out = ' '.
fieldcat_ln-seltext_l = 'Purchase Order'.
APPEND fieldcat_ln TO gt_fieldcat.
CLEAR fieldcat_in.
fieldcat_ln-fieldname = 'EBELP'.
fieldcat_ln-key = ''.
fieldcat_ln-tabname = 'I_OUTPUT'.
fieldcat_ln-no_out = ' '.
fieldcat_ln-seltext_l = 'PO item'.
APPEND fieldcat_ln TO gt_fieldcat.
CLEAR fieldcat_in.
fieldcat_ln-fieldname = 'GR_QTY'.
fieldcat_ln-tabname = 'I_OUTPUT'.
fieldcat_ln-key = ' '.
fieldcat_ln-no_out = ' '.
fieldcat_in-do_sum = 'X'.
fieldcat_ln-seltext_l = 'GR Quantity'.
APPEND fieldcat_ln TO gt_fieldcat.
CLEAR fieldcat_in.
fieldcat_ln-fieldname = 'DNQTY'.
fieldcat_ln-tabname = 'I_OUTPUT'.
fieldcat_ln-key = ' '.
fieldcat_ln-no_out = ' '.
fieldcat_ln-seltext_l = 'DN Qty'.
fieldcat_in-do_sum = 'X'.
APPEND fieldcat_ln TO gt_fieldcat.
*****sorting coding
data spos type i.
spos = spos + 1.
CLEAR gs_sort.
gs_sort-fieldname = 'EBELN'.
gs_sort-tabname = 'I_OUTPUT'.
gs_sort-spos = spos.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
gs_sort-expa = 'X'.
APPEND gs_sort TO gt_sort.
spos = spos + 1.
CLEAR gs_sort.
gs_sort-fieldname = 'EBELP'.
gs_sort-tabname = 'I_OUTPUT'.
gs_sort-spos = spos.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
gs_sort-expa = 'X'.
APPEND gs_sort TO gt_sort.
But it does not work. I chekc my report and fuond that the Subtotal button is not existed in application toolbar when first displaying it. I do the subtotal manually and it can subtotalize my desired column. Any have suggestion/solution on this case. Thanks very much in advance.hi,
pls chk this.
In order to do the sub-total the main total has to be calculated and then the sub-total process can be performed.
In the main fieldcat mark this field
wa_line_fieldcat-fieldname = 'VALUE'.
wa_line_fieldcat-tabname = 'I_OUTPUT'.
wa_line_fieldcat-reptext = text-021.
wa_line_fieldcat-do_sum = 'X'.
APPEND wa_line_fieldcat TO i_fieldcat.
this will do the main total part.
Sub-total:
you will have to create an internal table sort
CLEAR struct_sort.
struct_sort-spos = 1.
struct_sort-fieldname = 'VALUE'.
struct_sort-up = 'X'.
struct_sort-subtot = 'X'.
APPEND struct_sort TO i_sort.
Now pass these two internal tables to the display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
IT_SORT = i_sort
TABLES
t_outtab = I_OUTPUT
Hope this solves ur issue.
Reward if helpful.
Regards,
anver -
How to make a entire column editable in an ALV grid
Hi all,
I am trying to make a column editable in an ALV grid. For that I wrote the following code. In the below code I have set the 'edit' field of ls_fcat to 'X'. But Iam getting Runtime error. Can anyone help in resolving this problem or suggest any method to make a column editable in an ALV grid.
form prepare_fc changing go_fieldcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
refresh: go_fieldcat.
clear: ls_fcat.
ls_fcat-reptext = ' Safety Stock Figures'.
ls_fcat-coltext = 'Safety Stock Figures'.
ls_fcat-fieldname = 'EISBE'.
ls_fcat-ref_table = 'IMAT'.
ls_fcat-edit = 'X'.
modify go_fieldcat from ls_fcat.
APPEND LS_FCAT TO GO_FIELDCAT.
endform.
Thanks & Regards,
Vishnu Priya.ls_fcat-edit = 'X'.
is correct only.
have a look into this code
struct_grid_lset TYPE lvc_s_layo,
i_grid_fcat TYPE lvc_t_fcat
DATA ls_fcat TYPE lvc_s_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'MONTH'.
ls_fcat-ref_table = 'TYPE'.
ls_fcat-ref_field = 'C'.
<b> ls_fcat-edit = 'X'.</b>
ls_fcat-coltext = text-030."Month
ls_fcat-seltext = text-030.
APPEND ls_fcat TO p_i_grid_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'YEAR'.
ls_fcat-ref_table = 'TYPE'.
ls_fcat-ref_field = 'C'.
ls_fcat-coltext = text-031."Year
ls_fcat-seltext = text-031.
APPEND ls_fcat TO p_i_grid_fcat.
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid_lset
CHANGING
it_outtab = i_grid_outs[]
<b>it_fieldcatalog = i_grid_fcat[]</b>
it_sort = i_sort_fcat. " Period
Also Check this code.Another way using field symbols.
i_fieldcat TYPE lvc_t_fcat,
w_layout TYPE lvc_s_layo ,
w_variant TYPE disvariant.
FIELD-SYMBOLS : <lfs_fieldcat> TYPE lvc_s_fcat.
*Default display
LOOP AT p_fieldcat ASSIGNING <lfs_fieldcat>.
CASE <lfs_fieldcat>-fieldname.
WHEN 'GL_ACCT'.
<lfs_fieldcat>-coltext = text-050.
<lfs_fieldcat>-no_out = ' '.
<lfs_fieldcat>-scrtext_l = text-050.
<b> <lfs_fieldcat>-edit = 'X'.</b>
WHEN OTHERS.
ENDCASE.
ENDLOOP.
Hope this helps. -
How to make cell editable alv in WebDynpro for ABAP?
I make Column editable ALV.(See under source code)
But I can't make Cell editable ALV.
How to make Cell editable ALV in WebDynpro for ABAP?
and..how to get changed data?
DATA: l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model( ).
* { EDITABLE
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
lr_column TYPE REF TO cl_salv_wd_column.
lr_column_settings ?= l_value.
lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = 'TOTAL_COUNT'.
lr_column->set_cell_editor( lr_input_field ).
DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= l_value.
lr_table_settings->set_read_only( abap_false ).the code seems to be correct....but where are you writing it?
put the code in the wddoinit method and it should work.
have a look at this article..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1 -
How to make column range based on a column in Oracle BI 11g
Hello everyone!
I want to know, how to make column range from a column in oracle bi 11g.
for example!
I have a column amounts and I want to build on this with other values of quantity, other column range 1-9,10-49,50-99,100-249, 249 o more.
regards!
when I try to make the range I have error.
Syntax error [nQSError: 26012] . (HY000)
SQL Issued: SELECT CASE WHEN "CUBO_DEEE_TAB"."CANTIDAD" BETWEEN 1 AND 9 THEN 1 a 9 ELSE "CUBO_DEEE_TAB"."CANTIDAD" END FROM "DM_DEEE"
Edited by: 964157 on 09-oct-2012 11:50You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);
-
Hi,
I have a doubt in Table UI Element.Can we made columns editable in Table through programatically.When i am trying in using this code.it is giving the error saying that you cann't create instance of CL_WD_INPUT_FILED in the same class or its sub classes.if it is so then how do i get instance of input field to make column editable. Please give me the solution ASAP.
method wddomodifyview .
data: obj_table type ref to cl_wd_table,
lr_column type ref to cl_wd_table_column,
lr_input type ref to cl_wd_input_field.
obj_table ?= view->get_element( 'TABLE1' ).
obj_table->set_visible_row_count( value = 50 ).
lr_column = obj_table->get_column(
id = 'PRICE'
* INDEX = INDEX
lr_column->set_table_cell_editor( the_table_cell_editor = lr_input ).
endmethod.
Thanks in Advance,
Suman.Hi
Change your coding like this it will work
data: obj_table type ref to cl_wd_table,
lr_column type ref to cl_wd_table_column,
lr_input type ref to cl_wd_input_field.
obj_table ?= view->get_element( 'TABLE1' ).
obj_table->set_visible_row_count( value = 50 ).
lr_column = obj_table->get_column(
id = 'PRICE'
* INDEX = INDEX
lr_input = cl_wd_input_field=>new_input_field(
id = 'IPFIELD'
bind_value = 'NODE.PRICE' ).
lr_input->SET_READ_ONLY( ' ' ).
lr_column->set_table_cell_editor( lr_input ).
Hope this helps U
Regards
Tamil -
Hi my name is vishal
For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.Diagnostics;
using System.IO;
namespace DRRS_CSharp
public partial class frmPDF : Form
public frmPDF()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
Document doc = new Document(PageSize.A4.Rotate());
var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
doc.SetMargins(50, 50, 50, 50);
doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
doc.Open();
PdfPTable table = new PdfPTable(6);
table.TotalWidth =530f;
table.LockedWidth = true;
PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
cell.Colspan = 6;
cell.HorizontalAlignment = 0;
table.AddCell(cell);
Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
para.Alignment = Element.ALIGN_CENTER;
iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
png.ScaleToFit(105f, 105f);
png.Alignment = Element.ALIGN_RIGHT;
SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
conn.Open();
SqlDataReader dr;
dr = cmd.ExecuteReader();
table.AddCell("Reprocessing Date");
table.AddCell("Patient Name");
table.AddCell("Dialyzer(Manufacturer,Size)");
table.AddCell("No.of Reuse");
table.AddCell("Verification");
table.AddCell("DialyzerID");
while (dr.Read())
table.AddCell(dr[2].ToString());
table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
table.AddCell("@count".ToString());
table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
table.AddCell(dr[0].ToString());
dr.Close();
table.SpacingBefore = 15f;
doc.Add(para);
doc.Add(png);
doc.Add(table);
doc.Close();
System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
this.Close();
The above code executes well with no problem at all!
As you can see the file to which i create and save and open my pdf report is
AssignedDialyzer.pdf.
The column headers of table in pdf report from c# windows forms using iTextSharp are
"Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
"DialyzerID".
However the problem i am facing is after execution and opening of document is my
column headers in table in pdf report from
c# and datas in it all appear in bold.
I have browsed through net regarding to solve this problem but with no success.
What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
vb6,adodb with ms access using iTextSharp?
I have approached Sound Forge.Net for help but with no success.
I hope anyone/someone truly understands what i am trying to ask!
I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
I hope i get a reply in terms of solving this problem.
vishalHi,
About iTextSharp component issue , I think this case is off-topic in here.
I suggest you consulting to compenent provider.
http://sourceforge.net/projects/itextsharp/
Regards,
Marvin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to make subforms editable in ADOBE forms
Hello All,
The 'Pagination' for few of the subforms are editable, and for few of the subforms are not editable.
Actaully i have to set the 'overflow' for one subform, but the whole pagination is dispaly mode.
(i can edit pagination for other subforms).
can someone help how to make it editable.
Thanks in advance
Best Regards,
Amarender Reddy BHello Amar,
Can please explain the problem you are facing with more clearer words. I am unable to make out any thing from this post.
You might have some problem with Pages. We have two type of pages body and master. If a perticular subform is there in master page you can not edit it on the body page.
Regards,
Vikash -
How to create field catalog using field-symbols in normal alv report?
hi all,
how to create field catalog using field-symbols in normal alv report? i.e, using function modules...reuse_alv_list_display/grid_display?
regards,
jackHI
LIKE THIS
TYPE-POOLS : slis.
DATA : t_fieldcat TYPE slis_t_fieldcat_alv,
st_fieldcat TYPE slis_fieldcat_alv.
st_fieldcat-fieldname = 'STATUS'.
st_fieldcat-seltext_l = 'STATUS INDICATOR'.
st_fieldcat-outputlen = 17.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'VBELN'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Sales Document No.'.
st_fieldcat-outputlen = 10.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'AUDAT'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Document Date'.
st_fieldcat-outputlen = 10.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'VBTYP'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Document Type'.
st_fieldcat-outputlen = 4.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'AUART'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Category'.
st_fieldcat-outputlen = 1.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'AUGRU'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Reason'.
st_fieldcat-outputlen = 3.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'NETWR'.
st_fieldcat-do_sum = 'X'.
st_fieldcat-seltext_l = 'Net Amount'.
st_fieldcat-outputlen = 15.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'WAERK'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Unit'.
st_fieldcat-outputlen = 5.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
*sortinfo
st_sort-fieldname = 'AUART'.
st_sort-up = 'X'.
st_sort-subtot = 'X'.
APPEND st_sort TO t_sort.
CLEAR st_sort.
st_sort-fieldname = 'VBTYP'.
st_sort-up = 'X'.
st_sort-subtot = ' '.
APPEND st_sort TO t_sort.
CLEAR st_sort.
st_sort-fieldname = 'WAERK'.
st_sort-up = 'X'.
st_sort-subtot = 'X'.
APPEND st_sort TO t_sort.
CLEAR st_sort.
st_sort-fieldname = 'VBELN'.
st_sort-up = ' '.
st_sort-subtot = 'X'.
APPEND st_sort TO t_sort.
CLEAR st_sort.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_eventcat
EXCEPTIONS
list_type_wrong = 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.
IF grid = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = g_program
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = t_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = t_sort
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 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.
REWARD IF USEFULL -
How to make separately editable blocks in one widget?
How to make separately editable blocks (Width, Height, BGColor,...) in one widget?
There's an example widget for a 5x5 table which allows you set the color of different areas differently.
Download the sample files at the bottom of the MUCOW documentation page:
MuCow Documentation
The sample named 'Table5x5.mucow' sets different parts of the widgets to different colors. -
How to make field editable in Tcode WPED
Hi,
Its about upgrade of IS Retail from ECC5.0 to ECC6.0.
For Inbound IDOCS coming from POS to SAP System, IDOCs which are in unprocessed category in WPER Tcode.
Now problem is in Tcode WPED there is a transaction date field which is now non editable in ECC6.0
I want to make it modifiable.
Earlier in ECC5.0 It was editable.
So how to make that field modifiable.
Regards,
DivyaThanks Chenna
But that field is sometimes coming editable and sometimes not.....may be it depends on some condition.....but I want to make it editable always whenever an Inbound IDOC is in "To be processed" status in WPER tcode.
Iam going in that screen where field is coming uneditable is:
Tcode WPER -
> Inbound IDOC processing---> to be processed idocs---> double clicking on Idoc Number (comes on WPED screen with non-editable fields in overview table).
If I'm double clicking on that transaction date field it goes to the screen whcih shows Sales Audit Editor: Item list of aggregate sales.
Suggest me how to make it editable.
bye
Divya -
Search bar shows only icon. How to make it return to normal?
Search bar shows only icon. How to make it return to normal?
Normally, the search bar looks like the picture in this link.
http://www.simplehelp.net/images/googlesearchicon/img03.jpg
However, I only have the icon in front and no space to type the search information. How can this be solved?
Is it because of any of my add-ons?Try:
* http://kb.mozillazine.org/Corrupt_localstore.rdf
Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
* Don't make any changes on the Safe mode start window.
See:
* [[Troubleshooting extensions and themes]]
Maybe you are looking for
-
USB connectivity policy not working on 1st connect of device
Hi, I have an problem concerning my USB connectivity policy. My endpoint zone is blocking all USB devices. Users do have access for known USB devices (USB storage devices) I have put into another USB connectivity policy which is attached to the User
-
Anyone has a remedy for mail/leopard sending emails problem ?
I just spend hours on my MBP trying to set up MAIL and on various forums trying to find a cure for what seems to be a common problem on Leopard, not being able to send emails. I like many others are getting the "can not send message using the smtp se
-
Eliminate entering password to make system changes
How can I eliminate entering a password when an app whats to make system changes - seems redundant since I am the administrator
-
How to set default directory for SQL LOADER
hi all, i wanted to know how can we setup a default directory for SQL LOADER if at all we can. i connot place my control and data files in local system and use them at command prompt. rather i wanted to know if we can set default directory that the l
-
Just like you have a url for a page is there a url for a portlet
just like you have a url for a page is there a url for a page portlet... so that you can change the content of a portlet on page to another page in the portal