-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printernames longer than 32 Chars are exported wrong #313
Comments
Thanks for reporting this! I did some testing with a very long printer name, and I think I found the problem. The great news is that it looks like it is very easy to resolve. 😄 For some reason I was truncating the device name in the This should not be needed because we are not dealing with a 32 character fixed length field like we have on the This should support any reasonable sized printer name well beyond the 32 character DevMode limit. After removing the truncation, I was able to successfully build my test database with no errors. After building, the report is using the long printer name specified in the source file. I will make this change shortly on the |
Just to clarify this a little further, we are dealing with two different WinAPI structures in The reason we were seeing a problem on build is that I was (inadvertently) truncating the printer name when loading it back into the |
The printer name was unnecessarily truncated to 32 characters when loading to the DevNames structure. This was causing problems when building from source when a specified printer name was longer than 32 characters in length. Fixes #313
@Tanarri - You can either hot-fix your version, or build the |
@joyfullservice |
Hi,
in my System I have installed a printer, which is shared from a windowsserver 2016. The printername in my windows 10 is "Godex_VersandB_gross" on "W2K16SERVER"
On exporting a report of my access 2013 project the printername exported as "\\W2K16SERVER\Godex_VersandB_gro192.168.0.236" in the .json
Full JSON
The Printername is truncated after 32 Bytes because the structure "clsDevMode,tDevMode" has only place for 32 Bytes.
The limit of 31 Characters (plus terminating NULL) is a problem accoring to:
https://forum.powerbasic.com/forum/user-to-user-discussions/powerbasic-for-windows/14703-printer-names-longer-than-31-characters
To get a list with the complete printernames here is a example:
https://forum.powerbasic.com/forum/user-to-user-discussions/source-code/25008-demo-initialize-printdlg-for-named-printer?t=24359
But: How to do the match beetween the trucated printername and the complete printername?
Any suggestions?
PS: The "Build from source" of the project with the truncated incorrect printername could not be done without user interaction. Access is asking for the correct printer, because "\\W2K16SERVER\Godex_VersandB_gro192.168.0.236" isn't found on my system.
Greetings
Tanarri
The text was updated successfully, but these errors were encountered: