Focal Point
Remote server connection not working in MRE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9251084642

September 12, 2007, 07:12 AM
Prasanna
Remote server connection not working in MRE
Hi,
I am new to writing SQL in webfocus and executing it against DB.I wrote a SQL against SQL server, where i connected the DB using the remote connection.It is working fine in EDA server, but not in MRE.I feel that the connection string that i am using will work for EDA only, not for MRE.But i am not sure.Is there any specific settings to be done to run the SQL in MRE.Did anybody come across same issue or any forum discussion about this.Here is my code.
-SET &ECHO='ALL';
-SET XRETRIEVAL = ON
 SQL EDA SET SERVER EMPD
-REMOTE BEGIN
 ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV
 SQL SQLMSS PREPARE SQLOUT FOR
 SELECT name FROM Emp.dbs.Empl;
 END
 TABLE FILE SQLOUT
 PRINT *
 ON TABLE PCHOLD AS FAQLUDIA
 END
 -REMOTE END
 TABLE FILE FAQLUDIA
 PRINT *
 ON TABLE HOLD AS SHORT FORMAT HTMTABLE
 END
-HTMLFORM BEGIN
<HTML><HEAD><STYLE>TD {FONT-FAMILY: ARIAL; COLOR: BLUE; }
</STYLE></HEAD><BODY><DIV ALIGN="CENTER">
!IBI.FIL.SHORT;</DIV></BODY></HTML>
-HTMLFORM END  



Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP


September 12, 2007, 09:51 AM
Francis Mariani
I don't know if this will help at all and I can't test it, but try adding -MRNOEDIT tags around the remote call.
quote:
Managed Reporting will not process the lines when evaluating the Managed Reporting procedure prior to sending it to the WebFOCUS Reporting Server. The lines of code will be passed without the -MRNOEDIT tags to the WebFOCUS Reporting Server.

Syntax:
 
-mrnoedit begin
focexec_code 
-mrnoedit end

Example:
-mrnoedit begin
SQL EDA SET SERVER EMPD
-REMOTE BEGIN
 ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV
 SQL SQLMSS PREPARE SQLOUT FOR
 SELECT name FROM Emp.dbs.Empl;
 END
 TABLE FILE SQLOUT
 PRINT *
 ON TABLE PCHOLD AS FAQLUDIA
 END
 -REMOTE END
 TABLE FILE FAQLUDIA
 PRINT *
 ON TABLE HOLD AS SHORT FORMAT HTMTABLE
 END
-HTMLFORM BEGIN
<HTML><HEAD><STYLE>TD {FONT-FAMILY: ARIAL; COLOR: BLUE; }
</STYLE></HEAD><BODY><DIV ALIGN="CENTER">
!IBI.FIL.SHORT;</DIV></BODY></HTML>
-HTMLFORM END   
-mrnoedit end


The -mrnoedit lines may not be in the correct location, so some experimentation may be required. Of course, this may not work at all, but it's worth a try.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 12, 2007, 09:52 AM
TexasStingray
What Error Message are you getting




Scott

I do know that there needs to be a 'log on' to the database by the MRE application. Do you have that 'built in'? Your administrator should know.


Leah
This runs code on EMPD which is not the default server attached to MRE

quote:

SQL EDA SET SERVER EMPD
-REMOTE BEGIN
ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV
SQL SQLMSS PREPARE SQLOUT FOR
SELECT name FROM Emp.dbs.Empl;
END
TABLE FILE SQLOUT
PRINT *
ON TABLE PCHOLD AS FAQLUDIA
END
-REMOTE END


On the remote server this chooses but does not define the connection.

quote:

ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV


Look in EDASPROF of the remote serve to find an entry like

ENGINE SQLMSS SET CONNECTION_ATTRIBUTES EMP_DEV/[id],[password][;database]

If no id and password are provided it will be attempting to connect through password passthrough. With a default server I know this can be achieved but with a remote server whether password passthru works or not I don't know.

If it does not you will have to code the connection with a guest id and password hard coded in EDASPROF (use server console to MD5 the password) that has enough rights to achieve what you're after.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Francis,
Your approach works. i am able to see the output.Initially there was a blank white screen.
Thanks


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP