Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Report and Visual FoxPro 5
Message
From
09/02/2002 17:15:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
08/02/2002 16:30:34
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00617712
Message ID:
00617916
Views:
17
>Hi,
>I have a simple Visual FoxPro 5 app.
>Also, I have a simple Crystal Report written in CR 7.
>How can I previewing that report in Visual FoxPro?
>When I try to insert Ole Container control on my form, I get these 2 Crystal related controls:
>* Crystal Report Control
>* Crystal Report Smart Viewer 7
>I did try to use both of them.
>I get an error "The instruction at 0x031af880 referenced memory at 0x000003c. The memory could not be read" every time.
>My code:
>
>Form On Load method:
>SYS(2333, 1)
>
>Run Button On Click:
>public CRApplication
>public CRReport
>CRApplication = createobject("CrystalRuntime.Application")
>CRReport = createobject("CrystalRuntime.Report")
>CRReport = CRApplication.OpenReport("e:\smartStaff\crystalFoxPro\testRpt.rpt")
>ThisForm.Olecontrol1.reportsource = CRReport
>ThisForm.Olecontrol1.viewreport
>
>What am I doing wrong?

On my previous job we were using CR 6 with VFP5, and the trick was in the property of the olecontrol, don't remember the name of the property, but it had a value of 0 - screen or 1 - printer (or vice versa), so we actually set it to screen, and then just called .print method, and it came up with a preview.

The purpose of standalone viewers is to serve the users who only need the reporting, and don't actually have to run your app.

(inaèe, imenjaèe, mo¾emo i da krenemo u detalje, al' bih onda morao da kopam po cedeovima, klasa u kojoj se ovo dogaða mi odavno nije na disku)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform