Filepro Export Help - hopefully last email...
Matthew Williams
matthew.d.williams at gmail.com
Tue Jan 18 13:49:51 PST 2005
Everything was fixed, the culprit was the first IF statement: If: rc
ne 1 or rc ne ""
When it would come around to the second record it would test "rc ne
""", of course the second time around rc was populated so it would
close out the file and jump to the next being the reason why I would
only get the first record.
I took out that part of the IF statement and like magic everything
works. I'm getting every record for every RepCode like I should be.
Thanks for all the help and patients and I can't believe that was the
problem all along... Just one of those "duh" moments I guess. Just
took a few sets of eyes to figure out what was going on.
Take care everything.
Case closed,
-Matt Williams
Hale Mfg.
www.halebookcases.com
On Tue, 18 Jan 2005 16:43:08 -0500, Brian K. White <brian at aljex.com> wrote:
>
> ----- Original Message -----
> From: "Matthew Williams" <matthew.d.williams at gmail.com>
> To: <brian at aljex.com>
> Sent: Tuesday, January 18, 2005 4:00 PM
> Subject: Filepro Export Help - hopefully last email...
>
> > You have a lot of patients and I thank you a lot! :) I updated my
> > code I think to how you said it should be in terms of writing the
> > header and such but I wasn't sure about updating the second line.
> > Here is my code as it is right now where it only selects the first
> > record for each RepCode:
> >
> > 1 ------- - - - - - - - - - - - - - - - -
> > If: rc ne 1 or rc ne ""
> > Then: close rep
> > 2 ------- - - - - - - - - - - - - - - - -
> > If: rc ne 1
> > Then: rc(3,*,g)=1 ; of = "/upss/invoices/"{1{".txt"; gosub header
> > 3 ------- - - - - - - - - - - - - - - - -
> > If: ' Writes my fields out
> > Then: rep(1)=1; ..... end
> >
> > ------- - - - - - - - - - - - - - - - -
> > exp If:
> > Then: export word rep = (of) -r=\n -f=,
> >
> > ------- - - - - - - - - - - - - - - - -
> > If:
> > Then: return
> >
> > ------- - - - - - - - - - - - - - - - -
> > header If:
> > Then: gosub exp
> >
> > ------- - - - - - - - - - - - - - - - -
> > If: ' Export file header
> > Then:
> > rep(1)="SalesPerson";rep(2)="OrderNumber";rep(3)="AccountNumber"
> >
> > ------- - - - - - - - - - - - - - - - -
> > If:
> > Then: write; return
> >
> > I'm guessing my flaw is somewhere in lines 1 or 2? Somehow its
> > closing out the file before getting to the rest of the records?
> > Currently it reads the first record for that particular RepCode then
> > jumps to the next RepCode, writes the first record, etc etc.
> >
> > This is the last thing holding me back from finishing this project, I
> > just with it would magically work! If you think you've got the fix
> > let me know what line to fix.
> >
> > As you can tell i'm in no way a FilePro developer... I just sorta do
> > what I can for this business when i'm home from school on breaks. It
> > is however interesting stuff and I would use this over Access any day
> > of the week!
> >
> > Thank you so much!
> >
> > Take care,
> > -Matt Williams
> > Hale Mfg.
>
> I already went through all the work of showing how to do what you want,
> there is nothing I can say here that is any different than the fp list post.
> The code above is not a starting point that can be tweaked slightly to work,
> it requres more re-arranging than that. I did that re-arranging already so
> there is no point in doing exactly the same thing here.
>
> Copy your current table to a bakup, then use _exacltly_ what I posted.
> It will write a new file for each rep
> It will put a header at the top of each new file
> It will get the "2nd" record (first data record for each rep), just fine
>
> If it doesn't work perfectly the first time then maybe there is still some
> little typo or permissions gotcha I overlooked but even so it is still the
> correct starting point so just do that and let me know what happens. Trust
> me, I do this .. well a lot :)
>
> One deviation from "exactly" that I already see is, I just saw the filename
> was missing the leading "/" so it won't create files in the right spot. Fix
> that of course so it says "/upss/..."
> But don't alter any of the actual code with different tests or putting
> things in any different order than I showed.
>
> Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
> +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
> filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
>
>
More information about the Filepro-list
mailing list