crystal report in a range of time

how can i display information in a crystal report from a range of time chosen by the user by DTpickers using VB .NET??
Who is Participating?
ast2550Connect With a Mentor Commented:
Depending on version,
View | Field Explorer
Right click on Parameter Fields
Select New
Name = StartTime
Type = Time

Name = EndTime
Type = Time (hh:mm:ss)


Then restrict report as per your parameter fields:
Report | Select Expert
{Table.Field} in {@StartDate} to {@EndDate}
Pass the date/time into crystal using a parameter
memozebaduaAuthor Commented:
can u be a little more specific? i'm a newbie...

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Create a parameter field in your report and use it in the Select Expert.  When you refresh your report, it will require the parameter.

Pass the parameter using VB.  I'll be happy to look up a good parameter tutorial when you get your report working.
memozebaduaAuthor Commented:
how do i create the parameter field??

sorry! i do not know much... i already have my reports running, the only thing i'm missing is that the dat displayed is from the range picked in the dtp
mlmccConnect With a Mentor Commented:
Parameters are named with a ?  @ is for formulas.

{Table.Field} in {?StartDate} to {?EndDate}

Also if your date field is really a date time field you may have to enter the above in the formula editor mode rather than in the report expert.

oops.  thanks.

Now, that I look it over.  I suggested that you use a Time parameter and then had you call it StartDate (sloppy).  We should probably clarify this.  Is it a date/time or just a time field as stated in your initial question?
memozebaduaAuthor Commented:

I have

- a form with a button (which shows the form with the crystal report viewer) and two date pickers to select the range of dates fr the report

And a form with a report viewer only...

i understood the part where i have to add the parameters to the selection But i don't know how to get the data from the dtp into those parameters and if i'm supposed to do it in the initial or the report form

in answer to your question... i'm only interested in the date
Glad i could help

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.