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.PrintD ocument
oPrinter.Printe rSettings.Print erName = "\\CSSFVPNT01\P SFB1F2BL01"
Dim oReport As New Report01
'oReport.Docume nt.Printer.Prin terName = "\\CSSFVPNT01\P SFB1F2BL01"
oReport.ds.SQL = "Select * from tblAssignments, tblUsers where
ClaimNumber = '08-M63254-4' and tblUsers.UserID =
tblAssignments. AdjusterId"
oReport.ds.Conn ectionString =
ConfigurationSe ttings.AppSetti ngs("Connection StringTLW")
oReport.Run()
oReport.Documen t.Print(False, False)
I get this error:
An unhandled exception of type
'System.Runtime .Serialization. SerializationEx ception' occurred in
Unknown Module.
Additional information: The type
System.Drawing. Printing.Invali dPrinterExcepti on in Assembly
System.Drawing, Version=1.0.500 0.0, Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a 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.PrintD ocument
'oPrinter.Print erSettings.Prin terName = "\\CSSFVPNT01\P SFB1F2BL01"
Dim oReport As New Report01
oReport.Documen t.Printer.Print erName = "\\CSSFVPNT01\P SFB1F2BL01"
oReport.ds.SQL = "Select * from tblAssignments, tblUsers where
ClaimNumber = '08-M63254-4' and tblUsers.UserID =
tblAssignments. AdjusterId"
oReport.ds.Conn ectionString =
ConfigurationSe ttings.AppSetti ngs("Connection StringTLW")
oReport.Run()
oReport.Documen t.Print(False, False)
I get this error:
An unhandled exception of type 'System.Compone ntModel.Win32Ex ception'
occurred in Unknown Module.
Additional information: The RPC server is unavailable
As a Note, the report works in the webviewer.
Thanks. 4 4934
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********@csa a.com> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.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.PrintD ocument oPrinter.Printe rSettings.Print erName = "\\CSSFVPNT01\P SFB1F2BL01" Dim oReport As New Report01 'oReport.Docume nt.Printer.Prin terName = "\\CSSFVPNT01\P SFB1F2BL01" oReport.ds.SQL = "Select * from tblAssignments, tblUsers where ClaimNumber = '08-M63254-4' and tblUsers.UserID = tblAssignments. AdjusterId" oReport.ds.Conn ectionString = ConfigurationSe ttings.AppSetti ngs("Connection StringTLW") oReport.Run() oReport.Documen t.Print(False, False)
I get this error:
An unhandled exception of type 'System.Runtime .Serialization. SerializationEx ception' occurred in Unknown Module.
Additional information: The type System.Drawing. Printing.Invali dPrinterExcepti on in Assembly System.Drawing, Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a 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.PrintD ocument 'oPrinter.Print erSettings.Prin terName = "\\CSSFVPNT01\P SFB1F2BL01" Dim oReport As New Report01 oReport.Documen t.Printer.Print erName = "\\CSSFVPNT01\P SFB1F2BL01" oReport.ds.SQL = "Select * from tblAssignments, tblUsers where ClaimNumber = '08-M63254-4' and tblUsers.UserID = tblAssignments. AdjusterId" oReport.ds.Conn ectionString = ConfigurationSe ttings.AppSetti ngs("Connection StringTLW") oReport.Run() oReport.Documen t.Print(False, False)
I get this error:
An unhandled exception of type 'System.Compone ntModel.Win32Ex ception' occurred in Unknown Module.
Additional information: The RPC server is unavailable
As a Note, the report works in the webviewer.
Thanks.
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?
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********@csa a.com> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.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?
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********@csa a.com> wrote in message news:11******** *************@g 14g2000cwa.goog legroups.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?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 than a series of
fields each is a yes/no for a given offered class. On the form you
just check the class or classes they are enrolled in. My wife wants to
be able to generate a list of students (non-active) who do not have
any of the classes...
|
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 anyone know how to write code which makes a checkbox
property true whenever a selected field in a database
select statement =1. I am running reports which are
populating textboxes from the result of a complex select
statement. My problem is...
|
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 time
that a change is made (this is not ideal for my situation).
What I need is something that references the access reports (the data
itself is in MS SQL Server) and will display them.
Some of the solutions to this I have come across are...
|
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 VS.NET doesnt work properly.
Rgs,
|
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 anything. I still had
to set the printer and tray with the dialog box. Does any one know
anything about this? thanks.
| |
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 designer. I can send parameters while
i am attaching a reader to the report. But What if a client wnats to design
a report on End-User designer. How will i send parameter to it?
|
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)" and from the
list of OLE DB Providers I select "OLE DB Provider for Microsoft Directory
Services". On the next screen where I put in my data source I try something
like: LDAP://OU=<ou>,DC=<dc1>,DC=<dc2> OR...
|
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 from sql server) and I was wondering whish of these is the better tool
.. We're still not sure if they'll be loaded from an existing VB6 application
or if I'll have to make a separate module for them (in .Net).
In general, which is the better tool?...
|
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 is of three pages then page footer of
first two pages should be generated without any data(outline should be there)
and the last page pagefooter should have the data(company norms and rules)
in it.
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |