Printing from a vb.net program using activereports stops working
and sorry for not exactly a programming question, but if anyone can help i thought this is the place after googling around and finding nothing.
I have to cope with a crappy (presumably vb6) .net application for printing all sorts of reports. After installing it prints Ok, but if i print using another program, this one stops printing (halts on a modal blocks telling me it is 'forming a report').
From what i gathered with exploring the .exe and the hopeless support (apparently no-one el开发者_开发知识库se has this problem, they cannot understand what's wrong), it uses actrpt2.dll which seems to something called ActiveReports2. If i register this dll with regsvr32 the program WILL print, and after printing from any other program i need to register the dll again before printing works on this one.
So i made a quick .bat hack for it.. But the programmer in me cannot understand why this stuff with the dll keeps happening (well ok, it's windows...) - if anyone knows what is happening, and how could it be fixed, please tell me, i would appreciate it :)
Probably your "another program" is overwriting actrpt2.dll registration, for instance by registering an older version of ActiveReports which it stores next to its exe file.
Easiest "fix" would be to run both apps (or just "another program") with non-admin rights so that it can not register (or corrupt) COM components at all.
精彩评论