all groups > sql server reporting services > september 2005 >
You're in the sql server reporting services group:
newbie RSClientPrint
sql server reporting services:
We have a .NET web app that, at the click of a button, is supposed to print a handful of reports for a manager, directly to his/her default printer. It looks like we can do this with RSClientPrint, but I'm not super technical, and we're having problems. I'm getting an instance of object not found when I try RSClientPrint from the server side, after instantiating it. When I try scripting the same kind of thing on the page, RSClientPrint is not found. Previously, I had copied the cab file to the app directory and specified that directory in the codebase= attribute of the page object. Then I tried specifying the cab file in the report server tree. I extracted a copy of the dll and added a reference to the project (c#). I have not trouble building the solution. My object code is... <OBJECT ID="RSClientPrint" VIEWASTEXT> <CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3" <CODEBASE="http://myserver/mydir/rsclientFolder/?rs:Command=Get&rc:GetImage=8.00.1038.00rsclientprint.cab#Version=2000,080,1038,000"></OBJECT> Scripting, I tried... <script> function Print() { RSClientPrint.MarginLeft = .5 * 25.4; RSClientPrint.MarginTop = .5 * 25.4; RSClientPrint.MarginRight = .5 * 25.4; RSClientPrint.MarginBottom = .5 * 25.4; RSClientPrint.Culture = 1033; RSClientPrint.UICulture = 1033; RSClientPrint.PageWidth = 11 * 25.4; RSClientPrint.PageHeight = 8.5 * 25.4; RSClientPrint.Authenticate = false; RSClientPrint.Print('<A class=WNAnc href="http://MyServer/reportserver" target=winout>http://Myserver/reportserver</A>', '/DailyReports/Myreportt&AccountManagerID=203', 'MyReport'); } </script> and I get that rsClientPrint is undefined. In the code behind, I tried... using RSClientPrintLib; protected RSClientPrint rp; private void printReports() { rp.Print("http://MyServer/reportserver", "/reportfolderpath/myreport", "myreport"); } and I get an object reference not set to an instance of an object error pointing to the line with the rp.Print. I'm probably missing something obvious, and I should say that I'm much more familiar with vb than c# but have no option. Any help would be GREATLY appreciated. -- Thanks,
Your javascript code looks correct, but I don't think you registered the ..dll. As for adding the code to the server, this is not supported. The control will only work in IE, it has code which attempts to find the IE window and will fail if it is not hosted in IE. -- -Daniel This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "CGW" <CGW@discussions.microsoft.com> wrote in message news:9EFD9E18-DBCA-4D6D-8EA3-B8B675258313@microsoft.com... > We have a .NET web app that, at the click of a button, is supposed to > print a > handful of reports for a manager, directly to his/her default printer. > > It looks like we can do this with RSClientPrint, but I'm not super > technical, and we're having problems. I'm getting an instance of object > not > found when I try RSClientPrint from the server side, after instantiating > it. > When I try scripting the same kind of thing on the page, RSClientPrint is > not > found. > > Previously, I had copied the cab file to the app directory and specified > that directory in the codebase= attribute of the page object. Then I tried > specifying the cab file in the report server tree. I extracted a copy of > the > dll and added a reference to the project (c#). I have not trouble building > the solution. > > My object code is... > > <OBJECT ID="RSClientPrint" VIEWASTEXT> > <CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3"> > <CODEBASE="http://myserver/mydir/rsclientFolder/?rs:Command=Get&rc:GetImage=8.00.1038.00rsclientprint.cab#Version=2000,080,1038,000"></OBJECT> > > Scripting, I tried... > > <script> > function Print() > { > RSClientPrint.MarginLeft = .5 * 25.4; > RSClientPrint.MarginTop = .5 * 25.4; > RSClientPrint.MarginRight = .5 * 25.4; > RSClientPrint.MarginBottom = .5 * 25.4; > RSClientPrint.Culture = 1033; > RSClientPrint.UICulture = 1033; > RSClientPrint.PageWidth = 11 * 25.4; > RSClientPrint.PageHeight = 8.5 * 25.4; > > RSClientPrint.Authenticate = false; > > RSClientPrint.Print('<A class=WNAnc href="http://MyServer/reportserver" > target=winout>http://Myserver/reportserver</A>', > '/DailyReports/Myreportt&AccountManagerID=203', > 'MyReport'); > } > </script> > > and I get that rsClientPrint is undefined. > > In the code behind, I tried... > > using RSClientPrintLib; > > protected RSClientPrint rp; > > private void printReports() > { > rp.Print("http://MyServer/reportserver", > "/reportfolderpath/myreport", > "myreport"); > } > > and I get an object reference not set to an instance of an object error > pointing to the line with the rp.Print. > > I'm probably missing something obvious, and I should say that I'm much > more > familiar with vb than c# but have no option. > > Any help would be GREATLY appreciated. > > > -- > Thanks, > > CGW
The dll is registered. I made sure. I've tried a couple of different reports, but the behavior is still the same. RSClientPrint is undefined. Is there something else you can think of that I should try? -- Thanks, CGW [quoted text, click to view] "Daniel Reib [MSFT]" wrote: > Your javascript code looks correct, but I don't think you registered the > ..dll. > > As for adding the code to the server, this is not supported. The control > will only work in IE, it has code which attempts to find the IE window and > will fail if it is not hosted in IE. > > -- > -Daniel > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "CGW" <CGW@discussions.microsoft.com> wrote in message > news:9EFD9E18-DBCA-4D6D-8EA3-B8B675258313@microsoft.com... > > We have a .NET web app that, at the click of a button, is supposed to > > print a > > handful of reports for a manager, directly to his/her default printer. > > > > It looks like we can do this with RSClientPrint, but I'm not super > > technical, and we're having problems. I'm getting an instance of object > > not > > found when I try RSClientPrint from the server side, after instantiating > > it. > > When I try scripting the same kind of thing on the page, RSClientPrint is > > not > > found. > > > > Previously, I had copied the cab file to the app directory and specified > > that directory in the codebase= attribute of the page object. Then I tried > > specifying the cab file in the report server tree. I extracted a copy of > > the > > dll and added a reference to the project (c#). I have not trouble building > > the solution. > > > > My object code is... > > > > <OBJECT ID="RSClientPrint" VIEWASTEXT> > > <CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3"> > > <CODEBASE="http://myserver/mydir/rsclientFolder/?rs:Command=Get&rc:GetImage=8.00.1038.00rsclientprint.cab#Version=2000,080,1038,000"></OBJECT> > > > > Scripting, I tried... > > > > <script> > > function Print() > > { > > RSClientPrint.MarginLeft = .5 * 25.4; > > RSClientPrint.MarginTop = .5 * 25.4; > > RSClientPrint.MarginRight = .5 * 25.4; > > RSClientPrint.MarginBottom = .5 * 25.4; > > RSClientPrint.Culture = 1033; > > RSClientPrint.UICulture = 1033; > > RSClientPrint.PageWidth = 11 * 25.4; > > RSClientPrint.PageHeight = 8.5 * 25.4; > > > > RSClientPrint.Authenticate = false; > > > > RSClientPrint.Print('<A class=WNAnc href="http://MyServer/reportserver" > > target=winout>http://Myserver/reportserver</A>', > > '/DailyReports/Myreportt&AccountManagerID=203', > > 'MyReport'); > > } > > </script> > > > > and I get that rsClientPrint is undefined. > > > > In the code behind, I tried... > > > > using RSClientPrintLib; > > > > protected RSClientPrint rp; > > > > private void printReports() > > { > > rp.Print("http://MyServer/reportserver", > > "/reportfolderpath/myreport", > > "myreport"); > > } > > > > and I get an object reference not set to an instance of an object error > > pointing to the line with the rp.Print. > > > > I'm probably missing something obvious, and I should say that I'm much > > more > > familiar with vb than c# but have no option. > > > > Any help would be GREATLY appreciated. > > > > > > -- > > Thanks, > > > > CGW > >
It looks like your object tag is wrong. It should be: <OBJECT ID="RSClientPrint" CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3" CODEBASE="<cab load location>" VIEWASTEXT></OBJECT> I don't believe you can break them into seperate elements. -- -Daniel This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "CGW" <CGW@discussions.microsoft.com> wrote in message news:A28465CC-D54C-4B82-837A-558260341058@microsoft.com... > The dll is registered. I made sure. I've tried a couple of different > reports, > but the behavior is still the same. RSClientPrint is undefined. > > Is there something else you can think of that I should try? > -- > Thanks, > > CGW > > > "Daniel Reib [MSFT]" wrote: > >> Your javascript code looks correct, but I don't think you registered the >> ..dll. >> >> As for adding the code to the server, this is not supported. The control >> will only work in IE, it has code which attempts to find the IE window >> and >> will fail if it is not hosted in IE. >> >> -- >> -Daniel >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> >> "CGW" <CGW@discussions.microsoft.com> wrote in message >> news:9EFD9E18-DBCA-4D6D-8EA3-B8B675258313@microsoft.com... >> > We have a .NET web app that, at the click of a button, is supposed to >> > print a >> > handful of reports for a manager, directly to his/her default printer. >> > >> > It looks like we can do this with RSClientPrint, but I'm not super >> > technical, and we're having problems. I'm getting an instance of object >> > not >> > found when I try RSClientPrint from the server side, after >> > instantiating >> > it. >> > When I try scripting the same kind of thing on the page, RSClientPrint >> > is >> > not >> > found. >> > >> > Previously, I had copied the cab file to the app directory and >> > specified >> > that directory in the codebase= attribute of the page object. Then I >> > tried >> > specifying the cab file in the report server tree. I extracted a copy >> > of >> > the >> > dll and added a reference to the project (c#). I have not trouble >> > building >> > the solution. >> > >> > My object code is... >> > >> > <OBJECT ID="RSClientPrint" VIEWASTEXT> >> > <CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3"> >> > <CODEBASE="http://myserver/mydir/rsclientFolder/?rs:Command=Get&rc:GetImage=8.00.1038.00rsclientprint.cab#Version=2000,080,1038,000"></OBJECT> >> > >> > Scripting, I tried... >> > >> > <script> >> > function Print() >> > { >> > RSClientPrint.MarginLeft = .5 * 25.4; >> > RSClientPrint.MarginTop = .5 * 25.4; >> > RSClientPrint.MarginRight = .5 * 25.4; >> > RSClientPrint.MarginBottom = .5 * 25.4; >> > RSClientPrint.Culture = 1033; >> > RSClientPrint.UICulture = 1033; >> > RSClientPrint.PageWidth = 11 * 25.4; >> > RSClientPrint.PageHeight = 8.5 * 25.4; >> > >> > RSClientPrint.Authenticate = false; >> > >> > RSClientPrint.Print('<A class=WNAnc href="http://MyServer/reportserver" >> > target=winout>http://Myserver/reportserver</A>', >> > '/DailyReports/Myreportt&AccountManagerID=203', >> > 'MyReport'); >> > } >> > </script> >> > >> > and I get that rsClientPrint is undefined. >> > >> > In the code behind, I tried... >> > >> > using RSClientPrintLib; >> > >> > protected RSClientPrint rp; >> > >> > private void printReports() >> > { >> > rp.Print("http://MyServer/reportserver", >> > "/reportfolderpath/myreport", >> > "myreport"); >> > } >> > >> > and I get an object reference not set to an instance of an object error >> > pointing to the line with the rp.Print. >> > >> > I'm probably missing something obvious, and I should say that I'm much >> > more >> > familiar with vb than c# but have no option. >> > >> > Any help would be GREATLY appreciated. >> > >> > >> > -- >> > Thanks, >> > >> > CGW >> >> >>
Oh wow! Great! It worked... well at least I got a whole new error message... a PRINTER error message. Thanks!!!! CGW [quoted text, click to view] "Daniel Reib [MSFT]" wrote: > It looks like your object tag is wrong. It should be: > > <OBJECT ID="RSClientPrint" > CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3" CODEBASE="<cab load > location>" VIEWASTEXT></OBJECT> > > I don't believe you can break them into seperate elements. > -- > -Daniel > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "CGW" <CGW@discussions.microsoft.com> wrote in message > news:A28465CC-D54C-4B82-837A-558260341058@microsoft.com... > > The dll is registered. I made sure. I've tried a couple of different > > reports, > > but the behavior is still the same. RSClientPrint is undefined. > > > > Is there something else you can think of that I should try? > > -- > > Thanks, > > > > CGW > > > > > > "Daniel Reib [MSFT]" wrote: > > > >> Your javascript code looks correct, but I don't think you registered the > >> ..dll. > >> > >> As for adding the code to the server, this is not supported. The control > >> will only work in IE, it has code which attempts to find the IE window > >> and > >> will fail if it is not hosted in IE. > >> > >> -- > >> -Daniel > >> This posting is provided "AS IS" with no warranties, and confers no > >> rights. > >> > >> > >> "CGW" <CGW@discussions.microsoft.com> wrote in message > >> news:9EFD9E18-DBCA-4D6D-8EA3-B8B675258313@microsoft.com... > >> > We have a .NET web app that, at the click of a button, is supposed to > >> > print a > >> > handful of reports for a manager, directly to his/her default printer. > >> > > >> > It looks like we can do this with RSClientPrint, but I'm not super > >> > technical, and we're having problems. I'm getting an instance of object > >> > not > >> > found when I try RSClientPrint from the server side, after > >> > instantiating > >> > it. > >> > When I try scripting the same kind of thing on the page, RSClientPrint > >> > is > >> > not > >> > found. > >> > > >> > Previously, I had copied the cab file to the app directory and > >> > specified > >> > that directory in the codebase= attribute of the page object. Then I > >> > tried > >> > specifying the cab file in the report server tree. I extracted a copy > >> > of > >> > the > >> > dll and added a reference to the project (c#). I have not trouble > >> > building > >> > the solution. > >> > > >> > My object code is... > >> > > >> > <OBJECT ID="RSClientPrint" VIEWASTEXT> > >> > <CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3"> > >> > <CODEBASE="http://myserver/mydir/rsclientFolder/?rs:Command=Get&rc:GetImage=8.00.1038.00rsclientprint.cab#Version=2000,080,1038,000"></OBJECT> > >> > > >> > Scripting, I tried... > >> > > >> > <script> > >> > function Print() > >> > { > >> > RSClientPrint.MarginLeft = .5 * 25.4; > >> > RSClientPrint.MarginTop = .5 * 25.4; > >> > RSClientPrint.MarginRight = .5 * 25.4; > >> > RSClientPrint.MarginBottom = .5 * 25.4; > >> > RSClientPrint.Culture = 1033; > >> > RSClientPrint.UICulture = 1033; > >> > RSClientPrint.PageWidth = 11 * 25.4; > >> > RSClientPrint.PageHeight = 8.5 * 25.4; > >> > > >> > RSClientPrint.Authenticate = false; > >> > > >> > RSClientPrint.Print('<A class=WNAnc href="http://MyServer/reportserver" > >> > target=winout>http://Myserver/reportserver</A>', > >> > '/DailyReports/Myreportt&AccountManagerID=203', > >> > 'MyReport'); > >> > } > >> > </script> > >> > > >> > and I get that rsClientPrint is undefined. > >> > > >> > In the code behind, I tried... > >> > > >> > using RSClientPrintLib; > >> > > >> > protected RSClientPrint rp; > >> > > >> > private void printReports() > >> > { > >> > rp.Print("http://MyServer/reportserver", > >> > "/reportfolderpath/myreport", > >> > "myreport"); > >> > } > >> > > >> > and I get an object reference not set to an instance of an object error > >> > pointing to the line with the rp.Print. > >> > > >> > I'm probably missing something obvious, and I should say that I'm much > >> > more > >> > familiar with vb than c# but have no option. > >> > > >> > Any help would be GREATLY appreciated. > >> > > >> > > >> > -- > >> > Thanks, > >> > > >> > CGW > >> > >> > >> > >
Daniel, You seem to be the pro on this, as I look through messages on the site, and I really appreciate that you took time to answer my question. That's why I hate to ask another, but, now when I try to open the page from a client side browser, I get the message that windows has blocked the software because it is from an unknown publisher. What would my next step be? -- Thanks, CGW [quoted text, click to view] "Daniel Reib [MSFT]" wrote: > It looks like your object tag is wrong. It should be: > > <OBJECT ID="RSClientPrint" > CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3" CODEBASE="<cab load > location>" VIEWASTEXT></OBJECT> > > I don't believe you can break them into seperate elements. > -- > -Daniel > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "CGW" <CGW@discussions.microsoft.com> wrote in message > news:A28465CC-D54C-4B82-837A-558260341058@microsoft.com... > > The dll is registered. I made sure. I've tried a couple of different > > reports, > > but the behavior is still the same. RSClientPrint is undefined. > > > > Is there something else you can think of that I should try? > > -- > > Thanks, > > > > CGW > > > > > > "Daniel Reib [MSFT]" wrote: > > > >> Your javascript code looks correct, but I don't think you registered the > >> ..dll. > >> > >> As for adding the code to the server, this is not supported. The control > >> will only work in IE, it has code which attempts to find the IE window > >> and > >> will fail if it is not hosted in IE. > >> > >> -- > >> -Daniel > >> This posting is provided "AS IS" with no warranties, and confers no > >> rights. > >> > >> > >> "CGW" <CGW@discussions.microsoft.com> wrote in message > >> news:9EFD9E18-DBCA-4D6D-8EA3-B8B675258313@microsoft.com... > >> > We have a .NET web app that, at the click of a button, is supposed to > >> > print a > >> > handful of reports for a manager, directly to his/her default printer. > >> > > >> > It looks like we can do this with RSClientPrint, but I'm not super > >> > technical, and we're having problems. I'm getting an instance of object > >> > not > >> > found when I try RSClientPrint from the server side, after > >> > instantiating > >> > it. > >> > When I try scripting the same kind of thing on the page, RSClientPrint > >> > is > >> > not > >> > found. > >> > > >> > Previously, I had copied the cab file to the app directory and > >> > specified > >> > that directory in the codebase= attribute of the page object. Then I > >> > tried > >> > specifying the cab file in the report server tree. I extracted a copy > >> > of > >> > the > >> > dll and added a reference to the project (c#). I have not trouble > >> > building > >> > the solution. > >> > > >> > My object code is... > >> > > >> > <OBJECT ID="RSClientPrint" VIEWASTEXT> > >> > <CLASSID="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3"> > >> > <CODEBASE="http://myserver/mydir/rsclientFolder/?rs:Command=Get&rc:GetImage=8.00.1038.00rsclientprint.cab#Version=2000,080,1038,000"></OBJECT> > >> > > >> > Scripting, I tried... > >> > > >> > <script> > >> > function Print() > >> > { > >> > RSClientPrint.MarginLeft = .5 * 25.4; > >> > RSClientPrint.MarginTop = .5 * 25.4; > >> > RSClientPrint.MarginRight = .5 * 25.4; > >> > RSClientPrint.MarginBottom = .5 * 25.4; > >> > RSClientPrint.Culture = 1033; > >> > RSClientPrint.UICulture = 1033; > >> > RSClientPrint.PageWidth = 11 * 25.4; > >> > RSClientPrint.PageHeight = 8.5 * 25.4; > >> > > >> > RSClientPrint.Authenticate = false; > >> > > >> > RSClientPrint.Print('<A class=WNAnc href="http://MyServer/reportserver" > >> > target=winout>http://Myserver/reportserver</A>', > >> > '/DailyReports/Myreportt&AccountManagerID=203', > >> > 'MyReport'); > >> > } > >> > </script> > >> > > >> > and I get that rsClientPrint is undefined. > >> > > >> > In the code behind, I tried... > >> > > >> > using RSClientPrintLib; > >> > > >> > protected RSClientPrint rp; > >> > > >> > private void printReports() > >> > { > >> > rp.Print("http://MyServer/reportserver", > >> > "/reportfolderpath/myreport", > >> > "myreport"); > >> > } > >> > > >> > and I get an object reference not set to an instance of an object error > >> > pointing to the line with the rp.Print. > >> > > >> > I'm probably missing something obvious, and I should say that I'm much > >> > more > >> > familiar with vb than c# but have no option. > >> > > >> > Any help would be GREATLY appreciated. > >> > > >> > > >> > -- > >> > Thanks, > >> > > >> > CGW > >> > >> > >> > >
Don't see what you're looking for? Try a search.
|
|
|