Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
English
Visual Documents 2.0 categories in report crashs program
Mensaje
De
31/12/2002 04:46:07
 
 
a
31/12/2002 00:11:16
Michael Gass
Instructional Software, Inc.
Kirkland, Washington, United States
General information
Foro:
Visual FoxPro
Category:
CodeMine
Miscellaneous
ID de la conversación:
00736473
ID del mensaje:
00736880
Views:
16
>I save the template using MS Word in an RTF file then open the file using Windows Notepad. I copy the content from the Notepad and paste it into a memo field.

OK. As you are doing it this way, you could try using :-
Replace REPTTMPL.Template With FileToStr(cFileName)
This would be much cleaner. However, the point is that you are putting the whole RTF content into the memo file and then using the VisDocs LoadTemplate method, right?

>I'm loading the template into the datastream from the memo field using the following command:
>
>m.nstream = m.ortf.loadtemplate(REPTTMPL.Template)

Can I suggest that you try the following approach :-
*1. Create a temporary file name and write the RTF data in REPTTMPL.Template out to a disk file.
m.cTempFile = forceExt(Substr(Sys(2015),3), 'RTF')
=StrToFile(REPTTMPL.Template, m.cTempFile)
*2. Open the tempfile as follows using the loadTemplateFile method (not the loadTemplate method)
m.nStream = m.oRtf.loadTemplateFile(m.cTempFile)
Obviously, you need to delete the temporary file you have created after it has been loaded into your application.

Before we go any further, try the above approach and see what (if anything) happens when you run a troublesome report.

Best
-=Gary
Previous
Next
Responder
Mapa
Ver

Click here to load this message in the networking platform