Lines in rtf report export (1 Viewer)

FuzMic

DataBase Tinker
Local time
Today, 21:25
Joined
Sep 13, 2006
Messages
719
hello members

when i export a report, with lines ie physical separation lines, into an .rtf format file the lines don't appear. How to resolve this? :eek:
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:25
Joined
Feb 19, 2002
Messages
42,970
You can't if you are using the export to Word option. Even though the .rtf option supports some graphic elements such as lines, Access does not export them. I actually wrote .rtf files from COBOL 30 years ago. The .rtf is a tagged format so you just need to get the tags in the correct spots. You could manually write the report data as a .txt file and rename it later to .rtf if Access objects to treating .rtf as a text file. In order to get the lines in, you would need to have an existing .rtf file with those objects in them. Open the .rtf file using notepad and find the code that builds the line. You then just insert the tag code where you need it when you are writing to the file manually.

If you have a pretty print problem, you are better off using Excel to produce the report. Use TransferSpreadsheet to export the data. You can export to a template that has formatting defined or you can open the spreadsheet after it is created and do some pretty printing using VBA and OLE automation.

And finally, exporting to .pdf has two advantages.
1. it prevents tampering
2. all the graphic elements are transferred.

Let us know how you want to proceed.
 

FuzMic

DataBase Tinker
Local time
Today, 21:25
Joined
Sep 13, 2006
Messages
719
Thank you Pat, appreciate the care

To keep it simple i still export the text & numbers with its tabs then open the rtf with Word. Here i can add the graphics or copy the whole lot as 'it is' to Excel then do the cosmetics therein.

Kind Regards worry about the violent weather
 

FuzMic

DataBase Tinker
Local time
Today, 21:25
Joined
Sep 13, 2006
Messages
719
Thank you Pat, appreciate the care

To keep it simple i still export the text & numbers with its tabs then open the rtf with Word. Here i can add the graphics or copy the whole lot as 'it is' to Excel then do the cosmetics therein.

Kind Regards worry about the violent weather
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:25
Joined
Feb 19, 2002
Messages
42,970
Personally, I think Excel is easier to automate than Word so I would either export as a .pdf, which requires no extra code, or export the data to excel and then use OLE to format it.

If you are not up to speed on the Excel object model, you can do what I do. Open Excel and put some data in the sheet so you have something to work with. Then turn on the macro recorder and perform the formatting functions. Stop the recorder and copy the generated code into Access. You will probably have to change some references but the code will usually work fine.
 

Users who are viewing this thread

Top Bottom