Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to set the PaperSize property of the PageSetup class
hi
Im getting an error message. i.e. "Unable to set the PaperSize property of the PageSetup class" when I try to set the paper size through code using VB.Net 2003 and MS Excel 2003. The code runs in a server side component on an application server and creates an MS Excel report. The line at which it fails is as below oWorksheet.PageSetup.PaperSize = CType(Microsoft.Office.Interop.Excel.XlPaperSize.x lPaperLetter, Microsoft.Office.Interop.Excel.XlPaperSize) The Error and stack trace are as below Source Exception: Microsoft Office Excel - ForwardCallToInvokeMember Message: Unable to set the PaperSize property of the PageSetup class Trace: at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at Microsoft.Office.Interop.Excel.PageSetup.set_Paper Size(XlPaperSize ) at ReportServer.cReportServer.ATBSummaryReport(Int32 pATBID, Int16 pRevision, Int32 pAgencyID, Int16 pCompareToRevision) in C:\reportserver The printer is a network printer and the drivers are installed on a network print server which is a seperate machine. everything works well when the component is configured to run under the network administrator's login credentials but fails and gives me the error above when I use an application user's credentials. I have tried setting the default printer to another printer to rule out a problem with the printer driver and still get this error. What should i look for in order to correct this problem? Thanks for your help in advance. Vikram. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to set the PaperSize property of the PageSetup class
It sounds like the User ID you are using doesn't have a printer assigned.
-- Regards, Tom Ogilvy wrote in message ups.com... hi Im getting an error message. i.e. "Unable to set the PaperSize property of the PageSetup class" when I try to set the paper size through code using VB.Net 2003 and MS Excel 2003. The code runs in a server side component on an application server and creates an MS Excel report. The line at which it fails is as below oWorksheet.PageSetup.PaperSize = CType(Microsoft.Office.Interop.Excel.XlPaperSize.x lPaperLetter, Microsoft.Office.Interop.Excel.XlPaperSize) The Error and stack trace are as below Source Exception: Microsoft Office Excel - ForwardCallToInvokeMember Message: Unable to set the PaperSize property of the PageSetup class Trace: at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at Microsoft.Office.Interop.Excel.PageSetup.set_Paper Size(XlPaperSize ) at ReportServer.cReportServer.ATBSummaryReport(Int32 pATBID, Int16 pRevision, Int32 pAgencyID, Int16 pCompareToRevision) in C:\reportserver The printer is a network printer and the drivers are installed on a network print server which is a seperate machine. everything works well when the component is configured to run under the network administrator's login credentials but fails and gives me the error above when I use an application user's credentials. I have tried setting the default printer to another printer to rule out a problem with the printer driver and still get this error. What should i look for in order to correct this problem? Thanks for your help in advance. Vikram. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to set the PaperSize property of the PageSetup class
Tom
this may be a silly question but, how can I assign a printer to a User ? thnaks Vikram "Tom Ogilvy" wrote: It sounds like the User ID you are using doesn't have a printer assigned. -- Regards, Tom Ogilvy wrote in message ups.com... hi Im getting an error message. i.e. "Unable to set the PaperSize property of the PageSetup class" when I try to set the paper size through code using VB.Net 2003 and MS Excel 2003. The code runs in a server side component on an application server and creates an MS Excel report. The line at which it fails is as below oWorksheet.PageSetup.PaperSize = CType(Microsoft.Office.Interop.Excel.XlPaperSize.x lPaperLetter, Microsoft.Office.Interop.Excel.XlPaperSize) The Error and stack trace are as below Source Exception: Microsoft Office Excel - ForwardCallToInvokeMember Message: Unable to set the PaperSize property of the PageSetup class Trace: at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at Microsoft.Office.Interop.Excel.PageSetup.set_Paper Size(XlPaperSize ) at ReportServer.cReportServer.ATBSummaryReport(Int32 pATBID, Int16 pRevision, Int32 pAgencyID, Int16 pCompareToRevision) in C:\reportserver The printer is a network printer and the drivers are installed on a network print server which is a seperate machine. everything works well when the component is configured to run under the network administrator's login credentials but fails and gives me the error above when I use an application user's credentials. I have tried setting the default printer to another printer to rule out a problem with the printer driver and still get this error. What should i look for in order to correct this problem? Thanks for your help in advance. Vikram. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
unable to get the pivotfields property of the pivottable class | Excel Discussion (Misc queries) | |||
Unable to set the formula property of the series class | Charts and Charting in Excel | |||
Unable to Set LeftFooter Property Class PageSetup (ASP) | Excel Programming | |||
Unable to set the PrintQuality property of the PageSetup class. | Excel Programming | |||
unable to set the colorindex property of the font class | Excel Programming |