Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Woes

Status
Not open for further replies.

Keoki

Programmer
Feb 22, 2000
22
US
I am attempting to export specific reports from inside Visual Basic 6.0 to text files.&nbsp;&nbsp;These files will be written to a CD, so that in 20 years, if someone wants to refer back to them, as a text file over other formats, we feel they will have the best chance to be able to retrieve them.<br><br>I used the following code:<br><br>With ReportExportOptions<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.DiskFileName = sPath<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.DestinationType = 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.FormatType = 8<br><br>and was able to export.&nbsp;&nbsp;Unfortunately, Notepad has a pre-established font type and font size which I have not been able to change from inside VB.&nbsp;&nbsp;This results in field data and pages being truncated.&nbsp;&nbsp;I have spoken to Crystal Report tech support as well as searching their knowledge base.&nbsp;&nbsp;All that I could come up with was:&nbsp;&nbsp;1.)&nbsp;&nbsp;Set my display to 800 x 600, then create the report and save it.&nbsp;&nbsp;Then reset my display to 1024 x 768 and export the report.&nbsp;&nbsp;2.)&nbsp;&nbsp;Make the fields wider.<br><br>I tried the first option but was still unable to get all data.&nbsp;&nbsp;The second option was not valid as the report requires a great deal of data.<br><br>If I manually (through the View Window export the report as a .dif file, then from Excel save it as a .txt file, the process is fairly successful, but if I try to do it from within code, the .dif file throws up errors when opened in Excel and the results of saving as a text file from Excel are horrendous.<br><br>Does anyone know of a way I can export from in code and successfully get a text file or even an image of the report (and all its pages)?&nbsp;&nbsp;<br><br>Thank you for any assistance.<br><br>Keoki<br><br> <p>Keoki<br><a href=mailto:gb@cardinalhill.org>gb@cardinalhill.org</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top