Printers not showing in Print Dialog.
I am having a problem with Terminal Services (Remote Desktop) and RB 7.06.
When the end user previews any report several of the installed printers are
not showing up in the printer dialog.
The application experiencing this problem is a DLL created with Delphi 6.
the host Exe also uses report builder 7.06 and when the end user tries to
print a report from the exe all the printers are showing up.
I've checked the code for the exe and dll and can't find any differences in
the way that report builder is being implimented.
Any ideas that you may have will be greatly appreciated.
When the end user previews any report several of the installed printers are
not showing up in the printer dialog.
The application experiencing this problem is a DLL created with Delphi 6.
the host Exe also uses report builder 7.06 and when the end user tries to
print a report from the exe all the printers are showing up.
I've checked the code for the exe and dll and can't find any differences in
the way that report builder is being implimented.
Any ideas that you may have will be greatly appreciated.
This discussion has been closed.
Comments
In the past, some of our customers have had problems accessing printers from
a remote desktop due to the security access rights given to the user.
ReportBuilder simply asks Windows for a list of installed printer drivers.
If these drivers are not available to the current user, they will not be
shown in the print dialog.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I thought about that and I've checked the access rights for the user. This
doesn't seem to be the issue.
Originally the user was getting an Access Violation whenever they tried to
print from the preview window. We discovered that remote desktop adds a
long string of information to the printer name when it is accessed from a
remote computer (Computer name, Session ID, username, etc...) this was
putting the printer name over 80 characters. I shortened the users printer
name to less than 80 characters and the AV went away. but the printers are
still not showing up.
As I said before, the same user is able to see all the printers if he prints
from the host application. i've looked at the code for the host app and
have discovered only one small difference. please let me know if this could
be the problem.
When printing the report from the host app the code is as follows:
If ParamsResult = mrOk then ppLoanReport.Devicetype :='Printer';
//printer
If ParamsResult = mrAll then ppLoanReport.DeviceType := 'Screen';
//preview
when printing from the dll the code is as follows:
If ParamsResult = mrOk then ppPawnIncomeReport.Device := dvPrinter;
//printer
If ParamsResult = mrAll then ppPawnIncomeReport.Device := dvScreen;
//preview
is there any way the device / devicetype difference could cause printers to
dissapear from the list?
Thank you for your suggestions.
Michael
When running from a .dll, you will have the same access rights as the
application that is calling and using that .dll. Be sure that the original
application is being run from a user account that has full access to all the
printers you would like to use.
The code below should not have any effect on the printers available, (both
will accomplish the same thing). The list of printers is retrieved by the
Windows API so the printers displayed are the printers Windows believes it
has access to.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I've checked the access rights of the user in question and he is an
administrator on the machine with full rights to all printers. Do you have
any other suggestions about what could cause this error. I'm going to try
to set up a testing scenario to see if the problem can be duplicated. I
would really appreciate any input you can give.
Thanks,
Michael.
I've discovered a 'cure' for the problem, but i'm still confused about the
cause.
The Shell for the user had been set to our application. So when the user
logged into terminal services only our application was loaded. When I
removed this setting and had the default shell the error messages went away
and all the printers showed up in the print dialog box ; however, this
server is shared with multiple customers, so we need to limit the access for
the users. Can you shed any light on why changing the Shell would cause
Access violations and missing printers in the print dialog?
I appreciate you help with this issue,
Michael
The AV caused by a printer name greater than 80 characters long has been
fixed for a later release of ReportBuilder (including the current release
10.06). I hate to keep pressing the issue however the only reason (we know
of) you would not be seeing all available printers is that they are not
installed for that specific user or they cannot be accessed due to
restrictions.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I appreciate your help with this issue.
We were finally able to resolve the issue by writing a batch file that
executed on login.
If anyone else has this problem with Terminal Services, here is the
workaround we found.
The batch file read as follows:
@echo off
start explorer
logoff
exit
This allowed us to keep the user from being able to access the OS but since
we started explorer before our application the printers showed up correctly.
Once again, I really appreciate your help with this issue, I love your
product!..
Have a great day,
Michael