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.
Not totally certain how to do this in one pass, but you could save your results in a hold file, then access that hold file to save your max value as a variable, then create your final report and place that variable in the header.
So a quasi example:
SQL
SELECT *
FROM GGORDER
WHERE ORDER_DATE BETWEEN '1996/01/01' AND '1996/02/01';
TABLE ON TABLE HOLD AS HOO1
END
-RUN
-SET &ORDER_DATE = ;
TABLE FILE HOO1
BY HIGHEST 1 ORDER_DATE
ON TABLE HOLD AS MAX_DATE
END
-RUN
-READFILE MAX_DATE
-RUN
-TYPE ORDERDATE = &ORDER_DATE
TABLE FILE HOO1
PRINT ORDER_DATE
STORE_CODE
ORDER_NUMBER
QUANTITY
ON TABLE SUBHEAD
"Original booking date month-to-date through &ORDER_DATE"
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET CACHELINES 100
ON TABLE SET STYLE *
ENDSTYLE
END
-RUN
Hope this helps.This message has been edited. Last edited by: Mike Williams,
Originally posted by Tony A: Any reason that you've decided the following would not suffice?
ON TABLE SUBHEAD
"Original booking date month-to-date through <MAX.ORDER_DATE"
T
I cannot select 'ORDER_DATE' in the query because then I would have to Group By it as well which would break the results. I could aggregate it in the SQL query to avoid grouping by it but I was unaware I could reference a SQL variable within the HEADING quotes with '<'. Looks like my silly brain was over complicating the issue
It works with the following:
SELECT MAX(ORDER_DATE) AS MAXDATE
HEADING "Original booking date month-to-date through Thank you
Originally posted by Mike Williams: Not totally certain how to do this in one pass, but you could save your results in a hold file, then access that hold file to save your max value as a variable, then create your final report and place that variable in the header.
So a quasi example:
SQL
SELECT *
FROM GGORDER
WHERE ORDER_DATE BETWEEN '1996/01/01' AND '1996/02/01';
TABLE ON TABLE HOLD AS HOO1
END
-RUN
-SET &ORDER_DATE = ;
TABLE FILE HOO1
BY HIGHEST 1 ORDER_DATE
ON TABLE HOLD AS MAX_DATE
END
-RUN
-READFILE MAX_DATE
-RUN
-TYPE ORDERDATE = &ORDER_DATE
TABLE FILE HOO1
PRINT ORDER_DATE
STORE_CODE
ORDER_NUMBER
QUANTITY
ON TABLE SUBHEAD
"Original booking date month-to-date through &ORDER_DATE"
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET CACHELINES 100
ON TABLE SET STYLE *
ENDSTYLE
END
-RUN