Focal Point
DIstributing a CSV with Reportcaster

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8091048022

March 30, 2007, 12:09 AM
<Navin>
DIstributing a CSV with Reportcaster
Hi
I have created a fex file that creates the CSV .

SQL SQLORA
SELECT 'abcd' A , 'efgh' B FROM dual;

FILEDEF HOLDMAST DIR /tmp
FILEDEF SALES DISK /tmp/sales.csv

TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD AS SALES FORMAT COMT
END


TABLE FILE SALES
PRINT
*
END

****************************************

I have got the SALES.CSV as desired (with headers).

I am distributing this CSV file uing Reportcaster in the COMMA distribution format . I cant get the column headers .

Does anyone know how to get the column headers ?.
March 30, 2007, 09:03 AM
jgelona
With your code, it has been my experience that RC will distribute the output from the TABLE FILE SALES. Sounds like you want the SALES.CSV output from the TABLE FILE SQLOUT.

I think you should remove the TABLE FILE SALES.

Then in RC, edit the task. Then in the Report Distribution Information, make sure you have Report Format as Comma.

That should do it.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
March 30, 2007, 09:52 AM
<Navin>
ok .

Yes i already distributing with the COMMA FORMAT only .

I just want to make the Reportcaster to distribute the CSV file with headers . either from SALES / SQLOUT . . Can you please tell me how can i do that . Because i am failing in either case .

This message has been edited. Last edited by: <Navin>,
March 30, 2007, 02:40 PM
Pedro
Hi Navin,

I have open a case with this issue,
they tell me to use a the beginning of my fex

LET COMMA=COMT

but it does'nt work the case is still open
my webfocus version is 7.1.6 apparently in 7.6
this issue is resolve.

It's not only the title that disappear with COMMA format, each field is padded with trailling blank.

As soon as I get an answer from IB I'll let you know.

Pierre


Production: WF 7.7.03 / OS: Solaris Sparc 64/ WebServer: Apache Tomcat/6.0/AppServer:WebLogic 10.3 /DB: Oracle 11.2/ Output formats: HTML, Excel, PDF, CSV, ZIP
March 30, 2007, 02:44 PM
Tony A
Pierre, Navin,

Not sure what release you guys are on but there is a COMT format output from RC.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 02, 2007, 12:44 AM
<Navin>
Tony,

I am using 7.1.6 version.
Yes like pedro said , it is padded with trailing blank.

Got the output with the headers for the above code ? If you have altered the code plz let me know . i will try with that .
April 02, 2007, 08:11 AM
Terry Whitmore
Navin and Pedro,

The LET COMMA=COMT solution is close. However, for some reason (not yet sure why), you need to specify a format other than COMMA in your Caster job.

I tested in WF 716 and specified the output format of DOC. In my focexec, I used "LET DOC=COMT" and got your desired output as follows:

"COUNTRY","CAR","MODEL","SEATS","RETAIL_COST","DEALER_COST"
"ENGLAND","JAGUAR","V12XKE AUTO",2,8878,7427
"ENGLAND","JAGUAR","XJ12L AUTO",5,13491,11194
"ENGLAND","JENSEN","INTERCEPTOR III",4,17850,14940
"ENGLAND","TRIUMPH","TR7",2,5100,4292
"FRANCE","PEUGEOT","504 4 DOOR",5,5610,4631
...

Also, an FYI... bursting is not yet supported with the COM/COMT output types. This is currently an NFR.

I hope this helps!

Terry
April 02, 2007, 08:41 AM
<Navin>
Terry

Hurrah!!!!!!!!!!

That worked.
Thanks a lot . . .