Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to change field values for a report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to change field values for a report
 Login/Join
 
Master
posted
From a launch page the user selects which &RPTYPE (AGEGRP, COVGRP, ZIP) file is to be
used to create a report.

In the ZIP.ftm there is a field named ZIP.
Possible values for Zip are:

Allegany
Anne Arundel N
_Non_Residential
Wicomico
Worcester

In the AGEGRP.ftm there is a field named AGEGRP.
Possible values for AGEGRP are:
0-<1
1-5
6-14
15-18

In the COVGRP.ftm there is a field named COVGRP
Possible values for COVGRP are:
Aged/Disabled
Families and Children (FAC)
Maryland Children's Health Program (MCHP)
Other
PAC

I am trying to write some (Dialogue Manager
or Define) logic to look at which &RPTYPE the
user selects on the launch page.

If the selection is ZIP, I need to be sure that
the value of '_Non-Residential' is displayed as
'Non-Residential' in the report.

Thus far, I've come up with this,

quote:

DEFINE FILE &FNX
RFLAG/A1 = IF ZIP EQ '_Non-Residential' THEN '1' ELSE '0';
SRNAME/A60 = IF RFLAG EQ '1' THEN 'Non-Residential' ELSE ZIP;
END


but it does not consider when the file is not ZIP.

I would appreciate any shove I could get with this.

Any ideas? Confused

Thanks.

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Guru
posted Hide Post
More dialog manager:
 
DEFINE FILE &FNX
-IF &RPTYP NE 'ZIP' GOTO :SKIPZIP;
RFLAG/A1 = IF ZIP EQ '_Non-Residential' THEN '1' ELSE '0';
SRNAME/A60 = IF RFLAG EQ '1' THEN 'Non-Residential' ELSE ZIP;
-:SKIPZIP
-IF &RPTYP EQ 'ZIP' GOTO :SKIPTHIS;
... and then code an alternate RFLAG and SRNAME field here for other values of &RPTYP with another statement
-:SKIPTHIS
END
 


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Expert
posted Hide Post
On first thoughts, perhaps some DM to select the defines lines needed.

DEFINE FILE &FNX
-IF &??? NE 'ZIP' THEN GOTO NO_ZIP ;
RFLAG/A1 = IF ZIP EQ '_Non-Residential' THEN '1' ELSE '0';
SRNAME/A60 = IF RFLAG EQ '1' THEN 'Non-Residential' ELSE ZIP;
-NO_ZIP
-IF &??? NE 'AGEGRP' THEN GOTO NO_AGEGRP ;
....
-NOAGEGRP
-IF &??? NE 'COVGRP' THEN GOTO NO_COVGRP ;
....
-NO_COVGRP 

END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
Thanks guys, I get the idea. When I have it working, I'll post the solution.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Master
posted Hide Post
Thanks N.Selph and Waz for planting the seed.

Here is the code I had in mind to solve my problem

quote:

DEFINE FILE &FNX
-IF &RPTTYPE EQ 'ZIP' GOTO 'XZIP' ELSE 'XALL';
-*
-XZIP
RFLAG/A1 = IF ZIP EQ '_Non-Residential' THEN '1' ELSE '0';
SRNAME/A60 = IF RFLAG EQ '1' THEN 'Non-Residential' ELSE ZIP ;
-GOTO XEND
-*
-XALL
SRNAME/A60 = &RPTTYPE ;
-XEND
END


of course, followed by:

quote:

TABLE FILE &FNX
PRINT
FIELD1
FIELD2
etc.
BY SRNAME
END


Thanks!


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
I don't think Dialogue Manager should be necessary:

DEFINE FILE &FNX
 SRNAME/A60 = IF &RPTTYPE EQ '_Non-Residential' THEN 'Non-Residential' ELSE &RPTTYPE ;
END

EDIT: The above code will cause an error if the maximum length of values in AGEGRP.ftm is less than 16. In that case, I would change the DEFINE to this, which has the added advantage of covering any other values beginning with '_' that might be added in the future:

DEFINE FILE &FNX
 SRNAME/A60 = IF &RPTTYPE LIKE '_%' THEN EDIT(&RPTTYPE,'$9999999999999999999999999999999999999999999999999') ELSE &RPTTYPE ;
END

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to change field values for a report

Copyright © 1996-2020 Information Builders