General information
Category:
Reports & Report designer
>>Hi all
>>I try to control mi report this way
>>
>>locr = CREATEOBJECT("CrystalRuntime.Application")
>>lrap = locr.OpenReport('c:\report4.rpt')
>>ldatabase = lRap.Database
>>ltable = lDatabase.Tables
>>lTable.Item(1).Location="C:\zx0ysx58.dbf"
>>ltable.Item(1).Name = "Propo"
>>lRap.PrintOut()
>>
>>
>>How can i preview mi report ??
>>
>>
>>Ben..
>
>To preview your report, you use the CRViewer object like in the following example:
>
>THIS.oCrystalReports = CREATEOBJECT('CrystalRuntime.Application')
>THIS.oReport = CREATEOBJECT('CrystalRuntime.Report')
>THIS.oReport = THIS.oCrystalReports.OpenReport(myreport.rpt')
>THIS.addObject('oleCRViewer','oleControl','crViewer.crViewer')
>THIS.oleCRViewer.Top = 1
>THIS.oleCRViewer.Left = 1
>THIS.oleCRViewer.Height = THISFORM.Height - 2
>THIS.oleCRViewer.Width = THISFORM.Width - 2
>THIS.oleCRViewer.ReportSource = THISFORM.oReport
>THIS.oleCRViewer.ViewReport()
Thank's Cathi
it help me
I have a new question I try to put a command button over the oleCrviewer but the oleCrviewer always on top. The zorder of the oleCrviewer = 1 the button Zorder = 0
any tips
Thank's again
Ben
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only