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     [CLOSED]Need Help in the following code

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Need Help in the following code
 Login/Join
 
Gold member
posted
Hello,
I am a beginner in web Focus and creating report. The purpose of the code is
If Type of coverage is Assistant Living Care then show only 'Assistant Living care Cov Amount' and 'AssistantLiving Care Term Premium'.

IF &P_Type Of Cov EQ 'AssistedLivingCare' THEN GO TO LBL 'Assisted Living Care'
-LBL AsssitedLivingCare
'AssitedlivingCare CovAmount'
'AssistedLivingCare TermPremium'
-GOTO LBL DONE CHECKING

I am getting error
regards,
Niharika

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Virtuoso
posted Hide Post
You populate an &Variable with a prompt and then use it in a WHERE FIELD EQ &Variable within the request as a filter.

TABLE FILE CAR
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.BODY.BODYTYPE

WHERE CAR.BODY.BODYTYPE EQ '&BODYTYPE.BODYTYPE:.';
ON TABLE PCHOLD FORMAT HTML
END

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


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
Hi Niharika and welcome in FOCUS world.

First not sure of what you want to do with
quote:

IF &P_Type Of Cov EQ 'AssistedLivingCare' THEN GO TO LBL 'Assisted Living Care'
-LBL AsssitedLivingCare
'AssitedlivingCare CovAmount'
'AssistedLivingCare TermPremium'
-GOTO LBL DONE CHECKING

But it certainly not working in FOCUS. It should be something like this
-DEFAULT &P_Type_Of_Cov = 'AssistedLivingCare'

-IF &P_Type_Of_Cov EQ 'AssistedLivingCare' THEN GOTO LBL_ALC;
-LBL_ALC
-TYPE 'AssitedLivingCare CovAmount'
-TYPE 'AssistedLivingCare TermPremium'
-GOTO LBL_DONE;
-LBL_DONE

Under LBL_ALC you cannot just put text without a verb. The -TYPE verb is used to display the text or variable.
Also, you are limited on the label length, format and characters that you can used.

Without knowing exactly what you want to do in you LBL_ALC, is difficult to help.

Try to gives us an example using one the IBI sample file such as CAR file.


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
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
quote:
Hi Niharika and welcome in FOCUS world.First not sure of what you want to do withquote:IF &P_Type Of Cov EQ 'AssistedLivingCare' THEN GO TO LBL 'Assisted Living Care'-LBL AsssitedLivingCare 'AssitedlivingCare CovAmount' 'AssistedLivingCare TermPremium'-GOTO LBL DONE CHECKING But it certainly not working in FOCUS. It should be something like this-DEFAULT &P_Type_Of_Cov = 'AssistedLivingCare'

-IF &P_Type_Of_Cov EQ 'AssistedLivingCare' THEN GOTO LBL_ALC;
-LBL_ALC
-TYPE 'AssitedLivingCare CovAmount'
-TYPE 'AssistedLivingCare TermPremium'
-GOTO LBL_DONE;
-LBL_DONE
Under LBL_ALC you cannot just put text without a verb. The -TYPE verb is used to display the text or variable.Also, you are limited on the label length, format and characters that you can used.Without knowing exactly what you want to do in you LBL_ALC, is difficult to help.Try to gives us an example using one the IBI sample file such as CAR file.WF 7.7.03 (not even WF8) AS400/WindowsIn Focus since 2007


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Gold member
posted Hide Post
Thanks. I will try to elaborate with examples so that It will be fixed.
Niharika


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Gold member
posted Hide Post
quote:
Originally posted by MartinY:
Hi Niharika and welcome in FOCUS world.

First not sure of what you want to do with
quote:

IF &P_Type Of Cov EQ 'AssistedLivingCare' THEN GO TO LBL 'Assisted Living Care'
-LBL AsssitedLivingCare
'AssitedlivingCare CovAmount'
'AssistedLivingCare TermPremium'
-GOTO LBL DONE CHECKING

But it certainly not working in FOCUS. It should be something like this
-DEFAULT &P_Type_Of_Cov = 'AssistedLivingCare'

