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]code for report format selection

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]code for report format selection
 Login/Join
 
Gold member
posted
Hello,
I am new to web FOCUS development. I developed HTML of report1. everything works fine. But one extra feature is I have to give a control of report format where user can select PDF,HTML,Excel format. In the fex I declared &WFFM and gave value as PDF. so, when I am running from HTML, I am getting the output as PDF. I have to create 3 option . I created Static Control ( Radio button) and gave value1 and display value as PDF, and second value and display value as HTMl, third value and display value and display value as Excel. I donot know what to do so that when one select PDF it shows PDF format, and if HTML is selected, HTML format and if Excel is selected Excel formati is seen.Please advice.
Regards,
niha

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


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Master
posted Hide Post
In the fex you cannot give value as PDF only. The fex must accept more than one choice for &WFFM. There is a format for accepting more than one choice. It is a multi-select parameter option for &WFFM.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
-DEFAULT &WFFMT = 'PDF';


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Gold member
posted Hide Post
Hello,
Could you please explain me how to do it. I am new to development world.
ON TABLE PCHOLD FORMAT &WFFMT.(,,,,,,,,,,,,,,,).Select type of display output.
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ORIENTATION=LANDSCAPE,
$



on the top: I gave value as:
-DEFAULT &WFFMT = 'PDF'; but I can also give value as HTML or other but in this case in HTML it is only showing one format that is selected. I need to write code to show report according to selection of report format.
Regards,
Niha


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Master
posted Hide Post
Niha: Really - really! - you should get some training.

It's astonishing how many people ask questions on this forum who do not even have the basics. I'm not blaming you - but rather your bosses who should know better than to just drop you off the deep end.

However, your problem is extremely easy to solve. Just eliminate the -DEFAULT statement altogether.

At the end of your table put:
ON TABLE PCHOLD &WFFMT

You will then get a basic prompt when the report is run and you can enter PDF, HTML, EXL07 etc. If you want the fancy PROMPT, you can add that later.

As Squatch says, you can follow that up later - once you get the report itself working - with a control on your HTML launch page.

He is not correct about one thing however - you definitely don't want a multi-select control. You want a single-select control (I typically use a radio button) with multiple options.

But - I'm going rant some more - it is inconceivable to me that you are making launch pages when you haven't been trained on the basics of amper variables and their uses in WebFOCUS programming ....

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Gold member
posted Hide Post
Thanks. I have already got training from IBI on Report essential 1 and 2. With that I have been developing reports and HTML. I had some issues with the second training however I think I cannot take any more training. But with little help I will develop myself.
Thanks.
regards,
niha


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Master
posted Hide Post
It's true that it is not an actual multi-select. I was going by memory and did not have access to the code I needed. What I meant is that the user chooses one selection from multiple choices:

ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel XLSX,XLSX>,<HTML Active Report,AHTML>).Select type of display output.

The above code is from an actual self-service style report I created a few months ago. When I created this HTML report, App Studio created a control for &WFFMT and even added in the little graphic icons representing Excel, PDF, etc.

Give it a try. I won't nag you for lack of training, so if you need more help please let me know.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
Dear Squatch,
Thank you so much! I will try this code. My fex works fine. Also, I cannot create a prompt as we have setting issues. Now at HTML I created Radio button for PDF, Excel , HTML and in the parameter I gave connected &WFFM with radio1. In the parameter &WFFM , going to Setting I also gave the value as PDF, Excel and HTML. Still when I run HTML it is only accepting the value I selected in Fex. I hope you understand my point.
Regards,
Niha
Regards,
nIha

This message has been edited. Last edited by: N/A,


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Master
posted Hide Post
Niha:

As I pointed out earlier - you probably do not want any setting in your FEX. Eliminate the -DEFAULT line altogether, and in your table put

ON TABLE PCHOLD FORMAT &WFFMT with nothing on the line after &WFFMT

Then in your HTML create a single-select (radio button is fine) control linked to &WFFMT with STATIC parameters like this:

PDF    PDF
HTML   HTML
EXL07  Excel


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Master
posted Hide Post
Everything after the &WFFMT variable is just for testing purposes. It does no harm by being there.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
Thanks a lot. I had already done that..but my fex was showing error but not the HTML. I am done. thanks


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     [SOLVED]code for report format selection

Copyright © 1996-2020 Information Builders