Focal Point
[SOLVED] Hard filter in WF Synonym

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

December 11, 2014, 08:55 AM
Josh Morel
[SOLVED] Hard filter in WF Synonym
Hello,

I am trying to add a hard filter in the WF synonym so that any use of it will exclude certain records in the source database (IS_VALID = 1). I can create filters, but these come up as parameter objects to add to reports so it doesn't meet my need. I will be attending training next month, but I was hoping to figure this out now. I've searched the forum and found nothing.

Thanks,
Josh
WebFOCUS 8.004

This message has been edited. Last edited by: Josh Morel,




WebFOCUS 8004
Windows Server 2008 R2 Standard 64-bit
All Outputs
December 11, 2014, 09:19 AM
fatboyjim
Have you tried using the FILTER keyword?

I haven't used it before, not sure if it works in your case.


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
December 11, 2014, 09:33 AM
Tom Flynn
In Developer Studio:
Click on Help --> Contents --> Search, type in Filter, click List.
look for Describing a Filter: FILTER, the 10th selection down...

If you need a GUI example, #12 is Creating Filters in a Synonym.

Will still have to have a WHERE statement in the focexec, I think...

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
December 11, 2014, 10:39 AM
j.gross
How about incorporating the condition into the JOIN conditions in a Business View synonym?
December 11, 2014, 10:51 AM
dhagen
I assume that "hard" filter means that you always it applied regardless of the report. If that is true, then add the following at the bottom of the .mas

END
DBA=DBA ,$
USER= ,ACCESS=R, RESTRICT=VALUE, NAME=SYSTEM,
    VALUE=IS_VALID EQ 1,$ 
 



"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
December 12, 2014, 10:59 AM
M. Meagher
If you are never going to use the fields you can just drop them from the synonym entirely.


Developer Studio 7.7.05
Application Studio 8.0.09
Windows 7
All Formats
December 16, 2014, 03:21 PM
Josh Morel
Thanks dhagen, this works. I think there should be a more intuitive solution. In a SQL view, for example, this would be very simple.

j.gross, I thought about that but it seemed a little convoluted to meet my purpose.

quote:
Originally posted by dhagen:
I assume that "hard" filter means that you always it applied regardless of the report. If that is true, then add the following at the bottom of the .mas

END
DBA=DBA ,$
USER= ,ACCESS=R, RESTRICT=VALUE, NAME=SYSTEM,
    VALUE=IS_VALID EQ 1,$ 
 





WebFOCUS 8004
Windows Server 2008 R2 Standard 64-bit
All Outputs
December 18, 2014, 01:15 PM
Josh Morel
Okay. Now I've run into another issue. Everything was working fine on Tuesday, but today, inexplicatly it no longer works. When I go to create a report using this synonym I see none of the fields. When I remove the DBA part, I see the filtered. I don't have any idea what changed between the two days.

Any other suggestions? Thanks.




WebFOCUS 8004
Windows Server 2008 R2 Standard 64-bit
All Outputs
December 18, 2014, 06:18 PM
njsden
The DBA piece in the master should work consistently but if it isn't doing that for whatever reason, why don't you just define a view in your database exposing only the columns and rows you want and simply create a WF synonym on it and make it available for consumption to your users?

That seems like something you'd prefer over the security mechanism available via WF metadata anyway Smiler

quote:
In a SQL view, for example, this would be very simple.




Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
December 30, 2014, 09:38 AM
Josh Morel
quote:
Originally posted by njsden:
The DBA piece in the master should work consistently but if it isn't doing that for whatever reason, why don't you just define a view in your database exposing only the columns and rows you want and simply create a WF synonym on it and make it available for consumption to your users?

That seems like something you'd prefer over the security mechanism available via WF metadata anyway Smiler

quote:
In a SQL view, for example, this would be very simple.


Thanks njsden, I will likely do this. I'd like to understand why the DBA thing isn't working. I will be attending security training in Jan so hopefully I can ask there if I can't figure out on my own. I'm going to leave this open (unresolved) for a bit if anyone has any other ideas.




WebFOCUS 8004
Windows Server 2008 R2 Standard 64-bit
All Outputs
January 05, 2015, 05:56 AM
WF_IL
Hi

You could use the following technique of creating a filter which is executed on the master file level without having to actually define it in the master file or use it in a fex,
add to your webfocus client site profile fex (referenced in site.wfs) the FILTER syntax

for example:

FILTER FILE CM_GNA_MONTH
NAME=SEIFCM
WHERE V_GNA_SEIF.SEIFID_LVL1 NE MISSING;
END
-RUN
SET FILTER= SEIFCM IN CM_GNA_MONTH ON


Yours,
Eran
SRL Products

http://www.srl.co.il

January 06, 2015, 09:31 AM
<Emily Duensing>
Josh,

Your profile doesn't state what level of WebFOCUS you are at, but you might investigate whether a Master File Profile might meet your needs. I believe the Master File Profile is relatively new; however, I do not know exactly which release.
January 20, 2015, 02:53 PM
Josh Morel
quote:
Originally posted by Emily Duensing:
Josh,

Your profile doesn't state what level of WebFOCUS you are at, but you might investigate whether a Master File Profile might meet your needs. I believe the Master File Profile is relatively new; however, I do not know exactly which release.


We have 8004.

I ended up trying the DBA solution from DHAGAN again and its working. Not sure why I was experiencing that other issue before....




WebFOCUS 8004
Windows Server 2008 R2 Standard 64-bit
All Outputs