Copied to clipboard

Flag this post as spam?

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


  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Oct 27, 2010 @ 15:47
    Tim
    0

    Export Type Examples?

    Hi,

    I'm wanting to create a custom export type, but I can't seem to find any examples in the shared source code in the projects section. Does anyone know where I can find this?

  • Comment author was deleted

    Oct 27, 2010 @ 16:33

    Hi Tim,

    Here is the source for the default export to csv one

     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));
    }
    }
  • Comment author was deleted

    Oct 27, 2010 @ 16:34

    Basicly all export types are currently just an xslt transform

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 03, 2010 @ 13:17
    Tim
    0

    That's exactly what I was after, thanks Tim!

  • 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