As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I am trying to create a dynamic date range parameter for a field called WORK_DATE for a report/procedure. Here is my where statement:
WHERE ( WORK_DATE GE 'YYMD(&Today,-14,'I8YYMD')' ) AND ( WORK_DATE LE '&Today' );
However, I am getting the following error when running the report:
0 ERROR AT OR NEAR LINE 35 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC257) MISSING QUOTE MARKS: 'YYMD( ,-14,'I8YYMD BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
7.6.8, Windows XP Excel, PDF, Active HTML, HTML, PDF
Move the calculation of the begin date to Dialogue Manager before your TABLE FILE:
-SET &BEG_DATE = AYMD(&Today,-14,'I8YYMD');
-*
TABLE FILE xxx
PRINT/SUM ...
BY ...
WHERE ( WORK_DATE GE '&BEG_DATE' ) AND ( WORK_DATE LE '&Today' );
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
I tried your suggestion and received the following run time error:
(FOC1400) SQLCODE IS 206 (HEX: 000000CE) XOPEN: 22018 : Microsoft SQL Native Client: [22018] Operand type clash: date is incompa : tible with tinyint [42000] Statement(s) could not be prepared. [] Deferr : ed prepare could not be completed. L (FOC1406) SQL OPEN CURSOR ERROR. : NUR_TIMECARDS
7.6.8, Windows XP Excel, PDF, Active HTML, HTML, PDF
The date format of this WORK_DATE field in SQL is YYYY-MM-DD but, when I pull the field into WebFocus 7.6.8 using a SQL 2005 adapter the field is converted to A10V format. So, I went into the master file and converted the Usage from A10V to YY-M-D and type from Alpha variable in characters to date type.
7.6.8, Windows XP Excel, PDF, Active HTML, HTML, PDF
Put this at the top of your fex and run it. It will print out the SQL generated.
SET TRACEOFF=ALL
SET TRACEON=SQLAGGR//CLIENT
SET TRACEON=STMTRACE//CLIENT
SET TRACEON=STMTRACE/2/CLIENT
SET TRACEUSER=ON
SET TRACESTAMP=OFF
SET XRETRIEVAL=OFF
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
I inputted the following code at the top of the fex: SET TRACEOFF=ALL SET TRACEON=SQLAGGR//CLIENT SET TRACEON=STMTRACE//CLIENT SET TRACEON=STMTRACE/2/CLIENT SET TRACEUSER=ON SET TRACESTAMP=OFF SET XRETRIEVAL=OFF
I then ran the fex and received the HTML page with:
1. An empty BEG_DATE parameter box 2. An empty Today parameter box 3. A drop-down charge_dept parameter
I clicked the run buttom and received an excel spreadsheet with the charge department selected displayed and no data.
Brian.
7.6.8, Windows XP Excel, PDF, Active HTML, HTML, PDF
When debugging a program that you know isn't going to return a report because there's an error, you ought not to output Excel.
Change it to HTML. Run the program. View source. Look for the error. Look for the generated SQL.
I'm not sure modifying the master is the correct approach. "The date format of this WORK_DATE field in SQL is YYYY-MM-DD" - is this what the data looks like, but is the column defined as a date formatted column?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
When running the report with the suggested SET parameters, I don't get any errors but, on the html output I don't get any data. The WORK_DATE column looks like YYYY-MM-DD and in SQL it is defined is defined as a date formatted column but alphanumeric variable column of 10 characters in WebFocus. I hope this answers your question.
7.6.8, Windows XP Excel, PDF, Active HTML, HTML, PDF