 |
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Date as header in Crystal Report
If you cant get it from the database for some reason, then you can put a text objext on the heather (lets say txtDate), on change it through code
rpt.sections(1).reportobjects("txtDate").settext "12/12/2004"
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
27-01-2005 at 11:54 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Date as header in Crystal Report
Well, you nned to give more info. You say it doesnt work, but dont say why. What error does it raise? I have used this many times with CR8 and above versions, and had no trouble with it
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
29-01-2005 at 01:32 PM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Date as header in Crystal Report
Add Crystal Report Viewer control to your form, set reference to Crystal reports 8 Design time (and tuntime) libraries, and then use this code
Dim CRXApp As New Craxdrt.Application
Dim rpt As Craxdrt.Report
On Error GoTo Greska
Screen.MousePointer = vbHourglass
Set rpt = CRXApp.OpenReport(App.Path & "\report1.rpt", 1)
rpt.Sections(1).ReportObjects("Text1").SetText Text1.Text
rpt.Sections(1).ReportObjects("Text2").SetText Text2.Text
CR.ReportSource = rpt
CR.ViewReport
Do While CR.IsBusy
DoEvents
Loop
CR.Zoom 100
Screen.MousePointer = vbDefault |
Read Crystal Report & VB topic to learn basic stuff about how to use CR in VB.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
30-01-2005 at 07:49 PM |
|
|
|
|
 |
 |