Focal Point
[SOLVED] Setting Static Default Dates in Page Designer 8.2

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

June 14, 2018, 06:26 PM
zcbillions
[SOLVED] Setting Static Default Dates in Page Designer 8.2
Hi all,

I'm new to WebFOCUS 82 and looking to SET static dates for the date controls in the page designer. It's defaulting to the current date, but my boss wants to default the start date to Jan 1 and the end date to Dec 31. Is this possible?

Thank you in advance!

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
June 15, 2018, 10:47 AM
FP Mod Chuck
zcbillions

You can use the reporting server profile (edasprof.prf) to set global variables that can be used by any program. Here is some code to use..


-SET &&CYEAR=EDIT(&DATEYYMD,'9999');
-SET &&FIRST_DAY= &&CYEAR | '0101';
-SET &&LAST_DAY = &&CYEAR | '1231';



Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 15, 2018, 11:20 AM
zcbillions
Hi Chuck,

Thank you for your response. So I tried setting a default value for a Calendar control in 8203 in the .fex. It's showing the default value when I right click on the drop down but it's still just displaying the current date.

I've attached a screenshot of what I'm referring to.




WebFOCUS 8
Windows, All Outputs
June 15, 2018, 11:22 AM
zcbillions
It looks like the image above is a broken link? If it is, right click on it to view it in a different tab. I uploaded it using IMGUR.

Thanks!


WebFOCUS 8
Windows, All Outputs
June 15, 2018, 12:59 PM
FP Mod Chuck
zcbillions

So I set the global variables in the server profile and then created this fex and use it to populate the calendar control..


DEFINE FILE WF_RETAIL_TIME
FIRST_DAY/YYMD=&&FIRST_DAY;
LAST_DAY/YYMD=&&LAST_DAY;
END
TABLE FILE WF_RETAIL_TIME
BY FIRST_DAY
BY LAST_DAY
BY WF_RETAIL_TIME.WF_RETAIL_TIME.TIME_DATE
WHERE RECORDLIMIT EQ 1;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT XML
END

This message has been edited. Last edited by: FP Mod Chuck,


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 18, 2018, 09:57 AM
zcbillions
So I figured it out Chuck.

It is actually filtering the dates correctly on the page, but it's not displaying the dates correctly in the Calendar control dropdown. That's pretty confusing to the user.

Can you recreate this issue or is it displaying the correct dates correctly in your page?

Thanks!


WebFOCUS 8
Windows, All Outputs
June 18, 2018, 10:31 AM
FP Mod Chuck
ZCbillions

It is displaying them properly. Insure you are using the explict (requests panel) and the custom fex to populate the calendar control.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats