"Darren Gulliver" <darren.gulliver@thomson.com>'s wild
thoughts were released on Wed, 4 Apr 2007 12:30:43 +0100
bearing the following fruit:
>Hi,
>
[quoted text clipped - 15 lines]
>
>Anyone come accross this using this Grid?
Are you certain that the problem is the Grid? What line does
the error occur on?
J
Darren Gulliver - 04 Apr 2007 14:44 GMT
Hi Jan,
I only have one line and it's:
grdStockBalReconciliation.PrintPreview True
This should then bring up a print preview window.
What I should of mentioned also is this grid uses this dll IGPrint.dll,
again this was provided by Infragistics and in their help files this dll
must be installed for printing support.
Thanks
Darren
> "Darren Gulliver" <darren.gulliver@thomson.com>'s wild
> thoughts were released on Wed, 4 Apr 2007 12:30:43 +0100
[quoted text clipped - 25 lines]
>
> J
Jan Hyde (VB MVP) - 05 Apr 2007 08:54 GMT
"Darren Gulliver" <darren.gulliver@thomson.com>'s wild
thoughts were released on Wed, 4 Apr 2007 14:44:22 +0100
bearing the following fruit:
>Hi Jan,
>
[quoted text clipped - 5 lines]
>again this was provided by Infragistics and in their help files this dll
>must be installed for printing support.
I wonder if the Igragostics stuff works properly under
Citrix - is it possible other users' actions are intefering
with each other.
J
>Thanks
>Darren
[quoted text clipped - 28 lines]
>>
>> J
> Hi,
>
[quoted text clipped - 18 lines]
> Thanks in advance
> Darren
[Warning. Unsatisfactory Gooby-Goop follows ...]
This COM error RPC_E_DISCONNECTED is generated deep within the bowels of
OLE. It is usually associated with some thread essentially getting out of
synch with another thread. Some object along the way has either called
coDisconnect before it was expected, made some blocking call, returned some
incoherent reply, or whatever - "I'm OK but my playmate seems to have
disappeared so I just going to go home now." <g>
The difficulty in ferreting out such errors is because it isn't UltraGrid2
that is likely causing the problem per se. It is something within the
particular combination of COM/OLE services you are doing at the moment. It
may not even be your application. (COM shares OLE services).
The usual 'fix' is to just jiggle the threading model or somehow shuffle the
scenario (add a delay, move components into MTS, change the order of
invocations, close connections, etc.) After this the problem often seems to
go away - but it is as much blind luck as anything. <g>
Using WinDbg you can probably track down the exact point of failure which
will give you better information on what to chew on, assuming the error is
frequent enough. But considering your environment this isn't going to be
easy. Adding a remote server and citrix to the mix means you will likely
have to trace down through 12 to 20+ layers of indirection. Sounds like fun.
Personally I would try jiggling with .Print. Can you move when and where you
call it?
-ralph
Darren Gulliver - 05 Apr 2007 11:51 GMT
Thanks for your feedback Jan/Ralph,
Further ivestigations show we have the same problems running outside of
Citrix. So it appears to be some conflict with Windows 2003 and
UltraGrid/IGPrint
>> Hi,
>>
[quoted text clipped - 54 lines]
>
> -ralph
Ralph - 05 Apr 2007 13:16 GMT
> Thanks for your feedback Jan/Ralph,
>
> Further ivestigations show we have the same problems running outside of
> Citrix. So it appears to be some conflict with Windows 2003 and
> UltraGrid/IGPrint
Well that takes you farther down the road.
Just some suggestions (probably everything you have already tried).
Can you create a dummy test - just a grid and print - and run it through the
paces? If that works then you may only need to move the grid.print out of
its current context. Are you calling it from a routine that is also
launching COM services? Try running it separately. ie, something goofy like
moving it to a timer after invoking DoEvents().
If the above test doesn't work either, then you almost certainly screwed.
<g>
If you can isolate the specific playmate you might possiblily play with
redirection and skip the component installed on 2003
http://msdn2.microsoft.com/en-us/library/aa375142.aspx
With the usual warning, such setups for a complex app are often quite
fragile and difficult to configure and install.
-ralph
Darren Gulliver - 05 Apr 2007 14:52 GMT
Hi again,
Basically I have this in a click event of a Microsoft Command Button
grdStockBalReconciliation.PrintPreview True
I had code in the grids _InitializePrintPreview event
Private Sub grdResults_InitializePrintPreview(ByVal PreviewInfo As
UltraGrid.SSPreviewInfo)
With PreviewInfo.PrintInfo
.PageHeader = App.Title
.Orientation = ssOrientationLandscape
.MarginBottom = 5
.MarginLeft = 5
.MarginRight = 5
.MarginTop = 5
End With
End Sub
I then removed this code and the Print preview works, however It seems it
does not like using Printers that are set up as a Terminal Service. We added
a physical printer and when using this printer it worked. Using a Terminal
Services printer the crash happens.
So we are a little closer
>> Thanks for your feedback Jan/Ralph,
>>
[quoted text clipped - 23 lines]
>
> -ralph
Ralph - 05 Apr 2007 15:40 GMT
> Hi again,
>
[quoted text clipped - 23 lines]
>
> So we are a little closer
That is good news. I was really afraid it would turn out to be a shared OLE
system component. You can go to Citrix now that you have something you can
definitely point to. The new Citrix is so expanded and there are so many
levels of indirection it is impossible for someone to 'remotely' guess at a
solution for your problem domain. (Pun intended. <g>)
As I noted before "threads" are always at the root cause for these errors.
That's why jiggling code around often fixes (or introduces them). Perhaps
there is a way to provide a separate printer instance for this particular
app?
-ralph