Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suggestion for Getting Data in Sub-Report 1

Status
Not open for further replies.

smilbert

IS-IT--Management
Aug 28, 2006
36
US
I'm using CRXI and MS SQL 2000

I've got a main report that contains ApptTime (DateTime).
I've got another table that lists schedule blocks, and they are defined by a FromTime, ToTime, FromDate and ToDate

I'd like to have my subreport return informtaion for any schedule blocks active at the time of the ApptTime.

I can't LINK the sub-report using the value as they are not the same type (DateTime versus start/end time and date).

I tried passing the ApptTime value to the Sub, but I can't use it as a parameter.

Any suggestions?
 
You can link them. In the subreport, create a formula like this:

//{@startdt}:
datetime({table.fromdate},{table.fromtime})

//{@enddt}:
datetime({table.todate},{table.totime})

Link {table.appttime} to one of these in edit->subreport links. Then go into the subreport->report->selection formula and adjust the formula to read:

{@startdt} <= {?pm-table.appttime} and
{@enddt} >= {?pm-table.appttime}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top