Buy Now
Sign in

Export current data viewto csv and pdf

saveg , December 30 2019, 12:16
S
saveg 90
December 30 2019, 12:16 #390513
Can someone pls share a clear and step by step info on how to export my current list view of records that I see on the screen to csv? and also pdf?
I just need to add a button at the end of page where if clicked it would export to csv. also I need pdf.
healyhatman 9
December 30 2019, 12:17 #390514
You have to read the data again then export.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
saveg 90
December 30 2019, 15:46 #390516
thanks
Any how to to follow up and see how can this be achieved?
S
saveg 90
January 03 2020, 11:02 #390539
anyone there???
Im using the readall function then view table then added export csv but the problem I only get the download csv and its empty.
shall I create another function to read or what exactly??
healyhatman 9
January 03 2020, 11:41 #390540
What have you got in your csv export?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
saveg 90
January 03 2020, 11:43 #390541
empty file
healyhatman 9
January 03 2020, 13:26 #390542
No, what have you got in the settings of your CSV export action?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
saveg 90
January 03 2020, 13:39 #390543
see this pls
CSV_Screenshot_2020-01-03.png
Attachments
CSV_Screenshot_2020-01-03.png
CSV_Screenshot_2020-01-03.png
(41.41 KiB)
243 Downloads/Views
healyhatman 9
January 03 2020, 13:53 #390544
Data provider is completely wrong, that's just a string. Try
{var:read_data_action_name.[n].model_name}
For example if your DB read is called "myRead" and your model is "entry" then that would be {var:myRead.[n].entry}
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
saveg 90
January 05 2020, 19:59 #390555
yes now its working fine
just wondering how can I add it as a button to export the current view only??
healyhatman 9
January 05 2020, 22:41 #390559
Use a toolbar button. List view name will be the name of the form element the filter options are in, event will be the event the CSV export is in.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
saveg 90
January 06 2020, 21:08 #390562
ok thanks for clarification.
I went on and did the following
the action csv has only the {fn:csv_export} which was working fine but when I press the button to export
the csv file is now again empty.
CSV_Bar-Administration.png
Attachments
CSV_Bar-Administration.png
CSV_Bar-Administration.png
(41.59 KiB)
219 Downloads/Views
healyhatman 9
January 06 2020, 23:06 #390563
You need to read the data again, which is why you're submitting the filter form.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
saveg 90
January 07 2020, 16:29 #390580
do you mean create another function / action to read data?? or just insert the read db function/action before the export in the event of csv export?
healyhatman 9
January 07 2020, 22:39 #390584
Just use the same read data
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
saveg 90
January 18 2020, 20:56 #390782
dear sir
the csv is exportign fine but the main problem is that all fields are exported despite the fact that the current view is few columns only. how can I reflect the csv to have my current view only.
in my csv event i have two lines
fn:readdb
fn:exportcsv
what im thinking is that is there a way to make a function that returns the current view?
healyhatman 9
January 18 2020, 23:20 #390785
No there's not.
Just restrict the read data action to only the fields you need.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store