Focal Point
[CLOSED] Creating Reporting Objects using SQL Passthrough

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

March 06, 2009, 02:48 PM
BenC
[CLOSED] Creating Reporting Objects using SQL Passthrough
Hi,

We recently began creating reporting objects to be used in our dashboard through the Report Assistant tool. However, we began having restrictions when we wanted to create data files using SQL Passthrough statements.

Is there a way we can create either a Master file or a Reporting object using SQL Passthrough?

Thanks in advance.

This message has been edited. Last edited by: Kerry,
March 06, 2009, 02:54 PM
GinnyJakes
By definition, SQL Passthru doesn't use a master.

I would think you would have to hold the data and master and write this code in the editor or Other and then do the Report Assist piece on the hold file.

Someone more hip to MRE than I am could probably give you a better answer.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 06, 2009, 05:11 PM
Darin Lee
That is correct Ginny. Reporting objects are based minimally on a master file description. I suppose it could be a currently existing MFD or one that has been created in a preliminary hold file generate from some SQL.

Having said that, I doubt that it would work putting the passthru into the "Other" area. When a user wants to create a new report from a reporting object, the first thing it looks for is the master file specified for the desired object. No code is run first. Thus, if the MFD only exists by executing the SQL passthru, and that code has not yet been executed, you would probably get a Master File not Found error.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 09, 2009, 10:49 AM
Francis Mariani
This probably won't help at all here, but you can use SQL on Masters - this happens when you don't specify the engine in the SQL statement or don't set the engine before the SQL statement. I'm not sure if this is called SQL Passthru but it is SQL.

This SQL code uses the Master for the CAR file:

SQL SELECT * FROM CAR
END



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
March 09, 2009, 05:06 PM
Darin Lee
When you specify the engine name, that is the key for WF to use passthru and no MFDs are necessary. If you just SQL Select, that is not passthru and you must have an MFD. In either case, that will not help for reporting objects.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
September 24, 2012, 05:08 PM
Don Garland
Are there any updates on Reporting Objects and SQL Passthru?

I'm wondering if anyone has developed a technique or two for this.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
September 24, 2012, 05:55 PM
j.gross
If the 'sql passthru' code is static, you can have the dba store it as a sql View; than create a webfocus synonym, and base your reporting object on that.
September 24, 2012, 06:00 PM
Don Garland
True, But I need to push some filtering into an in-line view and I'm hoping I can provide that within a Reporting Object.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
September 24, 2012, 07:35 PM
j.gross
The filter condition would effectively applied as ...

select * from [ select that defines the view ] where [ logical screening condition ]

so the TABLE's WHERE would in effect be treated as WHERE TOTAL.

If the filtering logically needs to be done at the incoming detail level, that's a problem.

But if WHERE TOTAL (or HAVING) would generate the intended net result for your filters, my suggestion is feasible, and the sql server would probably optimise appropriately.
September 25, 2012, 01:52 AM
WF_IL
Hi

You can create a master file to an SQL script
1. Create .Sql file with your SQL statements
2. Place this script in app path folder
3. When you create the webfocus synonym you can select to create it for SQL script

in this scenario you don't need a DBA to create a view on the database level

As far as I know there are going to be new features which will support webfocus variables passed to the SQL scripts so in the future you could define filters on the master file level or filters in the reporting object which will prompt the user for these type of variables


Yours,
Eran
SRL Products

http://www.srl.co.il