Focal Point
[CASE-OPENED]Using BaseApp variables in Report Caster Parameters

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

February 29, 2016, 10:41 AM
Darryl Maraj
[CASE-OPENED]Using BaseApp variables in Report Caster Parameters
I am trying to drive reports from report caster using baseapp variables as parameters in the scheduler but I am not having any success.

- For example &YYMD is defined by IBI and in BaseApp we have a few more defined data fields for the previous seven days, etc...
- I have a report that asks for the from date and the to date
- I have three users that want different from and to dates schedules and sent to them

My thought is rather than create three separate reports I can just use one report and different tasks in the schedule. This way it makes development easier when an update needs to be made to the report.

My question is how can I pass variables as parameters in a report caster schedule when I am setting up the tasks?

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8.105
Windows/Server 2008 R2
HTML, Excel
February 29, 2016, 10:55 AM
BabakNYC
If these are && (also known as Global variables)you can put them in your edasprof and they'll be available in Report Caster as well as live reports.


WebFOCUS 8206, Unix, Windows
February 29, 2016, 12:29 PM
Darryl Maraj
Hi BabakNYC,

So the step I am missing is the EDASPROF step. I already have the variables coded as "&&" in report caster but of course it didn't work. =)

So I am asking because I don't want to break EDASPROF as I have not edited this file other than to turn off application paths.

When I look at EDASPROF I see that there is an include for GLOBAL_SETTINGS. Do I simply add another for baseapp/global_settings.fex. I thought this was already included?


WebFOCUS 8.105
Windows/Server 2008 R2
HTML, Excel
February 29, 2016, 12:39 PM
BabakNYC
It's good practice to include instead of fill up your eadsprof. I didn't know how deep you want to go. However, you're correct. Put the -SET &&variables in the baseapp/global_settings.fex. You can edit the file in notepad if you go to your ibi\apps\baseapp on your install disk.


WebFOCUS 8206, Unix, Windows
February 29, 2016, 03:55 PM
Waz
You can supply different parameters to each task, so you could either pass in the different variables, or supply a variable that will identify the user and have the fex include the required variables from baseapp or somewhere else.

You could also store these wither in a FEX or in a DB and just read them out.

Many many options


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 01, 2016, 09:20 AM
dhagen
quote:
Originally posted by BabakNYC:
It's good practice to include instead of fill up your eadsprof. I didn't know how deep you want to go. However, you're correct. Put the -SET &&variables in the baseapp/global_settings.fex. You can edit the file in notepad if you go to your ibi\apps\baseapp on your install disk.


It's better practice to use the universal profile and keep your server profile(s) clean.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
March 02, 2016, 05:40 PM
Darryl Maraj
So I am slightly confused. All the variables are already in my global_settings.fex file which is in my baseapp folder and I still can't call it from report caster.

I can call them directly in my fex but not pass them in as parameters when using the scheduler in report caster. Am I missing a step here?


WebFOCUS 8.105
Windows/Server 2008 R2
HTML, Excel
March 02, 2016, 07:54 PM
BabakNYC
You have to add a -INCLUDE GLOBAL_SETTINGS in your edasprof. Either that or use the universal profile to accomplish the same thing. Either way, those variables don't exist until you run the global_settings.fex.


WebFOCUS 8206, Unix, Windows
March 03, 2016, 12:38 AM
Darryl Maraj
quote:
-INCLUDE GLOBAL_SETTINGS


Hey Babak,

I appreciate the continued help. I already have that global setting in my edasprof. Sample of what's in there but the parameters are just not working. Am I entering the parameters wrong in Report Caster? Image attached.

https://gatelesis.box.com/s/3k...mmz2dgoohcwc28ndu29g

https://gatelesis.box.com/s/28...fwej6sorj39zbk21puyp

SET SMARTMODE = ON
ENGINE FIX SET CONNECTION_ATTRIBUTES /,
ENGINE DFIX SET CONNECTION_ATTRIBUTES /,
ENGINE SQLORA SET VARCHAR OFF
ENGINE SQLORA SET ORACHAR VAR
-INCLUDE GLOBAL_SETTINGS
ENGINE INT SET DECOMPOSE-DATE ON
ENGINE INT SET DATEFMT DMYY


WebFOCUS 8.105
Windows/Server 2008 R2
HTML, Excel
March 03, 2016, 11:10 AM
BabakNYC
This means the && variables in your global_settings.fex are being executed for both scheduled and non-scheduled reports.

To test this, you could create a simple focexec with this code in it and see what you get. You could also -TYPE each && variable to see if they're populated.

? &&

-TYPE &&VARIABLE1
-TYPE &&VARIABLE2

Let's find out if the &&'s are set and if they are, what do they contain.

I'd also add -SET &ECHO=ALL; to the top of the code so you can see exactly what the variables are being substituted with.

Does this code run live?

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


WebFOCUS 8206, Unix, Windows