Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Viewer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
Viewer
Divers
Thread ID:
00783830
Message ID:
00783830
Vues:
39
Hello All!!
Ok Here's the deal.
I have this form that I have made a crystal viewer. It is a class all by it self
I pass it the Name and parameter string (if there are any) and here is what happens:

When I run it at the command line, Everything is fine ie.
mystring = 'previous=15459.60;Company=61;Crop Year=2002;Commodity=ROUGHRICE;Class=LONG;asofdate=04/07/2003;Pool=AR;Uom=CWT;'
myReport = 'C:\riceland2k3\viewstockrecorderp\output\stkRec001b.rpt'
oPreview = Createobject('CRYSTALPREVIEW',myReport,MyString)
This peace of code runs the form and it is previewed fine in the screen,
however, When I call this class from a button on a form, It just flashes and goes away.
&&Here is the code That makes the string, and calls the class
mystring = [previous=]+myprevious+[;]
mystring = mystring + [Company=]+ALLTRIM(thisform.txtcompany.Value)+[;]
myString = mystring + [Crop Year=]+ALLTRIM(thisform.txtcropYear.Value) + [;]
myString = mystring + [Commodity=]+ALLTRIM(thisform.cbocommodity.value) + [;]
myString = mystring + [Class=]+ALLTRIM(thisform.cboclass.value) + [;]
myString = mystring + [asofdate=]+ALLTRIM(DTOC(thisform.txtasofdate.value)) + [;]
myString = mystring + [Pool=]+ALLTRIM(thisform.cboPool.value) + [;]
myString = mystring + [Uom=]+ALLTRIM(thisform.cboUom.value) + [;]

&& Keep in mind that myString Is the Exact same thing as the mystring above

MyReport = 'C:\riceland2k3\ViewStockrecordERP\OUTPUT\stkrec001b.rpt'
MyPreview = CREATEOBJECT("CRYSTALPREVIEW",myReport,MyString)
When that code runs, it just flash and leaves.
What could I be doing wrong?
If you need the code in my Preview form I can post it as well

Thanks in advance
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide

LeRoy Jackson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform