Focal Point
[CLOSED] Amper Variable in Access File

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

May 09, 2012, 06:31 AM
Danny-SRL
[CLOSED] Amper Variable in Access File
We have built a Clustered Master for one of our customers. From this Clustered Master a few Business Views are created.
The root table (the one at the top of the hierarchy) contains monthly data. This table is recreated every month and there are always 3 tables: this month, last month and the previous month.
The customer does not want to have to multiply by 3 the CMs nor the BVs.
Is there a way to use an Amper Variable in the access file of the CM? And, if so, when and how would a value be passed to it?

This message has been edited. Last edited by: Kerry,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

May 09, 2012, 09:28 AM
Mighty Max
There is a new feature in 7.7x where you can use variable in the master file. I was not aware of this feature before. The project I worked on customer data was stored in separate but identical views. Downside of this approach is that you have to manually edit the access and master files after you generate them to make them dynamic. Here is a link to documentation. Parameterizing Master and Access File Values Using Variables

Master File
  
FILENAME=VWREPORT, SUFFIX=SQLMSS, $
   SEGMENT=VWREPORT, SEGTYPE=S0, $
      FIELDNAME=COL_ID, ALIAS=COL_ID, USAGE=I11, ACTUAL=I4,$
      FIELDNAME=COL_NAME, ALIAS=COL_NAME, USAGE=A100V, ACTUAL=A100V, $
      VARIABLE NAME=&&CLNT_DB, DEFAULT='Dev_Reporting', $
      VARIABLE NAME=&&CLNT_SCH, DEFAULT='.dbo.', $
      VARIABLE NAME=&&CLNT_CONN, DEFAULT='RPT_DATA', $


Access File
  
SEGNAME=VWREPORT,
   TABLENAME=&&CLNT_DB|&&CLNT_SCH|vwMonthData, 
   CONNECTION=&&CLNT_CONN,
   KEYS=0, $


Environment Fex
-* File rpt_environment.fex
-* Set up reporting environment

-* Set the default values for database and database server.
-SET &&CLNT_DB = 'Reporting';
-SET &&CLNT_SRV = 'SQL1_PROD'

-* Overwrite data adapter to point to the appropriate database and database server.
ENGINE SQLMSS SET CONNECTION_ATTRIBUTES &&CLNT_CONN &&CLNT_SRV/,;&&CLNT_DB


Report Fex
-* File rpt_sample.fex

-INCLUDE rpt_environment.fex

TABLE FILE VWREPORT
PRINT
COL_ID
COL_NAME
END



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
May 14, 2012, 04:36 PM
David Briars
Max,

Thanks for the knowledge share on the global variables within master and access files new feature.

We have cases were we've had two sets of files, one for each of two schemas.

From my testing, it looks like we will now be able to pass the schema into the access file programatically via a variable, thus we'd only need to maintain one set of files going forward.

Once again, many thanks,
Dave




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster