ThisForm.oPreview = Createobject('CRYSTALPREVIEW',myReport,MyString)>Hello All!!
>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) >>
>&&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) >>