One of our users started to have printing issue after the computer upgrade (we have changed all the computers). When he clicks on the Print button on the top left of the crystal report via BI Launchpad, it showed up error message below. If the user clicks Retry, similar error message popped up with the same wording except replacing 'LCIDTable.xml' with things like 'us10_1_422.dll.', 'csprintdlg.dll', 'PrintControl.dll', '10_1_422.dll', 'xerces-c_2_7.dll', 'pvlocale-1-0.dll'.
Thanks for your time in advance.
Looking at the error messages that you reported, it seems that the ActiveX Print Control isn't installed (properly). If an installation was attempted, it most likely failed due to the user not having sufficient rights on the OS (i.e. administrative rights).
Have a look at these SAP KB articles for more info (requires an S-ID from SAP Support):
1874481 - What is the minimum required set of files to be copied on client machines which will allow users to print a report?
1720909 - How to install Crystal Reports ActiveX controls (Viewing and Printing) on a end-user PC for Business Intelligence 4.0 SP2 installations
1641815 - How to create Activexviewer.exe and install manually or by SMS tool in SAP BOE XI 4.0 for Windows Server
Remark: some notes seem to link to SAP KB 1641815. However, as you appear to be running BI4, these instructions no longer apply.
Related
I previously had many C++ .exe programs (developed with C++ Builder XE7) running as scheduled tasks in a Windows 2008 R2 Datacenter server. These tasks were being run by the SYSTEM account and I never had any issues with them before.
I recently imported these tasks to a new Windows 2019 Datacenter server and set these tasks up in the Task Scheduler. The same SYSTEM account is being used to run the tasks, but with the updated Windows Server, these tasks now give me a run result of 0xC0000142.
Most of the resources I found online say to increase the desktop heap size in the registry editor - I have done this multiple times and restarted the server after each increase, but I was still getting the same results with this method so I reset the desktop heap size back to the original value.
I also thought it had to do with missing C++ redistributables - the new server only had redistributables from 2015-2019, while the 2008 R2 server had these along with redistributables from 2013 and 2008. So I installed these extra redistributables but I still got the same result.
I have tried manually recreating the tasks, I tried running the tasks with different domain admin accounts, also played around with the "run only when user is logged in/run whether user is logged in or not" setting. All of these led to the same 0xC0000142 error.
Also, there were no errors being shown in Windows Task Scheduler history or in the Event Viewer.
Any extra tips/guidance would be much appreciated!
EDIT:
Here is a snippet of the filtered Process Monitor logs leading up to the exit code and task failure.
EDIT 2: It's been over a month now and still running into these problems. I have upgraded C++ Builder to 10.4, moved my old code to the new IDE, and re-linked all the packages/include paths/library paths. I also took my original .exe I was working with and split it up into multiple tasks with multiple .exe files - now most of these split tasks are running, but some still give the 0xC0000142 code. I also tried to use this tool from GitHub - Dependencies App - to attempt to find out what exact DLL is failing, but it just points me to some core Windows system DLLs (api-ms-win-....dll, ext-ms-win-....dll). I feel this output is misleading, does anyone know of any better tools to determine missing DLLs?
I figured out the issue to my problem. In my case, the program with the 0xC0000142 error was using WININET. Near the top of my cpp file, I had #pragma link "WININET.LIB". The WININET library is not supported in Windows Server 2019, so attempting to use it results in failed initialization of some system DLLs. By removing the #pragma link statement and replacing/removing unnecessary WININET functions in my code, it allowed my program to run on Windows Server 2019.
The diagnostic tools in Visual Studio 2019 Community have stopped working. It shows it's recording the CPU profile but whenever I pause the program to see the results, the tools say "There is no data in the current set of filters."
It was working at one point, and as far as I'm aware, I didn't change anything. And if I go into the Filter drop down menu it shows everything except "Hide native code" is selected.
How can I fix this?
A recent Windows update has apparently added a second problem to the original NVIDIA Display adapter issue.
See this ticket in Microsoft Developer Community: No Data in CPU Usage Tool, Windows Update related
Recently a Windows Update broke the CPU Usage tool in Visual Studio
where no data is collected. After analyzing the tool will report,
“There is no data in the current set of filters”. This is due to a bug
in the Windows ETW subsystem such that profiling events are not
emitted, we are working with the Windows ETW team to root cause the
issue and create a fix. As this affects ETW, the underlying system
which creates the profiling data, this will affect any ETW profiler:
Visual Studio, PerfView, WPA, XPerf, etc.
This is also discussed in the Microsoft Developer Community link in Andrey's answer, profiling CPU still states no user code was running. Scroll down to Mar 17, 2021.
It seems that there is now another underlying root cause besides the
original NVIDIA one which is breaking ETW profiling system wide. This
means any ETW profiler (Visual Studio, WPA, PerfView, etc) will be
affected since all of them rely on the same ETW system. Unfortunately
the EnableTraceEx2 system call returns success and we end up with no
profiling data in the resulting trace which is making debugging
difficult. I’m engaging with the Windows team that owns the ETW
subsystem and will most likely need additional diagnostics once we
figure out what our next steps are. In the meantime if anyone has paid
product support licenses feel free to engage with that as well,
hopefully working together we can uncover the root cause. Once I get
more information from the ETW team I’ll report back, until then stay
tuned.
Hi folks, just wanted to let everyone know that we have engaged with
the Windows ETW team on this and they are investigating. It seems like
a recent Windows Update may have caused this issue and they are
working with an internal customer in Xbox who has a repro. When I have
more info on the cause, workaround, and fix I will let everyone know.
In the mean time stay tuned.
I've found an answer here. For now, the only solution seems to be disabling NVIDIA Display Adapter in Device Manager and reboot.
In my case the other sampling profilers, e.g. AMD μProf didn't work well either with that driver.
I have been having this issue for months and no fixes have worked but using the Visual Studio Installer I ran repair on the IDE and now profiling works properly.
Edit: This didn't permanently fix the issue. But going to "Virus and threat-detection settings" and disabling "Real-time detection" allows it to collect data now too.
Edit2: My first appears to be the root cause for this and there is a MSFT solution here
My company owns several business licenses for Xamarin.Android, and we'd like to use this on our CI server. However, it seems that I'd need to install the full Xamarin suite on my CI server including Visual Studio Pro to make this work. My question is, using the vanilla Xamarin.Android package, how can I activate it?
It seems that installing this on its own adds the Xamarin.Android tools and libraries to build with but there is no way to activate it that I can find, so when I attempt to build using MSBuild, the build fails with this error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(299,2): error XA9008: Building from the command-line requires aÿBusinessÿLicense.
Now, after some googling, I have found that the activation tool is called "mandroid.exe", which can be found in C:\Program Files (x86)\MSBuild\Xamarin\Android - although I have found references to this being in the 64-bit program files too.
Unfortunately, I can't find any suitable documentation on this tool. Every time I find a thread where someone discusses this, someone from Xamarin jumps in and says "contact support#xamarin.com". After a while I did that but two business days later there still is no response and I've got deadlines to meet so I thought it might be helpful for everyone involved for us to publicly document this process.
The best thing I've found comes from a thread on the Xamarin mailing list which references this invocation:
mandroid.exe --activate --name "NAME" --company "COMPANY" --email "EMAIL" --phone "PHONE" --code "ACTIVATION CODE"
I have also discovered another variant of this invocation that looks like this:
.\mandroid.exe –activate –activation-name="NAME" –activation-phone="PHONE" –activation-company="COMPANY" –activation-code="CODE" –activation-email="EMAIL"
I've tried many permutations of my account data here using both invocations - using the activation code from the products page on the Xamarin store. No matter what though, this error occurs:
\mandroid.exe : monodroid: error XA9997: Incomplete data provided to complete activation
In the "problems activating?" section of the products page, it says this:
In Mono for Android 1.0.21316 and later, if activation within Visual Studio fails then a MfaActivation.dat file will be created within the Documents folder. Select this file below.
Perhaps there's some way to force this file to be created by mandroid.exe? That would be very helpful. While I imagine that offline activation is the only way to make this work, I would accept any answer that involves uploading MfaActivation.dat or otherwise invoking the online activation machinery as well.
Update - I'm afraid that the below steps no longer work. Xamarin has updated their activation system to activate by a different method for newer versions.
In the end I had to install Xamarin Studio as part of the Chef configuration and just instruct administrators to manually activate the software as part of creating a new build node. I had no luck trying to reverse engineer a fix, and if I did, it would probably just break again.
It turns out that I almost had it correct. The second invocation I specified is actually the correct way to call this command but the -- part was apparently converted to a – token by some blog software somehow.
The --activate verb will perform an online activation with Xamarin's servers, so I'm still not sure how you'd do it without an internet connection.
For reference, here is how I did it:
mandroid.exe -v --activate --activation-name "(NAME)" --activation-phone "(PHONE_" --activation-email "(EMAIL)" --activation-company "(COMPANY)" --activation-code "(CODE)"
I'm not sure about the significance of the -v switch, but perhaps that would make it output debugging info if there was a problem.
You must enter all the information exactly as specified on your products page - select one of your licenses and select "problems activating?". However, you will need to enter the licensee name - i.e. the user who owns the license in the --activation-name parameter which must correspond to the --activation-code parameter.
After doing this you can call mandroid with the --activated switch which returns an exit code:
PS> & .\mandroid.exe --activated
PS> $LastExitCode
0
You will also be able to reload the products page and you should see that your license for the chosen user has a new computer registered to it.
This does use up another activation but if you e-mail the support team you can sign the build server agreement and then I assume they can set you up with additional activations for your build nodes.
It's a shame that this wasn't documented better because this has wasted my time for several days. Hopefully this will be helpful to someone else with the same situation.
From Xamarin documentation, we can see
http://docs.xamarin.com/guides/cross-platform/ci/configuring_tfs/
"Visual Studio Professional (or greater) must be installed on the Team
Foundation Server along with licensed copies of Xamarin.Android and
Xamarin.iOS to support development of Android and iOS mobile
applications via the Team Foundation Server."
So I assume that in all cases you need to have VS + Xamarin products installed and activated.
I might be wrong, so the best way is to contact Xamarin support, http://xamarin.com/support
I have and application that is running as a windows service on Server 2008. When I run it as an application and send a print job, the print job gets processed sucessfully. However, if I send the print job to the windows service instead, it throws "The Handle is invalid" exception.
Here is the error:
Printing Thread error: The handle is invalid. StackTrace: at System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument document, PrintEventArgs e) at System.Drawing.Printing.PrintController.Print(PrintDocument document) at System.Drawing.Printing.PrintDocument.Print() at GrapeCity.ActiveReports.Viewer.Win.Printing.PrintImpl.DocumentPrinter.<Print>b__1e()
The service is running under an administrator account which has admin permissions.
Any help would be appreciated!
A coule things to check:
Make sure that the user account that the service is running under has the proper printer installed under his account and that it is set as the default printer.
Make sure you're using the Print method in ActiveReports that explicitly does not show any UI.
Try checking the "Allow service to interact with desktop" checkbox on the service's property page from the Services control panel applet. Although you may not be showing any UI, the printer driver may need that capability.
Finally, just keep in mind that in general printing from a Windows Service is kind of flaky. Even Microsoft's documentation for System.Drawing.Printing has the following disclaimer:
Classes within the System.Drawing.Printing namespace are not supported for use within a Windows service or ASP.NET application or service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.
That doesn't mean it won't work, but that it is error-prone enough that Microsoft doesn't want to help us printing in this case. I suspect this is because the printer drivers from the manufacturers are not necessarily designed for printing from non-UI processes like windows services.
Roussul
It could be a permission or printer access problem. To check whether it is related to ActiveReports or not, can you create a separate app, implement system.printing.drawing and run it as a service, just as you have it with ActiveReports and let us know.
I had this issue in a ASP.NET application. The root cause was that "Enable 32-bit applications" had been set in the IIS application pool that the website was running in.
It appears the print function tried to connect to a 32 bit driver rather than the 64 bit drivers that were installed.
Maybe in a .NET Windows app the "Target CPU" setting could also cause a similar issue? ie if you target x86 and try and run your app on x64 it will only connect to 32bit printer drivers?
In my school days, i developed a hotel management system in legacy programming language foxpro 2.6. Few months ago, i revived the application and its running pretty well on windows xp. But, i am stuck at printing. Right now i am printing the page to a text file. Afterward i manually open the file and call the print function on that.
I googled and found no effective tutorial or link or anything as to how can i get to print directly from foxpro 2.6. The printer is USB supported and i have tried the trick of adding another printer for virtual port LPT1 and then spooling. Nothing worked.
Later i downloaded an application which acts as a spooler and sends any file that is added to the specified directory to Printer. Still, no success.
Can anyone help me with a short example, a link or a tutorial which guides me to the printing settings in foxpro 2.6
Thanks !!
Install the printer and share it. You may need to set permissions to allow Authenticated Users to use the printer.
Add NET USE LPT1: \CRAIG\USBPRINTER to the logon script for the user's profile.
For help on logon scripts, look up "To assign a logon script to a profile" in XP Help.
Not true - it works perfectly well in Vista and Windows 7, as long as they are the 32-bit versions of those operating systems.
You might find the following useful. Disclaimer: I wrote it a long time ago.
Painless Legacy FoxPro Applications On Modern Networks