Home » Developer & Programmer » Forms » Export All Records with user control (windows 8 Oracle express edition with developer 6I)
Export All Records with user control [message #666443] Sat, 04 November 2017 04:31
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Hi All,

I want to export record from my form with user selected columns

i used this query in this query i export 6 given column how can i use user select column

Quote:

DECLARE
v_file text_io.file_type;
v_rec VARCHAR2(200);
v_bill_our_reg main.chassis_no%TYPE;
v_period main.refno%TYPE;
v_period main.TYPE%TYPE;
v_bill_no main.color%TYPE;
v_dated main.supplier%TYPE;
v_select main.select_serial_no%TYPE;
v_filename VARCHAR2(256);
BEGIN
DECLARE
v_file text_io.file_type;
v_rows NUMBER := 0;
CURSOR txtio IS
SELECT chassis_no,
refno,
TYPE,
color,
supplier,
select_serial_no
FROM main;
v_filename VARCHAR2(256);
BEGIN
v_filename := Get_file_name(file_filter =>
' TXT Files (*.txt)|*.txt| CSV Files (*.csv)|*.csv| ALL Files (*.*)|*.*|',
dialog_type => save_file,
file_name => 'Invoice_Detail.txt',
directory_name => 'C:\');

IF v_filename IS NOT NULL THEN
v_file := text_io.Fopen(v_filename, 'W');

FOR txio IN txtio LOOP
v_rows := v_rows + 1;

text_io.Put(v_file, txio.select_serial_no
||','
||txio.chassis_no
||','
||txio.refno
||','
||txio.TYPE
||','
||txio.color
||','
||txio.supplier);

text_io.New_line(v_file);
END LOOP;

text_io.Fclose(v_file);

Message('Data exported in File '
||v_filename
||' with '
||v_rows
||' rows');
END IF;
END;
EXCEPTION
WHEN no_data_found THEN
text_io.Fclose(v_file);
END;
in this query i export given 6 Record but i want this query for user control

for example user select column for export
Previous Topic: user machine name
Next Topic: voice typing on oracle forms?
Goto Forum:
  


Current Time: Thu Mar 28 09:17:43 CDT 2024