Focal Point
[CLOSED]SET Commands being ignored with a conversion to App Studio

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

August 03, 2015, 11:55 AM
KellyT
[CLOSED]SET Commands being ignored with a conversion to App Studio
Hello

I have a dashboard report. I have a number of parameter that need to be passed in for the report to run. In my HTML I have a list box that I populate with static text. This will determine which date (field) to use in the report.

Pickup Scheduled Date will use the PUSCHEDULEDDATE field
Pickup Actual Date will use the PUACTUALDATE field
and so on.

When I run my dashboard and fill in all my parameters it is ignoring my "Which Date" Dialog.
This was working before the conversion to App Studio. (was using dev studio 8005)



The &DATEPRINT is coming back as Null.


-SET &ECHO=ALL;
-DEFAULTH &PUCUSTOMERNAME = '_FOC_NULL';
-DEFAULTH &DELCUSTOMERNAME = '_FOC_NULL';
-DEFAULTH &WHICHDATE = '_FOC_NULL';

-SET &DATEPRINT = IF &WHICHDATE EQ 'Pickup Scheduled Date' THEN PUSCHEDULEDDATE ELSE IF &WHICHDATE EQ 'Pickup Actual Date' THEN PUACTUALDATE ELSE IF &WHICHDATE EQ 'Pickup Released Date' THEN PURELEASEDDATE ELSE IF &WHICHDATE EQ 'Delivery Scheduled Date' THEN DELSCHEDULEDDATE ELSE IF &WHICHDATE EQ 'Delivery Actual Date' THEN DELACTUALDATE ELSE IF &WHICHDATE EQ 'Delivery Released Date' THEN DELRELEASEDDATE ELSE '_FOC_NULL';

-SET &S_PUCUSTOMERNAME = IF &PUCUSTOMERNAME EQ '_FOC_NULL' THEN 'NULL' ELSE &PUCUSTOMERNAME;
-SET &S_DELCUSTOMERNAME = IF &DELCUSTOMERNAME EQ '_FOC_NULL' THEN 'NULL' ELSE &DELCUSTOMERNAME;

SET EMPTYREPORT = ON
SET TITLE = ON

TABLE FILE TESTLOADREPORT
PRINT
     &FieldList.(AND(<PRONUMBER,PRONUMBER>,<SHIPPERCODE,SHIPPERCODE>,<NAME,NAME>,<PUSCHEDULEDDATE,PUSCHEDULEDDATE>,<PUACTUALDATE,PUACTUALDATE>,<PURELEASEDDATE,PURELEASEDDATE>)).FieldList.
ON TABLE SUBHEAD
"Load Report Data"
"&DATEtrMDYY <+0> "
WHERE SHIPPERCODE EQ &SHIPPERCODE.(OR(FIND SHIPPERCODE,NAME IN loadreport)).Shipper.;
WHERE (( &DATEPRINT GE '&BeginDate.Enter Begin Date.' ) AND ( &DATEPRINT LE '&EndDate.Enter End Date.' ));
WHERE SALESREPORTINGYEAR EQ &SALESREPORTINGYEAR.(OR(FIND SALESREPORTINGYEAR IN loadreport)).SALESREPORTINGYEAR.;
WHERE SALESREPORTINGWEEK EQ &SALESREPORTINGWEEK.(OR(FIND SALESREPORTINGWEEK IN loadreport)).SALESREPORTINGWEEK.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2007,XLSX>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *

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


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
August 03, 2015, 03:23 PM
MartinY
Have you tried to execute your code up to the
-SET &DATEPRINT = ...

only and see what is it generated on execution ?

I suspect that maybe your condition is not resolved properly.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 03, 2015, 03:56 PM
Doug
Good idea MartinY, Also, is that -SET ... ELSE '_FOC_NULL'; all on one line? Please paste your code in the red "< / >" above to ensure that we're seeing what you're seeing...
Thanks, Doug
August 11, 2015, 09:19 AM
KellyT
here are the results up to the -set &DatePrint

-DEFAULTH &PUCUSTOMERNAME = '_FOC_NULL';
-DEFAULTH &DELCUSTOMERNAME = '_FOC_NULL';
-DEFAULTH &WHICHDATE = '_FOC_NULL';
-DEFAULTH &DATEPRINT = '_FOC_NULL';

-SET &DATEPRINT = IF _FOC_NULL EQ 'Pickup Scheduled Date' THEN PUSCHEDULEDATE ELSE IF _FOC_NULL EQ 'Pickup Actual Date' THEN PUACTUALDATE ELSE '_FOC_NULL';

The &WHICHDATE is being replaced with the _FOC_NULL.



Doug it is all one line. I shortened it now so it was easier to read.

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


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
August 13, 2015, 01:39 PM
KellyT
I have a case open with IBI regarding this. Once I figure out the answer I will come back to this post and post what the fix was.


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005