Focal Point
[SOLVED] RDF - showing a calendar for dates

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

April 02, 2018, 04:34 PM
ratios
[SOLVED] RDF - showing a calendar for dates
Hi Fellow Focus users!

Just looking for a code example so that when I add my report to RDF, I get a calendar filter. Currently, I'm just getting a textbox with the values I have in my code '12345678'. When I change this to a date, however it works just fine, I'm just not getting that calendar icon for users to pick from and I dont want the users to have to manually type in a date.

Any help is appreciated, thanks!

Using Webfocus App Studio 8202M

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


WebFOCUS App Studio 8202M
Windows, All Outputs
April 02, 2018, 05:28 PM
FP Mod Chuck
Ratios

Welcome to Focal Point... It is a great WebFOCUS forum for developers.

You have to create the calendar control in the html composer.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
April 03, 2018, 11:23 AM
ratios
quote:
You have to create the calendar control in the html composer.

Thank you for the welcome Chuck.

I'm not using the html composer, but the new RDF Page in 8202. When I add my fex to the page, filters are automatically detected if I write my code a certain way. But I don't know how to write it so that the calendar option appears. Any examples would be great. Thanks

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


WebFOCUS App Studio 8202M
Windows, All Outputs
April 03, 2018, 11:27 AM
CoolGuy
Sounds as if you're using the new WF Designer tool and not the RDF templates.

Where are you accessing them from? WF Home page > Repository > Domain > right-click > New Page??


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
April 03, 2018, 11:32 AM
ratios
Yes, sounds more like that but I'm using the web version that is connected to AppStudio 8202 and yes it shows up under Domains.

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


WebFOCUS App Studio 8202M
Windows, All Outputs
April 03, 2018, 11:53 AM
Hallway
You need to make sure that your amper variable has the format included in it.

Example:

 WHERE [report date field] EQ &REPORT_DATE.(|FORMAT=&YYMD).Report Date:.QUOTEDSTRING.;  

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


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
April 03, 2018, 01:14 PM
ratios
quote:
WHERE [report date field] EQ &REPORT_DATE.(|FORMAT=&YYMD).Report Date:.QUOTEDSTRING.;


Hmmm... thanks Hallway but for some reason I'm getting (FOC224) SYNTAX ERROR. Any other ways to code this so I can get that calendar icon in the output?

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


WebFOCUS App Studio 8202M
Windows, All Outputs
April 03, 2018, 01:45 PM
ratios
Hallway,

I kept tweaking your code until I got it! This worked for me:

WHERE [report date field] EQ &REPORT_DATE.(|FORMAT=YYMD).Report Date:.QUOTEDSTRING;


you can see I removed the ampersand from the YYMD and the full stop at the end of the word QUOTEDSTRING.

Now when I pull that fex in, I get a little calendar icon for my users to select a date from at runtime.

Thanks everyone for the help. This was my first post here and you all helped to make it successful.


WebFOCUS App Studio 8202M
Windows, All Outputs
April 03, 2018, 03:23 PM
Hallway
DOH!!

Good catches, I'm glad you figured it out.

Sorry about that *sheepish grin*


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
April 03, 2018, 04:14 PM
ratios
Didn't even see that *sheepish grin* Smiler Now, I'm just trying to figure out how to get yesterday's date in there as a default... always something to work on.


WebFOCUS App Studio 8202M
Windows, All Outputs
April 04, 2018, 11:30 AM
CoolGuy
Hey ratios,

Not sure if you've figured out how you'd get yesterday's date set as the default date in your calendar control pop-up yet, but since you are new, WebFOCUS comes with a list of built-in functions that let you manipulate values for dates, date-times, etc.

If you go here you'll find some very useful functions that will help you in your quest.

If you're still having troubles, let us know.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
April 04, 2018, 02:56 PM
Don Garland
DATE MINUS ONE

 


DEFINE FILE CAR
PROPERNAME/A50 = PATIENTLASTNAME|', '|PATIENTFIRSTNAME;
NDCPROPER/A13 = EDIT(NDC,'99999-9999-99');
DATETIME/HMDYS = DT(&DATEHMDYS);
 [B]DATETIME_MINUS_ONE[/B]/HYYMDS = HADD(DT(&DATEHYYMDS), 'HOUR', -25, 20, 'HYYMDS');
DATETIME_MINUS_TWO/HMDYS = DATETIME_MINUS_ONE;
END


TABLE FILE CAR
BY CAR NOPRINT
HEADING
"DATETIME_MINUS_ONE <DATETIME_MINUS_ONE"
"DATETIME_MINUS_TWO <DATETIME_MINUS_TWO"
"DATE &DATE"
"DATEMYY &DATEMYY"
"DATEDMtrYY &DATEDMtrYY"
"DATEQYY &DATEQYY"
"DATEHYYMDS &DATEHYYMDS"
"DATEDMY &DATEDMY"
"DATEDMYY &DATEDMYY"
"DATEMDY &DATEMDY"
"DATEMDYY &DATEMDYY"
"DATEYMD &DATEYMD"
"DATEYYMD &DATEYYMD"
"DMY &DMY"
"DMYY &DMYY"
"MDY &MDY"
"MDYY &MDYY"
"TOD &TOD"
"YMD &YMD"
"YYMD &YYMD"
"DateTime &DATE &TOD"
"DateTime2 &DATEMDYY &TOD"


ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF,$
TYPE=HEADING,OBJECT=TEXT,ITEM=1,POSITION=0,$
TYPE=HEADING,OBJECT=TEXT,ITEM=2,POSITION=3.5,$
END





WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL