473,503 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Seeking reliable Add-In or other solution to create RTF files from A97 & A2.0???

MLH
Anyone tried something reliable. Need to implement
sol'n to reliably create RTF's of Access reports readable
by WordPad.
Nov 12 '05 #1
11 2191
"MLH" <CR**@NorthState.net> wrote in message
news:53********************************@4ax.com...
Anyone tried something reliable. Need to implement
sol'n to reliably create RTF's of Access reports readable
by WordPad.


It's not something I would want to do a lot of, but for a few reports I had where
even Snapshot Format was sometimes dropping data I used the File I/O commands to loop
through my query and write my own data and RTF tags to a file and then attach that
file to an Email. I had to find a copy of the RTF spec on the internet and also
experimented quite a bit with making simple RTF documents in WordPad and then
examining the tags in NotePad.

Each report was a bit of an undertaking, but the result was a fast and perfect RTF
document. Quite a bit smaller than the other formats as well. I found I could even
include embeded images with this method which was another bonus.
Nov 12 '05 #2
MLH
Sounds promising... would you be willing to share some of the
fruits of your labors. It seems as though it'll be quite a project.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxx
On Wed, 17 Sep 2003 12:50:32 -0500, "Rick Brandt" <RB*****@Hunter.Com>
wrote:
"MLH" <CR**@NorthState.net> wrote in message
news:53********************************@4ax.com.. .
Anyone tried something reliable. Need to implement
sol'n to reliably create RTF's of Access reports readable
by WordPad.


It's not something I would want to do a lot of, but for a few reports I had where
even Snapshot Format was sometimes dropping data I used the File I/O commands to loop
through my query and write my own data and RTF tags to a file and then attach that
file to an Email. I had to find a copy of the RTF spec on the internet and also
experimented quite a bit with making simple RTF documents in WordPad and then
examining the tags in NotePad.

Each report was a bit of an undertaking, but the result was a fast and perfect RTF
document. Quite a bit smaller than the other formats as well. I found I could even
include embeded images with this method which was another bonus.


Nov 12 '05 #3
"MLH" <CR**@NorthState.net> wrote in message
news:dd********************************@4ax.com...
Sounds promising... would you be willing to share some of the
fruits of your labors. It seems as though it'll be quite a project.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxx


It's more time-consuming than difficult. Start out with a routine that just writes
all of the data for your report to a standard text file. This will still involve
adding line returns and tab characters etc., to get a basic layout that looks like a
report rather than a table. Once you have that you modify the procedure to add an
RTF header tag at the top of the file. Mine looks like this...

