|
-
Jun 27th, 2001, 10:40 AM
#1
Thread Starter
New Member
How to print a report
Hi there.
I am making a little system that uses a database in access.
What I want to do is to generate a printed report in base of the information I get when I do a query.
I really will appreciate any help!!!
Thanks..
PacoL
-
Jun 27th, 2001, 10:59 AM
#2
Lively Member
print...
well, i suppose u could use Automation to create an access object and then take control by telling it to open a other programa nd eventually to print.
i can' t remember the Automation code for Access off the top of my head.. I might get back to u on that one.
...i think it goes something like this:
dim q
set q = CreateObject("[This is the bit i can't remember...]")
' and once u have contol of it u can do all sorts of stuff with the
' program such as:
q.visible = false
hope i helped,
well, u cant blame a man for hoping...
pegasus
Those who say that size doesn't matter, aren't big enough to admit that they're wrong.
Sex is like a bank account: once you withdraw, you lose interest.
______________________________
Code:
|^^^^^|
\-Ó-Ò-/
| |_| |
\\_//
__ | |__
/| \___/ |\
/ | | \
/ | Faisal \ \
| / Karjikar | |
\ _\___________|_/
\ /
| \/ |
| || |
|____||___|
\ _ / \ _ /
/|_|\ /|_|\
______ |___| |___| ____
/_/\/\/\/\/\/\/\/\/\/\/\/\/\//\
_\/\/\/\/\/\/\/\/\/\/\/\/\/\//\
/\/\/\/\/\/\/\//\/\/\/\/\/\//\\/\/
^
Its meant to be the ocean... :D
-
Jun 27th, 2001, 02:22 PM
#3
Hyperactive Member
this will open datareport1 and print it.
Cookie = DataReport1.PrintReport(True, rptRangeAllPages)
-
Jun 27th, 2001, 08:05 PM
#4
New Member
Here, this works for me.
Dim strDbName As String
Dim objAccess As Access.Application
Dim strReport As String
On Error GoTo loaderror
strDbName = strDbName & "\somedatabase.mdb"
Set objAccess = CreateObject("Access.Application")
With objAccess
.OpenCurrentDatabase filepath:=strDbName
.DoCmd.OpenReport ReportName:="rptName", _
view:=Access.acPreview
End With
Now, if someone can show me how to do this in a web app without using snapview I will be forever in your debt. (Of course I would rather owe you than cheat you out of it)
-
Jun 28th, 2001, 11:30 AM
#5
Thread Starter
New Member
Thanks to everyone for the help.
I will try it and let you know if it worked for me.
PacoL
-
Jun 28th, 2001, 11:32 AM
#6
Addicted Member
What's about the poor printer function ???
Printer.print "Hello World !"
Printer.enddoc
-
Jun 29th, 2001, 07:03 PM
#7
New Member
Aye Captain, Printer.PrintDoc has had to yield to a greater, and much more sophisticated, procedure. It can now be found on many of your finer 286's and 386's.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|