Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal Reports - CRViewer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00629749
Message ID:
00630139
Vues:
37
>>>It's SO annoying, because this code definitely worked in the CR preview window before, and works OK if I manually step through the code in the debugger. I just upgraded to 8.5 today and I really had hoped the problem would "magically" go away. No such luck...
>>

I finally got this working. When I created a new preview form (that didn't get subclassed from one of the standard framework forms) I noticed that the preview form would just flash for a second. The form was modeless (just like the framework version). In my code I was doing this:
     with loPreview
            * Set-up the req. object references
            .oCRApp = This.oCR
            .oCRReport = loReport
            
            dimension loPreview.aTempFiles[alen(This.aRptCursors, 1), 2]
            acopy(This.aRptCursors, loPreview.aTempFiles)
            
            .Left = 0
            .Top = 0
            .Height = _screen.Height 
            .Width = _screen.Width
            .Name = 'oPreviewForm'
            .Caption = This.cFriendlyName 
            
            This.SetPreviewWindow(loPreview)            

            .Show()             
            
            .PreviewReport()        
           
        endwith
Notice the .Show() of the form is happening before I call my PreviewReport() method (which adds the CRViewer control to the form). To fix the flashing problem I changed the form to modal and changed the code order above to PreviewReport(), then Show(). Wohoo! This worked. Then I switched my original framework-based form to modal and pointed my code back to the this form. It also worked! I'm not sure why it doesn't work the other way - I would have assumed that if it wasn't going to work in that order, it wouldn't work at all. I definitely didn't expect it to work 95% but be missing my parameters.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform