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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print reports to a text file 2

Status
Not open for further replies.

mkov

Programmer
Sep 10, 2003
203
US
I have to print about 20 different reports to 1 text file. When the reports are printed to the text file, they must look like the origional report from Access. What I envision is that I create the text file through code and then keep appending the results of the reports to it. But not sure exactly how to do it.

Can someone point me in the right direction as to what I need to do.

Thanks for your help.
 
Wow, you have to make a text file LOOK like an Access report? That's not an easy task...you could do it in code, but you'd literally have to go line by line by line by line and put things in the exact position that you want them. If I had to do this I would use Adobe and print the files up and group them all into one file...but that's only an option if Adobe is available.

If you're really stuck with creating a pretty text file, then check the site out for text file coding, there's plenty of it around.

Kevin
 
Adobe is available, but I have never really worked with it much. I will look into that option.

Thanks.
 
Have you thought about saving the report to an RTF?
Sounds like this is what you are looking for.

You can do it either with a macro or with VBA.
Macro: OutputTo, choose your report, choose RTF as Output format, no template.

VBA: DoCmd.OutputTo acreport, "Your Report", "Rich Text Format (*.rtf)"

Does that help?
Regards,
MakeItSo

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
I have thought about that, I would do it through VBA. That would work, but the problem is that there are about 20 different reports that have to be saved to a single file. Could that be done?

Just a thought, but what if I created an unbound report and made all the reports subreports of the unbound report and than saved the report to an .RTF file? I may have just answered my own question, let me know if you think that this will work.

Thanks.
 
mkov,

the solution you propsed should work.....an unbound report with all the subreports has worked for me in the past. I made the subreport fields only a couple lines tall and set the cangrow and canshrink proerties to yes. This removed any "blank" reports and allowed for any bigger report ot be printed correct. Also allowed me to stay within the 23 inch "design" range. And I finished by exporting it all to a PDF fiel via my FAQ on the subject....

****************************
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
MakeItSo and mstrmage1768,

Thanks for your help. I am going to use the unbound report and subreports.

Again, thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top