Jump to content

exporting a header for tab files

This topic is 7418 days old. Please don't post here. Open a new topic instead.

Recommended Posts

- make new record

set serial number (or sort field) to -1

go to field (first field on layout)


insert calculated result, Status(CurrentFieldName)

go to next field

exit loop if Status(CurrentFieldName) = (Nameof lastField on Layout)

end loop

sort records

export records

search for serial# =-1

delete record

show all records ...

If you export calculated fields, modify the calc as follwows:

if(serial#=-1, "Fieldname"; your calculation ...)

ForDate, Number and Time fields, you may have to create a text calc

if(serial#=-1, "Fieldname"; Date2Text(your date field) ...)

However, I'd rather do it more elegantly with XML.

You cannot export repeating fields with XML because the Character ASCII 29 is not allowed in XML.

<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE stylesheet


<!ENTITY TAB "&#09;" >

<!ENTITY CR "&#13;" >


<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'



<xsl:output method='text' version='1.0' encoding='iso-8859-1' indent='no'/>

<xsl:strip-space elements="*"/>

<xsl:template match ="/">

<xsl:apply-templates select="//fmp:FIELD" />


<xsl:apply-templates select="//fmp:ROW" />


<xsl:template match="fmp:FIELD">

<xsl:if test="not(position() = 1)">


<xsl:value-of select="@NAME"/>


<xsl:template match="fmp:ROW">

<xsl:apply-templates select="fmp:COL" />



<xsl:template match="fmp:COL">

<xsl:if test="not(position() = 1)">


<xsl:apply-templates select="fmp:DATA"/>


<xsl:template match="fmp:DATA">

<xsl:if test="not(position() = 1)">


<!-- repeating field separator ASCII 29 is not allowed! -->

<xsl:value-of select="."/>


<xsl:template match="text()"/>


Link to comment
Share on other sites

This topic is 7418 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.