Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Keith 2 posts 32 karma points
    Oct 09, 2013 @ 22:09
    Keith
    0

    Export Data Since Last Export

    Hello. We're using contour for the first time on a project and need some help getting a start on this one.

    Basically we need to display the date and time the last export occured and give an option to export entries entered since the last update.

    So the quetions are:

    What is the best way to approach this? and How/Where to "hook into" contour to insert custom code?

    Thanks.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 11, 2013 @ 09:30
    Tim Geyssens
    100

    There are no hooks into the data export

    But you can create a custom export type that has a setting (datepicker) so that the user can select a date and then use the selected date...

    So default cv export looks like

    public class ExportToExcel : ExportType {

        public ExportToExcel() {
            this.Description = "Exports all data to a csv file";
            this.Name = "CSV File";
            this.Id = new Guid("94ED105A-87B3-4e1f-97CB-9A320AEE2745");
            this.FileExtension = "csv";
        }
    
        private string xslt = Configuration.Path + "/xslt/excel.xslt";
    
        public override string ExportForm(Form form)
        {
            RecordsViewer rv = new RecordsViewer();
            XmlDocument xs = new XmlDocument();
            XmlNode XmlRecords = rv.GetXmlRecords(form, xs);
            rv.Dispose();
    
            return XsltConvert(XmlRecords, HttpContext.Current.Server.MapPath(xslt));
        }
    }
    
  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 11, 2013 @ 09:31
    Tim Geyssens
    0

    Or explain to your users that they can just filter it in excell...

  • Keith 2 posts 32 karma points
    Oct 11, 2013 @ 18:17
    Keith
    0

    Ok, thanks for the response.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 11, 2013 @ 18:29
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies