The report is very complex with much looping and dynamic code.
WF 7.7.03, Windows 7, HTML, Excel, PDF
February 27, 2012, 04:09 PM
Enigma006
quote:
Originally posted by JohnB: The report is very complex with much looping and dynamic code.
How much complex it is, one dialog manager command should not hurt it some thing like this should work
-SET &SEL_FLD = IF CONDITION THEN '' ELSE '-*';
Place &SEL_FLD.EVAL in front of the field that needs to be displayed conditionally..
Hope this helps
thank you..
8.1.05 HTML,PDF,EXL2K, Active, All
February 27, 2012, 04:13 PM
JohnB
The condition is based on when a FIELD has a specific value. The code is too complex to save the value into a hold file and the do a -READ to load it into a variable. You cannot specify a FIELD and its value the condition in your example.
WF 7.7.03, Windows 7, HTML, Excel, PDF
February 27, 2012, 05:17 PM
vaayu
Sometimes I had to use conditional styling in the stylesheet like color=white etc.,with a WHEN statement. Would that work for you situation?
February 27, 2012, 05:23 PM
JohnB
I tried WHEN in the stylesheet code, but that didn't work. Do you have any suggestions on how to do this with stylesheet code?
WF 7.7.03, Windows 7, HTML, Excel, PDF
February 28, 2012, 05:53 AM
Wep5622
quote:
Originally posted by JohnB: The condition is based on when a FIELD has a specific value. The code is too complex to save the value into a hold file and the do a -READ to load it into a variable. You cannot specify a FIELD and its value the condition in your example.
You can't decide whether to show a field or not in the middle of a result-set. The column for the field is either there or it isn't - it can't be there sometimes and not there other times.
What you can do is give the field a value of MISSING (or '' if you prefer) if certain conditions are met.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
February 28, 2012, 12:03 PM
JohnB
A column can be in a report sometimes and not others, when you make NOPRINT a variable. I have done this in the past and it works fine. But this dialogue manager approach is not doable in this report.
-SET &NOPRINT = IF CONDITION THEN ' ' ELSE 'NOPRINT';
TABLE FILE ___ PRINT FIELD_A FIELD_B &NOPRINT BY FIELD_C END
WF 7.7.03, Windows 7, HTML, Excel, PDF
February 28, 2012, 12:58 PM
j.gross
If FIELD_A is constant over the scope of the TABLE request, it is feasible.
If it's not constant, the requirement makes no sense -- should the column heading for FIELD_B be visible when you look at some lines and magically invisible when you lok at others on the same tab?
February 28, 2012, 02:57 PM
JohnB
On one tab only, on only one of the 3 spreadsheets this focexec creates, FIELD_A -- the enire column is not to appear. The user has business reasons why it should not appear on that one tab, but should appear on other tabs. This is a monster focexec, and even the person who wrote it doesn't know how to do this new request.This message has been edited. Last edited by: JohnB,
WF 7.7.03, Windows 7, HTML, Excel, PDF
February 29, 2012, 03:47 AM
Wep5622
quote:
A column can be in a report sometimes and not others
That's different from what I was explaining. You can indeed have a report with a column or without a column. You cannot, however, leave out or include a column halfway through a report. The column is either there in its entirety or it isn't.
That is what the OP seems to ask for and I don't think that's possible. J.gross explains the same issue in a different way.
It might be possible to create a multi-segment master with "missing" fields on the right hand side though. I'm not sufficiently familiar with those or with multi-worksheet excel reports to comment on the possibilities of that combination.
Now if there is some way to create a multi-worksheet Excel report using more than one result set, the problem of the OP can be solved by using a compound report or some such. If it depends on the output of one result set it probably cannot (see earlier reservations).
It may be possible to "hide" the column under certain conditions, but that column is going to be there as long as the excel sheet is built from one TABLE FILE request.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
February 29, 2012, 05:14 AM
George Patton
quote:
This is a monster focexec, and even the person who wrote it doesn't know how to do this new request.
The trouble with monsters is that they come out at night and eat you.