Solved

Printing report to server from web

Posted on 1999-01-19
15
188 Views
Last Modified: 2013-12-25
I have a html page that prompts a user for information that I add thru a ASP with ADO2.0. I need to print the order automatically to a printer hooked up to the server. I received advice form here about creating a dll to do this. I am using VB6 and would like to use the new datareport form.  Is the best way to get started to create a IIS project or just a activex dll? I would like to call this dll from my asp page(createobject) and then pass it the key field of the record I want printed.
0
Comment
Question by:jfreisen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
15 Comments
 
LVL 3

Accepted Solution

by:
jjbyers earned 100 total points
ID: 1499189
Create two different VB projects in a project group.
1st DLL
2nd EXE that makes the calls to the DLL like the ASP page would.


Hope this helps.
0
 

Author Comment

by:jfreisen
ID: 1499190
I created a DLL and tried to install to install on the web server (using setup created by vb6 wizard). It could not register the dll file.  Although I can register it on my machine with regsvr32. Any suggestions.
0
 
LVL 3

Expert Comment

by:jjbyers
ID: 1499191
Make an install package for the DLL using the setup wizard. Your probably missing VB's runtime and then any references you've used in your project.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jfreisen
ID: 1499192
I had used the setup wizard and tried to install the dll. It failed at the end when it tried to register the dll. It said it was not a valid file.. I tried to register it manually after that and got the same results. Any other suggestions.
0
 
LVL 3

Expert Comment

by:jjbyers
ID: 1499193
Can you mail me your project?

My email is jjbyers@yahoo.com

I'll see if I can figure it out.
0
 

Author Comment

by:jfreisen
ID: 1499194
I just changed the project name from printreport.vbp and .dll to printrep.vbp and .dll, recompiled and ran the install on the server and it was fine. What could have been the problem? Maybe the long filename.
0
 
LVL 3

Expert Comment

by:jjbyers
ID: 1499195
Probably something got corrupted in the compile process.

Glad it's working.
0
 

Author Comment

by:jfreisen
ID: 1499196
Thanks for all your help.
0
 

Author Comment

by:jfreisen
ID: 1499197
I was able to install the dll on the web server. I went into Access on the server to test the dll by using the following:
  dim x as new TestReport.Application
  testreport.Printreport 1
  set x = nothing
This printed the datareport to the server.

In a ASP however:
  dim x
  set x = CreateObject("TestReport.Application")
  x.PrintOrder 1
  set x = nothing
The object is created ok, but I get an error on the printorder call:
"Data Report error 800a216b"      "Error obtaining printer information."
The dll has a datareport form in it that prints out a record in a database.
Any suggestions. Thanks
0
 
LVL 3

Expert Comment

by:jjbyers
ID: 1499198
Do you have a default printer on the server?
0
 

Author Comment

by:jfreisen
ID: 1499199
Yes, there is a HP printer hooked directly to the web server and is set as the default printer. Could this be a rights issues or do you have any other suggestions.
0
 
LVL 3

Expert Comment

by:jjbyers
ID: 1499200
Make sure I_user_machinename has rights to use the printer.

Beyond this I'm almost out of suggestions.
0
 

Author Comment

by:jfreisen
ID: 1499201
I setup the printer on the server to have Full rights for everyone and I get the same results.
If you have any other suggestions I would appreciate them.
0
 
LVL 3

Expert Comment

by:jjbyers
ID: 1499202
I hate to say this but I'm out of suggestions. You might have to log a call to MS.

Sorry
0
 

Expert Comment

by:manishjagatia
ID: 9816729
I am facing a similar problem and getting same error message  "Error obtaining printer information.", but am calling the dll from SQL Server stored procedure.
JFreisen please let me know if your problem is solved and how, I am in great urgency.

thanks in advance
Manish
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb6 connector to SQL Server 2 42
Child Form in front 4 56
Powerpoint 2013: Change cell reference in excel link 3 122
add criteria to query in VB, Access 2003 2 30
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question