What are you going to do with the value? You could send it as a parameter- or are you going to set some property of the report?
I wont be here a lot longer so here is how to do it with a parameter.
You go in the report- create a parameter- set up the data type, name, etc.
Then in your code before you call up the report- you set the parameter value. It looks like this:
Code:
Dim Report As New crsOT
Report.ParameterFields(1).AddCurrentValue frmMain.dtStart.Value
crvRpt.ReportSource = Report
crvRpt.ViewReport
That is straight from a project of mine using CR 8.5. frmmain.dtstart.value is a date picker on a form- you can substitute your variable, text box, or whatever holds the value you want to send over.
If you are going to put that parameter into the title or something though- it easier just to manipulate that in the code rather than go the round about route.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.