Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Excel / PDF / CSV issue in column header
Go
New
Search
Notify
Tools
Reply
  
[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: 51 | Registered: September 30, 2008Reply With QuoteReport 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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport 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: 51 | Registered: September 30, 2008Reply With QuoteReport This Post
Guru
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
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 431 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Guru
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
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 431 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport 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: 51 | Registered: September 30, 2008Reply With QuoteReport 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.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport 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: 51 | Registered: September 30, 2008Reply With QuoteReport 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.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport 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: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

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-2018 Information Builders, leaders in enterprise business intelligence.