Home » Developer & Programmer » Reports & Discoverer » Problem with running a report
Problem with running a report [message #203882] Thu, 16 November 2006 18:48 Go to next message
verkiles
Messages: 15
Registered: November 2006
Location: Philippines
Junior Member

Hi,

I'm current having a problem with this code:

script:

runrep /test/sample.rep / trandate=$1 desname=/test/reports/sample_$2 payclass=\(\'R\'\)

error:
runrep : not found


Whats wrong with this code?...

THanks in advance..

Re: Problem with running a report [message #203930 is a reply to message #203882] Fri, 17 November 2006 00:11 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"runrep : not found" suggests that executable 'runrep' was not found in current directory or PATH system variable.

Either call it using full path (for example, on MS Windows, 'c:\oracle\bin\runrep') or add this directory into the path.
Re: Problem with running a report [message #204250 is a reply to message #203930] Sun, 19 November 2006 19:02 Go to previous messageGo to next message
verkiles
Messages: 15
Registered: November 2006
Location: Philippines
Junior Member

Thanks a lot littlefoot
Re: Problem with running a report [message #204253 is a reply to message #204250] Sun, 19 November 2006 20:37 Go to previous messageGo to next message
verkiles
Messages: 15
Registered: November 2006
Location: Philippines
Junior Member

Hi littlefoot,

I am new to oracle forms by the way as well as to unix.

I want to run a report using the function web.show but i dont want to show up the web browser, i mean i want it to run it in back ground process and save the generated report to text or other format.
Or is there other way where i can do this?.

Thank you very much for your time.

Godbless!
verkiles




icon6.gif  Re: Problem with running a report [message #206030 is a reply to message #204253] Tue, 28 November 2006 06:40 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

Although You have asked only to the LittleFoot,
SO please forgive me to Interfare into that...and littlefoot really i admire ur Knowledge i 've just joined and saw all of ur solutions.Thanks to being so nice to all Forum User.
----------------------------------------------------

Dear,
Yes we can Creat Report with backend Processes and save it on a Hard device with the Help of batch files which can be invked by ur Reports. I am giving you Some code to making Report into Text format and running batch file remember u also need to make a Batch file...in ur Local C: Drive which is to be called by that so called report.
Please go through that.It will Support only a Local printing and not a LAN if you need to print it on LAN then you have to creat a Virtual LPT2 Port that I heard from Folks but havent Implemented Yet Any way For the Meantime why not try this.
----------------------------------------------------



BEGIN ----------Text formated-------------------------

BEGIN
SELECT TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS')
INTO ld_date
FROM DUAL;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;

BEGIN
SELECT DISTINCT DECODE(WGN_GWB_ID,'N','9','T','10')
INTO ls_sh_gr
FROM V_WAGON
WHERE wgn_tare_memo_no = :boo_control.nbt_tare_memo;

EXCEPTION
WHEN OTHERS THEN
NULL;
END;

pl_fname := 'C:\S1ESTR08'||'.txt';
out_file := Text_IO.Fopen(pl_fname, 'w'); --OPEN FILE

ls_rrln02:=' S1ESTR08 THE XYZ COMPANY,SOMWHERE IN THE WORLD'||' '||'Date : '||ld_date;
ls_rrln03:=LPAD('CENTRAL FREIGHT OFFICE & WEIGH BRIDGES ',73,' ')||LPAD('Page No : ',33,' ')||'1';
ls_rrln04:=LPAD('TARE WEIGHMENT REPORT FOR EMPTY WAGONS',72,' ');
ls_rrln07:=' TARE MEMO NO : '||'TN/2004/0000021';
ls_rrln08:=' TARE WEIGHMENT DATE & TIME : '||'08-DEC-04'||LPAD('LINE NO : ',67,' ')||ls_sh_gr;


ls_rrln12:=' OWNG WAGON WAGON CARRYING <--------WEIGHT IN TONNES-----------> OPERATOR ENTRY';

ls_rrln13:=' RLY NO TYPE CAPICITY MARKED TARE ACTUAL TARE DIFFERENCE CODE MODE';

TEXT_IO.PUT_LINE(out_file,ls_rrln01);
TEXT_IO.PUT_LINE(out_file,ls_rrln02);
TEXT_IO.PUT_LINE(out_file,ls_rrln03);
TEXT_IO.PUT_LINE(out_file,ls_rrln04);
TEXT_IO.PUT_LINE(out_file,ls_rrln05);
TEXT_IO.PUT_LINE(out_file,ls_rrln06);
TEXT_IO.PUT_LINE(out_file,ls_rrln07);
TEXT_IO.PUT_LINE(out_file,ls_rrln08);
TEXT_IO.PUT_LINE(out_file,ls_rrln09);
TEXT_IO.PUT_LINE(out_file,ls_rrln10);
TEXT_IO.PUT_LINE(out_file,ls_rrln11);
TEXT_IO.PUT_LINE(out_file,ls_rrln12);
TEXT_IO.PUT_LINE(out_file,ls_rrln13);
TEXT_IO.PUT_LINE(out_file,ls_rrln14);

FOR rec1 IN C1 LOOP
BEGIN

ls_rrln15:=' '||RPAD(rec1.wgn_owng_rly,8,' ')||RPAD(rec1.wgn_wgn_no,21,' ')||RPAD(rec1.wgn_wgn_type,7,' ')||
RPAD(rec1.wgn_sh_cc,16,' ')||RPAD(rec1.wgn_mark_tare,11,' ')
||RPAD(rec1.wgn_sh_act_tare,13,' ')||RPAD(rec1.net,14,' ')||
RPAD('SYSTEM',9,' ')||RPAD(rec1.operator,6,' ');


TEXT_IO.PUT_LINE(out_file,ls_rrln15);
TEXT_IO.PUT_LINE(out_file,ls_rrln16);
ln_cnt:=ln_cnt+1;
EXCEPTION
WHEN OTHERS THEN
MESSAGE ( 'Unable to Create Text File S1ESTR08.txt'||SQLERRM);
MESSAGE ( 'Unable to Create Text File S1ESTR08.txt'||SQLERRM,NO_ACKNOWLEDGE);
RAISE FORM_TRIGGER_FAILURE;
END; -----End of File-------------------------
END LOOP;


TEXT_IO.PUT_LINE(out_file,ls_rrln17);
TEXT_IO.PUT_LINE(out_file,ls_rrln18);
ls_rrln19:=' NO OF WAGONS : '||TO_CHAR(ln_cnt);
TEXT_IO.PUT_LINE(out_file,ls_rrln19);


LOOP
IF ln_cnt <= 40 THEN
TEXT_IO.PUT_LINE(out_file,ls_rrln22);
ln_cnt:=ln_cnt+1;
ELSE
EXIT;
END IF;
END LOOP;


ls_rrln20:=LPAD('WEIGHMENT INCHARGE',20,' ')||LPAD('COMMERCIAL CLERCK',100,' ');
ls_rrln21:=LPAD('<TISCO LTD.>',15,' ')||LPAD('<S.E.RAILWAY>',103,' ');
TEXT_IO.PUT_LINE(out_file,ls_rrln20);
TEXT_IO.PUT_LINE(out_file,ls_rrln21);
TEXT_IO.PUT_LINE(out_file,ls_rrln22);
TEXT_IO.PUT_LINE(out_file,ls_rrln23);
ls_rrln24:=' ****************END OF REPORT**************** ';
TEXT_IO.PUT_LINE(out_file,ls_rrln24);



TEXT_IO.FCLOSE(out_file); -- CLOSE FILE





--------FOR PRINTING------------------------------
str_bat_file := Text_IO.Fopen('C:\S1ESTR08.bat','w');

IF Text_IO.Is_Open(str_bat_file) THEN
TEXT_IO.PUT_LINE(str_bat_file,'TYPE C:\S1ESTR08.TXT > PRN');
TEXT_IO.PUT_LINE(str_bat_file,'EXIT');
ELSE
MESSAGE('Unable to Create / Open Batch File S1ESTR08.bat '||SQLERRM);
MESSAGE('Unable to Create / Open Batch File S1ESTR08.bat '||SQLERRM,NO_ACKNOWLEDGE);
RAISE FORM_TRIGGER_FAILURE;
END IF;

TEXT_IO.FCLOSE(str_bat_file);

MESSAGE('Tare Memo '||:boo_control.nbt_tare_memo||' Printed');
MESSAGE('Tare Memo '||:boo_control.nbt_tare_memo||' Printed',NO_ACKNOWLEDGE);

Host('C:\S1ESTR08.bat');
Re: Problem with running a report [message #209219 is a reply to message #203882] Wed, 13 December 2006 18:57 Go to previous message
verkiles
Messages: 15
Registered: November 2006
Location: Philippines
Junior Member

THank u very much guys!..
Previous Topic: Graphs in discoverer 10g plus
Next Topic: Text between panels break and printed on multiple pages
Goto Forum:
  


Current Time: Tue Nov 26 15:41:14 CST 2024