{\rtf1\ansi
\paperh15840\paperw12240
\margl720\margr720\margt720\margb720\psz1

{\colortbl
\red0\green0\blue0;
\red255\green255\blue255;
\red255\green0\blue0;
\red0\green255\blue0;
\red0\green0\blue255;}

{\fonttbl
\f0\fcharset0\fnil Arial;
\f1\fcharset0\fnil Arial Narrow;}

Here is an example then of a Report Header...
{\pard\plain\qc\fs36\b\f0\cf0\cb1ENGINEERING DEVIATION {\par}}

If you paste the two strings above into a NotePad file and then open it with WordPad
you will see the header and how I have specified a font, font size, font color, and
made the paragraph centered. The building of the document just progresses from
there. Your original routine that created a simple text file just needs to have
appropriate RTF Tagging added in at the appropriate locations to produce the layout
and look desired.

You just want to take it a step at a time and verify after each change. One of the
hardest things is making sure that every opening brace "{" has a corresponding
closing brace "}" and at the proper location. Otherwise you get incorrect output (or
no output at all). Obviously some report designs would lend themselves to this
method easier than others.
Nov 12 '05 #4
> You just want to take it a step at a time and verify after each change. One of the
hardest things is making sure that every opening brace "{" has a corresponding
closing brace "}" and at the proper location. Otherwise you get incorrect output (or
no output at all). Obviously some report designs would lend themselves to this
method easier than others.


Of course, you could write a stupid function to count the open and
close braces and see if the count for the two match... Something
along the lines of
Function CountOccurrences(byval strSearchChar as string, byval strText
as string) As Long

dim lngPos as long 'position in string

for lngPos = 1 to len$(strText)
if mid$(strText,lngPos,1)=SearchChar then
CountOccurrences=CountOccurrences+1
end if
next lngPos

End Function

if CountOccurrences("{",strText)<>CountOccurrences("} ",strText) Then
Msgbox "Too many..."
else
Msgbox "Good to go"
End if
Nov 12 '05 #5
MLH
Great suggestions, guys. Thx a lot.
Nov 12 '05 #6
MLH
On Wed, 17 Sep 2003 12:50:32 -0500, "Rick Brandt" <RB*****@Hunter.Com>
wrote:
"MLH" <CR**@NorthState.net> wrote in message
news:53********************************@4ax.com.. .
Anyone tried something reliable. Need to implement
sol'n to reliably create RTF's of Access reports readable
by WordPad.


It's not something I would want to do a lot of, but for a few reports I had where
even Snapshot Format was sometimes dropping data I used the File I/O commands to loop
through my query and write my own data and RTF tags to a file and then attach that
file to an Email. I had to find a copy of the RTF spec on the internet and also
experimented quite a bit with making simple RTF documents in WordPad and then
examining the tags in NotePad.

Each report was a bit of an undertaking, but the result was a fast and perfect RTF
document. Quite a bit smaller than the other formats as well. I found I could even
include embeded images with this method which was another bonus.

I like the idea of embedding the images. That'll come in handy.
Nov 12 '05 #7
MLH <CR**@NorthState.net> wrote in message news:<53********************************@4ax.com>. ..
Anyone tried something reliable. Need to implement
sol'n to reliably create RTF's of Access reports readable
by WordPad.


MLH,

I don't have Access 2.0 around, but in my 97 and 2k-version the
rtf-export facility is available and seems to work when I test
something and open the results in Win 98 Wordpad. What is so
unreliable about it ?
I don't do this normally, but I think it would be a very useful option
for distributing reports.

Marc
Nov 12 '05 #8
"Marc" <M.***********@uva.nl> wrote in message
news:ae**************************@posting.google.c om...
MLH <CR**@NorthState.net> wrote in message

news:<53********************************@4ax.com>. ..
Anyone tried something reliable. Need to implement
sol'n to reliably create RTF's of Access reports readable
by WordPad.


MLH,

I don't have Access 2.0 around, but in my 97 and 2k-version the
rtf-export facility is available and seems to work when I test
something and open the results in Win 98 Wordpad. What is so
unreliable about it ?


Total loss of all graphical objects (not necessarily a big problem depending on the
report).

Imperfect implementation of tab positions.

The horizontal real estate requirements are not the same for phrases in the Access
Report versus the same phrases in Word. This leads to the following problems:

Following the same rules as word-wrap, words at the far right of controls can be
truncated. If even one letter won't fit, the entire word is dropped. Making all
controls wider than they need to be in Access "might" avoid this one.

Any control that has CanGrow enabled can experience truncation of entire lines.

Extra Line-Returns inserted into the content usually leaving just one or two words on
the previous line.

Troubleshooting these problems is complicated by the fact that the issues vary from
record to record, report to report, and might even be influenced by the default
printer driver being used by the person doing the export. I have definitely seen
cases where user A would produce an RTF report that looked ok, while user B's output
of the identical report would suffer loss of data.

AFAIK the only way to avoid the above problems is to use a mono-spaced font like
Courier. I can't even be positive about that as I never tested it thoroughly. The
main problem found in my investigation of this is that Word tends to use a slightly
narrower (or is it wider?) space character for a given font than the Access report.
Actual characters seem to be sized the same. I "assume" that this would not be the
case with a mono-spaced font which would then avoid the problem. Most users though
find mono-spaced fonts too unattractive to want to use them.

Nov 12 '05 #9
MLH
On Fri, 19 Sep 2003 07:54:21 -0500, "Rick Brandt" <RB*****@Hunter.Com>
wrote:
AFAIK

I concur totally. Personally, I get the dropped lines, as all my
controls are enabled for CS/CG.
Nov 12 '05 #10
Rick Brandt previously wrote:
Total loss of all graphical objects

I agree with your other problems but I don't really class this as a
'problem' given that one is exporting to a text format.

However, I do think it is very misleading for the uninformed user to be
presented with the 'Publish to Word' option which appears to offer full
export but doesn't because of the rtf limitations.

Regards

Peter Russell

Nov 12 '05 #11
"Peter Russell" <pr******@russellscott.co.uk> wrote in message
news:me**********************@russellscott.btinter net.com...
Rick Brandt previously wrote:
Total loss of all graphical objects

I agree with your other problems but I don't really class this as a
'problem' given that one is exporting to a text format.


Depends on your definition I guess. RTF is perfectly capable of handling graphical
objects. The Access export routine just doesn't support exporting them.
Nov 12 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2005
by: clutterjoe | last post by:
Anyone know of a commercial classified ad script that has a shopping cart module for (real time or manual CC processing ok)? TIA!
4
13260
by: Papa Legba | last post by:
I'm looking for a Seeking pure CSS horizontal menu with sub-menus which drop down on mouse over. Compatible with as many browsers as possible. Any ideas?
0
1463
by: Andrew Pasetti | last post by:
Hello, There is a document on msdn that describes how to send an email using webdav and vb.net...
2
1824
by: Jason Brown | last post by:
I can't find any javascript that displays a banner according to a user's country. Is this not possible? If not javascript then maybe php or ssi displayed into a page via an iframe. Does anyone...
5
1525
by: Edwinah63 | last post by:
Hi everyone, i was wondering if anyone else had observed this and if there is any workaround or patch. i have some screens (an mdi child forms) with the buttons &Add, &Edit, &Save and E&xit,...
0
1252
by: Jsobel | last post by:
Hi all: I downloaded this new Personal Audio Link app. They issued a press release looking for beta testers, with a compensation offer of 6 months free Vonage service for qualified testers. ...
0
1449
by: John_Gradian | last post by:
Hi all: I downloaded this new Personal Audio Link app. They issued a press release looking for beta testers, with a compensation offer of 6 months free Vonage service for qualified testers. ...
0
1483
by: John_Gradian | last post by:
Hi all: I downloaded this new Personal Audio Link app. They issued a press release looking for beta testers, with a compensation offer of 6 months free Vonage service for qualified testers. ...
4
1560
by: John Grant | last post by:
If I build a web services today with VS 2005 does it support reliable messaging? If I use WSE 3.0 will it support reliable messaging? If I don’t have reliable messaging can I make a web method...
1
2975
by: =?Utf-8?B?S2F1c2hhbCBNZWh0YQ==?= | last post by:
Hi, I am facing the ServerTooBusyException when using reliable session and net.tcp binding. I have single server and single client application. The client registers for the event at the...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.