Focal Point
[CLOSED] Autoprompt for Input parameters

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

May 26, 2020, 04:52 PM
Tim Easley
[CLOSED] Autoprompt for Input parameters
I am creating a Designer report that uses an SQL stored procedure as the data source. The stored procedure requires two date parameters. The INPUT segment of the .mas is here:

SEGMENT=INPUT, SEGTYPE=S0, $
FIELDNAME=@ACTIVEDATE, ALIAS=P0001, USAGE=HYYMDs, ACTUAL=HYYMDs,
MISSING=ON, ACCESS_PROPERTY=(INTERNAL, NEED_VALUE), $
FIELDNAME=@CODEEFFDATE, ALIAS=P0002, USAGE=HYYMDs, ACTUAL=HYYMDs,
MISSING=ON, ACCESS_PROPERTY=(INTERNAL, NEED_VALUE), $

I tried all variations of the ACCESS_PROPERTY property, (INTERNAL, NEED_VALUE, or both).

I would like the input parameters to use a default date (for the initial report load), and add a date control to the filter shelf that will allow the user to rerun with the date selected.

When I drop the input parameter on the filter shelf I get this error:

(FOC295) A VALUE IS MISSING FOR: &ACTIVEDATE(IA_200526_134055-1)(IA_200526_134055-1)(IA_200526_134055-1)(IA_200526_134055-1)(IA_200526_134055-1)(IA_200526_134055-1)(IA_200526_134055-1)(IA_200526_134055-1)

I also tried using a reporting object, with filters for the input parameters. When running it I get an autoprompt error. I've looked for autoprompt documentation to determine if/how it applies to input parameters, can't find anything that addresses this.

So my question is twofold,

1. Is there a way to provide a default value for input fields?
2. Are filter shelf controls based only on output fields? Can they apply to input fields?

Thank you for your time.

Update: I defaulted the date parameters within the stored procedure, this will probably be acceptable for now. But, I am still getting errors trying to prompt for fields in the input segment.

This message has been edited. Last edited by: FP Mod Chuck,
May 27, 2020, 03:27 PM
FP Mod Chuck
Hi Tim

Been a while since we have talked.. Hope all is well...

When you create the report against the stored procedure if you put a -DEFAULT for the two date variables at the beginning of the fex and use those parameters in your where conditions it should work just fine. The filter shelf will have the default values displayed. My synonym only has an ACCESS_PROPERTY of NEED_VALUE.

My stored procedure looks like this.


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE GetProducts @ProdCat varchar(40)
AS
BEGIN
SET NOCOUNT ON;
SELECT PRODUCT_NAME FROM wrd_wf_retail_product WHERE PRODUCT_CATEGORY = @ProdCat
END
GO


My WebFOCUS Report is as follows.

-DEFAULT &PRODCAT='Televisions';
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET SQUEEZE=ON
-DEFAULTH &WF_HTMLENCODE=ON;
SET HTMLENCODE=&WF_HTMLENCODE

SET HTMLCSS=ON
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

-DEFAULTH &WF_ARVERSION=1;
SET ARVERSION=&WF_ARVERSION

-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE wfretail82/getproducts
BY GETPRODUCTS.ANSWERSET1.PRODUCT_NAME
WHERE GETPRODUCTS.INPUT.@PRODCAT EQ '&PRODCAT';
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
ENDSTYLE
END


I drug this onto a designer page and enabled the filter and all was good.


Thank you for using Focal Point!

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