• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

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??
0
memozebadua
Asked:
memozebadua
  • 5
  • 3
  • 2
2 Solutions
 
ast2550Commented:
Pass the date/time into crystal using a parameter
0
 
memozebaduaAuthor Commented:
can u be a little more specific? i'm a newbie...

thanks!
0
 
ast2550Commented:
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.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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
0
 
ast2550Commented:
Depending on version,
View | Field Explorer
Right click on Parameter Fields
Select New
Name = StartTime
Type = Time

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

***************************************

Then restrict report as per your parameter fields:
Report | Select Expert
{Table.Field} in {@StartDate} to {@EndDate}
0
 
mlmccCommented:
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.

mlmcc
0
 
ast2550Commented:
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?
0
 
memozebaduaAuthor Commented:
OK,

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
0
 
mlmccCommented:
Glad i could help

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now