473,396 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Active Reports

I get OS errors when I run active reports from code.

The first error is with this code (beware of the commented out code)
Dim oPrinter As New System.Drawing.Printing.PrintDocument
oPrinter.PrinterSettings.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
Dim oReport As New Report01
'oReport.Document.Printer.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
oReport.ds.SQL = "Select * from tblAssignments, tblUsers where
ClaimNumber = '08-M63254-4' and tblUsers.UserID =
tblAssignments.AdjusterId"
oReport.ds.ConnectionString =
ConfigurationSettings.AppSettings("ConnectionStrin gTLW")
oReport.Run()
oReport.Document.Print(False, False)

I get this error:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
Unknown Module.

Additional information: The type
System.Drawing.Printing.InvalidPrinterException in Assembly
System.Drawing, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a is not marked as serializable.

If i run it with this code (beware of the commented out code)

'Dim oPrinter As New System.Drawing.Printing.PrintDocument
'oPrinter.PrinterSettings.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
Dim oReport As New Report01
oReport.Document.Printer.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
oReport.ds.SQL = "Select * from tblAssignments, tblUsers where
ClaimNumber = '08-M63254-4' and tblUsers.UserID =
tblAssignments.AdjusterId"
oReport.ds.ConnectionString =
ConfigurationSettings.AppSettings("ConnectionStrin gTLW")
oReport.Run()
oReport.Document.Print(False, False)

I get this error:
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in Unknown Module.

Additional information: The RPC server is unavailable

As a Note, the report works in the webviewer.

Thanks.

Nov 19 '05 #1
4 4918
By default ASP.NET runs under the ASPNET user account, which has limited
permissions. Specifically, this account does not have access to any
printers. All the errors you recieved are related to this fact. Therefore
you'll likely have better luck using impersonation to have ASP.NET run under
another account.

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"CsaaGuy" <ro********@csaa.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
I get OS errors when I run active reports from code.

The first error is with this code (beware of the commented out code)
Dim oPrinter As New System.Drawing.Printing.PrintDocument
oPrinter.PrinterSettings.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
Dim oReport As New Report01
'oReport.Document.Printer.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
oReport.ds.SQL = "Select * from tblAssignments, tblUsers where
ClaimNumber = '08-M63254-4' and tblUsers.UserID =
tblAssignments.AdjusterId"
oReport.ds.ConnectionString =
ConfigurationSettings.AppSettings("ConnectionStrin gTLW")
oReport.Run()
oReport.Document.Print(False, False)

I get this error:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
Unknown Module.

Additional information: The type
System.Drawing.Printing.InvalidPrinterException in Assembly
System.Drawing, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a is not marked as serializable.

If i run it with this code (beware of the commented out code)

'Dim oPrinter As New System.Drawing.Printing.PrintDocument
'oPrinter.PrinterSettings.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
Dim oReport As New Report01
oReport.Document.Printer.PrinterName = "\\CSSFVPNT01\PSFB1F2BL01"
oReport.ds.SQL = "Select * from tblAssignments, tblUsers where
ClaimNumber = '08-M63254-4' and tblUsers.UserID =
tblAssignments.AdjusterId"
oReport.ds.ConnectionString =
ConfigurationSettings.AppSettings("ConnectionStrin gTLW")
oReport.Run()
oReport.Document.Print(False, False)

I get this error:
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in Unknown Module.

Additional information: The RPC server is unavailable

As a Note, the report works in the webviewer.

Thanks.

Nov 19 '05 #2

Steve C. Orr [MVP, MCSD] wrote:
By default ASP.NET runs under the ASPNET user account, which has limited
permissions. Specifically, this account does not have access to any
printers. All the errors you recieved are related to this fact. Therefore
you'll likely have better luck using impersonation to have ASP.NET run under
another account.

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

It does some and thanks. I curious, why does it run from the web viewer?

Nov 19 '05 #3
The web viewer sounds like a client side component, and the client does have
access to the printer.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"CsaaGuy" <ro********@csaa.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...

Steve C. Orr [MVP, MCSD] wrote:
By default ASP.NET runs under the ASPNET user account, which has limited
permissions. Specifically, this account does not have access to any
printers. All the errors you recieved are related to this fact.
Therefore
you'll likely have better luck using impersonation to have ASP.NET run
under
another account.

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

It does some and thanks. I curious, why does it run from the web viewer?

Nov 19 '05 #4
Ah, thats it. Its an Activex Report Viewer. Thank you again.
Steve C. Orr [MVP, MCSD] wrote:
The web viewer sounds like a client side component, and the client does have
access to the printer.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"CsaaGuy" <ro********@csaa.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...

Steve C. Orr [MVP, MCSD] wrote:
By default ASP.NET runs under the ASPNET user account, which has limited
permissions. Specifically, this account does not have access to any
printers. All the errors you recieved are related to this fact.
Therefore
you'll likely have better luck using impersonation to have ASP.NET run
under
another account.

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

It does some and thanks. I curious, why does it run from the web viewer?


Nov 19 '05 #5

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

Similar topics

6
by: laj | last post by:
HI, Excuse this new question, I am trying to impress my wife by putting a db together for her dance studio. I put a table with all students new and old with fields including name and address and...
0
by: Stephen Cairns | last post by:
I am using Active Reports for .Net to produce reports which are displayed in aspx pages in the browser window. I have a problem though displaying parts of my reports in the browser windows. Does...
1
by: Brian Barnes | last post by:
I've been searching using google trying to find a way to display Access Reports via ASP.NET and only finding commericial products which appear to require that the report needs to be converted every...
3
by: mehul | last post by:
Hi, I am trying to use Active Reports v1.1 (Build 1.1.0.84) in a ASP.NET application. Is it possible to use it through the COM interlop as Crystal Reports for .NET which comes built in with...
0
by: CsaaGuy | last post by:
Hi, I am using Active Reports and when a report is run, i need to point the report to a specific printer and tray. I tried this by setting the selected report properties however it didn't do...
0
by: Enver A | last post by:
Hi There, I am having difficulties on using Active Reports on vb.net . I have succesfully tried and executed designing and printing a report but what i am trying to do is to design an End-User...
1
by: ATroy | last post by:
Hello! So far, I can't find any information on making a connection to active directory for reports in visual studio .net 2003. From the list of Available Data Sources I select "OLE DB (ADO)"...
3
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data...
4
by: lawazia | last post by:
I am doing a project in which I have to create INVOICE reports I am using VB6 and Active reports. I am facing problem while creating a multipage invoice report. If the invoice report generated...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.