Hi,
Why don't you create 2 parameters in crystal report as FromDate & Todate.
you cna pass the values from VB to crystal report these parameters.
ex:
'Global Variable Crystal Report Application
Public CRApp As CRAXDRT.Application
Set CRApp = New CRAXDRT.Application
CRApp.LogOnServer "P2SODBC.DLL", "Servername", "DBname", LoginName, Password
Dim Rpt As CRAXDRT.Report
Dim m_Rptname as string
m_rptname = "C:\test1.rpt"
Screen.MousePointer = vbHourglass
Set Rpt = CRApp.OpenReport(m_RptName, CRNOTEXCLUSIVE)
If Rpt.HasSavedData Then Rpt.DiscardSavedData
If Rpt.ParameterFields(1).IsCurrentValueSet Then Rpt.ParameterFields(1).ClearCurrentValueAndRange
Rpt.ParameterFields(1).AddCurrentValue DateFrom
If Rpt.ParameterFields(2).IsCurrentValueSet Then Rpt.ParameterFields(2).ClearCurrentValueAndRange
Rpt.ParameterFields(2).AddCurrentValue DateTo
...... in crystal report create a header in Page header section using of this parameters from the report.
... Please try this and let me know if any issue is there.
All the best.
i am using vb6 and crystal report 10
i want to ask solution of one proble which i am facing in making report.
first , in my programe i ask the user to give paramerter (range) of the data
(dates for e-g 01-apr-2008 to 03-apr-2008) for which i uses a form.
now when user gives paramerter it show the result . the result are perfect
the only thing i nedd is to display the parameter (dates for e-g 01-apr-2008 to 03-apr-2008) at the page header of the each page of report.
now , how can i get data (dates ) from the form and put it on crystal report page header section
as bytes does not support much pictures to explian our question clearly
i had also make a post on
http://www.dreamincode.net/forums/in...howtopic=50853
see this where i uploaded pictues to expliain my question more clearly.
can any body help me to solve this/