Exporting

Moderators: Phil Winkler, Graham Smith, Pete Tabord

Exporting

Postby Raymond Hackney » Fri Feb 01, 2008 2:15 pm

Any help Please


define "tDoorCnt" number .
define "tMatCnt" Number .

define global "gQN" text 6 .
assign gQN := GetGlobal (3) .

define "SN" text 40 .
define "ASN" text 40 .


for tSetsOnQuote with QuoteNumber = gQN ;
list records
ArchetectsSetNumber in order ;
RealSetNumber ;
any rQheader_QN QuoteTitle ;
any rQHeader_QN EntryDate ;
QuoteNumber .


for tQuoteLines with QuoteNumber = gQN and SetNumber = tSetsOnQuote RealSetNumber ;
list records
ProductNumber in order ;
concat ("Set Number" , " " , ArchitectsSetNumber) ;
BolkLineNumber ;
Quantity ;
Units ;
Discription ;
SellingCost ;
LineCost : item sum ;
LineCost * count of rQutDoorNum_QN_SN : sum ;
if ( Firstc (MaterialCode , 5 ) = ".SPEC" or Firstc(MaterialCode,5) "SPEC.", Concat (MaterialCode , ".", QuoteNumber) , MaterialCode ) .
end

for tQuoteDoorNumbers with QuoteNumber = gQN and RealSetNumber = tSetsOnQuote RealSetNumber ;
list records
DoorNumber in order .


end

for tQuoteNotes with QuoteNumber = gQN and RealSetNumber = tSetsOnQuote RealSetNumber ;
list records
Note .


end
end


export to "e:\xlquote\convert2.TXT" .

.form header tSetsOnQuote
ArchetectsSetNumber RealSetNumber QuoteTitle EntryDate QuoteNumber
.items tSetsOnQuote
@f[1,1] @f[1,2] @f[1,3] @f[1,4] @f[1,5]

.items tQuoteLines
@f[2,1] @f[2,2] @f[2,3] @f[2,4] @f[2,5]

.end

Can anyone see why this will not export correctly it prints perfectly well to a printer if I take the export out, but when I try and export it to XL I get listing as below
======================================
ArchetectsSetNumber RealSetNumber QuoteTitle EntryDate QuoteNumber
01 001 Centenary House 16/02/2006 00108
Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number
Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number
Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number

Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number

Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number

Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number

Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number

Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number Invalid Field Number ==============
Raymond Hackney
 
Posts: 6
Joined: Wed Oct 17, 2007 9:19 am
Location: England-Hertford
Has thanked: 0 time
Been thanked: 0 time
 

Postby Phil Winkler » Fri Feb 01, 2008 3:29 pm

Ray,

Have a look at the QBM of this proc. I suspect the "any rQHeader.." has added another table in your numbering sequence. Therefore, there is no 1,3 or 1,4 fields, but 2,1 and 2,2 instead. That also throws off the second export line to 3,n, etc.
Phil Winkler
 
Posts: 889
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Postby Raymond Hackney » Fri Feb 01, 2008 3:59 pm

Thank You Thank You

Something so simple can sometimes take so long to sort out, you have just made me :D
Raymond Hackney
 
Posts: 6
Joined: Wed Oct 17, 2007 9:19 am
Location: England-Hertford
Has thanked: 0 time
Been thanked: 0 time
 
 

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron