Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports Background Engine

Status
Not open for further replies.

kriss

Programmer
Oct 24, 2001
36
KE
Is there a way I could run a given Report without evoking the Reports Background Engine??

I have added this line to my PARAMLIST but still it is not working:
Add_Parameter(pl_id, 'ORACLE_SHUTDOWN', TEXT_PARAMETER, 'YES');

in this code :

declare
repid report_object;
v_rep varchar2(100);
tend_code varchar2(100);
pl_id paramList;

begin

pl_id := get_parameter_list('report_params');

if not id_null(pl_id) then
Destroy_Parameter_List( pl_id );
end if;

pl_id := Create_Parameter_List('report_params');


Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'No');
Add_Parameter(pl_id, 'ORACLE_SHUTDOWN', TEXT_PARAMETER, 'YES');
Add_Parameter(pl_id, 'tend_code', text_parameter, :db_tenders_list.tend_id);
run_product(REPORTS , 'letter_test2.RDF', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, Null);

end;

............but it is still not working.

Kriss

 
ORACLE_SHUTDOWN must be the first parameter:

Add_Parameter(pl_id,'ORACLE_SHUTDOWN', TEXT_PARAMETER, 'Yes');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'No');
 
Thanks Hehenka for your replies.

I have put it first on the parameter list...

Add_Parameter(pl_id,'ORACLE_SHUTDOWN',PARAMETER, 'Yes');
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER, 'No');..

...but still the engine appears.

Kriss
 
Sometimes on Forms 6i ORACLE_SHUTDOWN is not working. On Metalink there are some questions on it. This is one of the answers:

I tried in base version of developer 6.0 , and found the background is not shutdown using the ORACLE_SHUTDOWN parameter. But the same work fine with Patchset 7 of Devloper6.0 and Devloper6i base release.
 
Since your report runs in sync with your form, you can use some WINAPI functions to close the RBE.

The following are in VB3 but can be adopted to ORA_FFI easily:

Const SW_SHOWMINNOACTIVE = 7
Const SW_SHOWNOACTIVATE = 4

Const WM_SYSCOMMAND = &H112
Const SC_CLOSE = &HF060

Declare Function FindWindow Lib "User" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Declare Function ShowWindow Lib "User" (ByVal hWnd As Integer, ByVal nCmdShow As Integer) As Integer
Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long

Static hWnd As Integer

hWnd = FindWindow("RWRBE_WINCLASS", "Reports Background Engine")

If hWnd <> 0 Then
rc = SendMessage(hWnd(c), WM_SYSCOMMAND, SC_CLOSE, 0)
rc = ShowWindow(hWnd(c), SW_SHOWNOACTIVATE)
rc = ShowWindow(hWnd(c), SW_SHOWMINNOACTIVE)
rc = ShowWindow(hWnd(c), SW_SHOWNOACTIVATE)
rc = ShowWindow(hWnd(c), SW_SHOWMINNOACTIVE)
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top