Focal Point
[SOLVED] Drilldown and Export to CSV in AHTML

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

January 09, 2019, 07:05 AM
Madhumitha
[SOLVED] Drilldown and Export to CSV in AHTML
Hey everyone,
We have a export feature in the active report menu.

When we tested that feature, doesn't work. When you click export excel from the menu it just puts the comma delimited data into the browser window and nothing else happens.

If i add the below code then export is working but drilldown is not working

ON TABLE SET WEBVIEWER ON
ON TABLE SET CACHELINES ON
------------------------------------
Please find the sample report
TABLE FILE CAR
PRINT
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY LOWEST CAR.ORIGIN.COUNTRY
BY LOWEST CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET WEBVIEWER ON
ON TABLE SET CACHELINES ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
COLUMN=N1,
ALT = 'DrillDown 1',
FOCEXEC=IBFS:/WFC/Repository/TEST/Report1_1.fex,
TARGET='_self',
$
ENDSTYLE
END


Anyone else see this behavior or have a solution for it?

Please let me know

This message has been edited. Last edited by: FP Mod Chuck,
January 09, 2019, 08:19 AM
BabakNYC
What release are you using?
What browser are you using? Have you tested other browsers?

I just tested your code with and without the two lines. With the two lines,I get an XLSX and without them, I get an XLS file. Both seem to do exactly what I expected.


WebFOCUS 8206, Unix, Windows
January 10, 2019, 02:18 AM
Madhumitha
My Version - 8204
Without the two code, CSV opening in new browser.
If i add the two code, able to download the CSV file, but drilldown functionality is not working

Thanks,
Madhu


quote:
Originally posted by BabakNYC:
What release are you using?
What browser are you using? Have you tested other browsers?

I just tested your code with and without the two lines. With the two lines,I get an XLSX and without them, I get an XLS file. Both seem to do exactly what I expected.

January 10, 2019, 03:25 AM
Madhumitha
XLS and XML, file downloading but CSV opening in browser itself

quote:
Originally posted by Madhumitha:
My Version - 8204
Without the two code, CSV opening in new browser.
If i add the two code, able to download the CSV file, but drilldown functionality is not working

Thanks,
Madhu


quote:
Originally posted by BabakNYC:
What release are you using?
What browser are you using? Have you tested other browsers?

I just tested your code with and without the two lines. With the two lines,I get an XLSX and without them, I get an XLS file. Both seem to do exactly what I expected.

January 10, 2019, 11:13 AM
FP Mod Chuck
Madhumitha

This is just a guess but maybe check the redirection settings on the client administration console. I see the 'Save Report' setting for csv is yes and it is set to no for xml and xls. May be worth a try. I think you have to restart apache tomcat for the change to take affect.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
January 10, 2019, 12:28 PM
TobyMills
In case it's helpful, it might be that your PC is set to use IE to open .csv files with IE instead of Excel by default.

How to configure Internet Explorer to open Office documents in the appropriate Office program instead of in Internet Explorer
January 14, 2019, 01:48 PM
Hallway
A couple of things you could try are:

You will have to manually name the file with the csv extension in the save as dialog box, but it saved fine on my end.
  
TABLE FILE CAR
PRINT
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY LOWEST CAR.ORIGIN.COUNTRY
BY LOWEST CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET CACHELINES 1000
ON TABLE SET WEBVIEWTARG OFF
ON TABLE SET WEBVIEWER ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
COLUMN=N1,
ALT = 'DrillDown 1',
FOCEXEC=IBFS:/WFC/Repository/TEST/Report1_1.fex,
TARGET='_self',
$
ENDSTYLE
END



Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
January 23, 2019, 07:45 AM
Madhumitha
Hi Hallway,

Thank you so much.

Its working for me.

Thanks,
Madhu


quote:
Originally posted by Hallway:
A couple of things you could try are:

  • CACHELINES is not an ON/OFF option. It is an integer option. i.e. ON TABLE SET CACHELINES 1000
  • Try adding in: ON TABLE SET WEBVIEWTARG OFF

You will have to manually name the file with the csv extension in the save as dialog box, but it saved fine on my end.
  
TABLE FILE CAR
PRINT
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY LOWEST CAR.ORIGIN.COUNTRY
BY LOWEST CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET CACHELINES 1000
ON TABLE SET WEBVIEWTARG OFF
ON TABLE SET WEBVIEWER ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
COLUMN=N1,
ALT = 'DrillDown 1',
FOCEXEC=IBFS:/WFC/Repository/TEST/Report1_1.fex,
TARGET='_self',
$
ENDSTYLE
END

January 23, 2019, 11:22 AM
Hallway
Excellent!! I'm happy to have helped.


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
January 24, 2019, 12:03 AM
Madhumitha
Hi,

One more question, am able to export the csv file from AHTML report, the downloaded file is in unformat and without heading. Can we able to download the file with heading and formatted one.

Please let me know.

Thanks..

quote:
Originally posted by Hallway:
Excellent!! I'm happy to have helped.

January 25, 2019, 01:27 PM
Hallway
quote:
Can we able to download the file with heading and formatted one.


Formatting is impossible for any CSV file as it is just a text file. Try opening a CSV file in Excel, do some formatting and save the file, close it and re-open it. You will see that there is no formatting. If you need formatting, you'll need to export to Excel.

As for the headers, I'm not sure. maybe open up a case and ask the IBI team how to do it.


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All