borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Memo field in crystal report)Next Topic (Crystal report, and data source) New Topic New Poll Post Reply
AndreaVB Forum : Reporting tools : Date as header in Crystal Report
Poster Message
yasir_arafat24
Level: Protégé

Registered: 06-01-2005
Posts: 6

icon Date as header in Crystal Report

I am using crystal 8.5 with vb 6.0 i need date that is selection crateria for report it should be appear on crystal report.Like

this is Like vb form:

select Date   : 12/12/2004


Crystal report

This is report for Date (12/12/2004)

I am passing date through vb but same date should appear on crystal reoprt header.

Please help me.It very urgent


27-01-2005 at 04:51 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
yasir_arafat24
Level: Protégé

Registered: 06-01-2005
Posts: 6
icon Re: Date as header in Crystal Report

Thanks for mail

It is not working and date is not i am taking from data base it is comming from date pickerthat is visual basic form.

Please help me.

yasir

29-01-2005 at 11:08 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
yasir_arafat24
Level: Protégé

Registered: 06-01-2005
Posts: 6
icon Re: Date as header in Crystal Report

Thanks I am sending one file please cheke and solve the problem.It is very urgent Please help me

____________________________
Attached:
CrystalProblem.zip 4 KB (Downloads: 10)

30-01-2005 at 04:58 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Reporting tools : Date as header in Crystal Report
Previous Topic (Memo field in crystal report)Next Topic (Crystal report, and data source) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder