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] Excel / PDF / CSV issue in column header

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Excel / PDF / CSV issue in column header
 Login/Join
 
Gold member
posted
Hi,

I am generate four types of report output - AHTML / PDF / EXCEL / CSV, based on user selection. Please find the below code.

-SET &TITLE_MSG =
- 'Country';

TABLE FILE CAR
SUM
SALES AS 'Sales'
BY COUNTRY AS '&TITLE_MSG'
ON TABLE PCHOLD FORMAT &WFHTML
END

My issue is ASName is working fine for AHTML report but when I export to pdf or csv or excel the column name display entire span details.

Is there any possibility to off span when we export to pdf or csv formats?

Is there any solution, please let me know

Thanks,
Madhu
8204

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 53 | Registered: September 30, 2008Report This Post
Virtuoso
posted Hide Post
Hi,

Can't see your issue. It works great either in my 8.2.0.1M gen 240 or 8.2.04 gen 48.


Could it be possible that you have styling applied behind the scene from a profile ?

Add SET &ECHO = ALL at the top of your fex and look the executed code (view source)

Please use the code tag when posting sample code or sample output.
It's the last icon on the ribbon :
</>


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
Please find the below code

 
TABLE FILE CAR
SUM
SALES AS '<div title="Sales Quota=50K">Sales</div>'
SALES AS '<span title="Sales Quota=50K">SPANSales</span>'
BY COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE SET WEBVIEWTARG OFF
ON TABLE SET WEBVIEWER ON
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET STYLE *
END


Export to excel or pdf or csv, will get the span details in the column header

  
TABLE FILE CAR
SUM
SALES AS '<div title="Sales Quota=50K">Sales</div>'
SALES AS '<span title="Sales Quota=50K">SPANSales</span>'
BY COUNTRY
ON TABLE SET PAGE-NUM OFF
-*ON TABLE SET WEBVIEWTARG OFF
-*ON TABLE SET WEBVIEWER ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT COMT
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET STYLE *
$
ENDSTYLE
END

This message has been edited. Last edited by: Madhumitha,
 
Posts: 53 | Registered: September 30, 2008Report This Post
Master
posted Hide Post
That is because you are exporting the table from the AHTML page. The AHTML page renders the HTML markup within the table so that you don't see the code. However, Excel, pdf, csv do not have an html engine to render the code.

What is the reason for using html markup in the as name?


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Master
posted Hide Post
If you are looking to have the end user select a report output from a prompt, you could do something like this:
 
-SET &WFFMT = &WFFMT.(<WebPage,HTML>,<Active,AHTML>,<Pdf,PDF>,<Excel,XLSX>,<CSV,COMT>).Select the report output.;

-SET &WEB = IF &WFFMT CONTAINS 'HTML' THEN '' ELSE 'FOC_NONE';
-SET &FIL = IF &WFFMT CONTAINS 'HTML' THEN 'FOC_NONE' ELSE '';

TABLE FILE CAR
SUM
&WEB SALES AS '<div title="Sales Quota=50K">Sales</div>'
&WEB SALES AS '<span title="Sales Quota=50K">SPANSales</span>'
&FIL SALES AS 'Sales'
&FIL SALES AS 'SPANSales'
BY COUNTRY
ON TABLE SET PAGE-NUM OFF
&FIL ON TABLE SET WEBVIEWTARG OFF
&FIL ON TABLE SET WEBVIEWER ON
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
END 


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Gold member
posted Hide Post
Instead of commenting based on report output is there any other way? I have more than 300 columns in the report. if I follow the above method then 600 lines have to write.

Is there any other way? please let me know
 
Posts: 53 | Registered: September 30, 2008Report This Post
Expert
posted Hide Post
I don't think you are going to get away with a simple fix.

I would suggest -SET a variable for each title, slightly less coding.

-SET &Col1 = IF &Fmt EQ 'AHTML' OR 'HTML' THEN '<div title="Sales Quota=50K">Sales</div>' ELSE 'Sales' ;
.
.
.
TABLE FILE CAR
SUM
SALES AS &Col1
.
.
.


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
Hi,

if i used set variables then for each column have to use one set variable. so, if i used more than 600 variables then what is the impact, please let me know

Thanks,
Madhu
 
Posts: 53 | Registered: September 30, 2008Report This Post
Expert
posted Hide Post
Hi Madhu,

Shouldn't have any impact, if its just creating amper vars and using them.


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
Expert
posted Hide Post
Going back to the original post: How do this modified code work for you?
TABLE FILE CAR
SUM
SALES AS 'Sales'
BY COUNTRY AS '&TITLE_MSG.EVAL'
ON TABLE PCHOLD FORMAT &WFHTML.EVAL
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
END
Just thinking out loud...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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] Excel / PDF / CSV issue in column header

Copyright © 1996-2020 Information Builders