-IF &P_Type_Of_Cov EQ 'AssistedLivingCare' THEN GOTO LBL_ALC;
-LBL_ALC
-TYPE 'AssitedLivingCare CovAmount'
-TYPE 'AssistedLivingCare TermPremium'
-GOTO LBL_DONE;
-LBL_DONE

Under LBL_ALC you cannot just put text without a verb. The -TYPE verb is used to display the text or variable.
Also, you are limited on the label length, format and characters that you can used.

Without knowing exactly what you want to do in you LBL_ALC, is difficult to help.

Try to gives us an example using one the IBI sample file such as CAR file.



Hello Martin,
I want to dynamically place fields on reports based values of variables. One option is all fields...so I have some common fields , I need to dynamically add fields to report. Is it clear?
REgards,
Niha


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Virtuoso
posted Hide Post
Maybe this may help given that I understand that you want to create kind of Ad Hoc reporting

Ad Hoc part I
Ad Hoc part II

But there is several way to answer your need and it may be the easiest one if you don't have that much experience with FOCUS.


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
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
Niharika,

I think you need some basic training.

The Dialog manager you posted is by no means correct.

You have also not posted the error.

I would always suggest that if you have an issue, repro it with one of the sample files and post the whole code. Makes it easier for us to determine what is wrong.


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
Member
posted Hide Post
Hi Waz..

I work with Niharika.. I know what she is trying to do.

She is junior level and has less than 4 months on WF.. so she is trying. And needs guidance from senior level guys like you, Martin and BabakNYC.

What she needs to accomplish is for a drill down report that is drilled to from 3 summary reports, she needs to display different fields in the detail report.

So if she clicks on 1 column, she will get a detail report with Columns A, B, C, D,E, F ... then if she clicks on column 2 then she needs a detail report with Columns A, B, C, D, H, I, J, K, L... and a 3rd report drills to
columns A, B, C, D, X, Y,Z...

so the idea is to achieve this with Print A,B,C, D and then do DMgr and based on a variable show EF or GHIJKL or XYZ.. and if column4 is clicked then columns ABCDEFGHIJKLXYZ are displayed.
 
Posts: 3 | Registered: August 04, 2015Report This Post
Expert
posted Hide Post
Hi CTM2015, Niharika.

I would still suggest basic training on dialog manager. As a minimum there are many examples on the forum, and also in the sample fexes suplied with a WebFOCUS installation.

There are several ways to do this.

The simplest is to do the IF GOTO option.

e.g.
TABLE FILE Blah
PRINT FLD1
-IF &TEST EQ '1' THEN GOTO 1Cont ;
FLD2
FLD3
-1Cont
FLD4
FLD5
BY FLD0
etc
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
Virtuoso
posted Hide Post
Less than 4 months... and how much training, courses, ppt, pdf?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Gold member
posted Hide Post
Thanks a lot for all your help! I have taken Report Essential 1 and Report Essential 2 training from IBI and I have created 3 to 4 basic reports and also HTML.
Regards,
Niha


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Expert
posted Hide Post
Sounds like you have been thrown in the deep 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
You have one other option. You could look at this like a guided adhoc report and pass the fields from the parent to the child report through the drill down.

The child report would look something like this:

TABLE FILE MYTABLE
PRINT
&MYFIELDS.EVAL
BY FIELD1
BY FIELD2
ETC
END  


This way you don't need to worry about GOTO's or anything like that. In your parent drill down you would just need to add MYFIELD="A B C D ETC"


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
The other way is to generate comment variables to control what is seen.

-SET &FLD2Ctrl = IF {condition} THEN '-*' ELSE '' ;
-SET &FLD3Ctrl = IF {condition} THEN '-*' ELSE '' ;
TABLE FILE Blah
PRINT FLD1
&FLD2Ctrl.EVAL FLD2
&FLD3Ctrl.EVAL FLD3
FLD4
FLD5
BY FLD0
etc
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
Gold member
posted Hide Post
Thanks. Let see if it helps.
Niharika


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report 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     [CLOSED]Need Help in the following code

Copyright © 1996-2020 Information Builders