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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing selections to a sub report 1

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I apologize if this is not the correct forum for this question.

I have a report with a simple subreport, i am trying to have the date value passed to the sub report so that a user only has to enter the date range on the main report.

Both reports have a field called "Day" which holds the date and time of a record. I have tried linking with the "Day" field and when i run the report my sub report is blank.

I don't know where to start here, any suggestions are welcome.

Thanks in advance.

Paul
 
Link the subreport using date parameters. Instead of using a date range parameter, use a start and end date parameter that you create in both main and subreports and which you use in the selection formula in the subreport as well as in the main report. Then link the parameters to each other, using the dropdown in the lower left corner of the linking screen, e.g., to select {?start} instead of the default {?pm-?start}.

-LB
 
lbass, again thank you for the help. I have created parameters and tried using them, however they don't seem to have any affect on the report. I'm sure I am doing something wrong, i guess i just don't know what to do with the procedure once its created. I have placed them on the report and i get the pop up to enter whatever parameter i wish but no matter what i choose the data never changes.

Sorry for what im sure is a very novice question but i have been trying for hours to get it to work to no avail. Any tips you can give me?

Thanks again for your patience.

Paul
 
Please post the selection formulas for the main report and the subreport by going to report->selection formula->record and copying what you see there in each case.

-LB
 
I took a step back and ditched the subreport for now to try and get the parameters working, which i did successfully, finally. Thanks again, I'm sure ill be back.

 
I am back to the original problem, I have the parameters working on the main report but when I add the subreport and link "Split_name" and the "Day" field i get a blank subreport.

Please let me know if there is anything you need me to elaborate on to help with this.

Paul
 
No, please reread my earlier posts. You should be linking the date parameters to each other, not the date field. And I have no idea what "split_name" refers to.

-LB
 
Got it! Sorry, I should have paid more attention to your posts. Just going a little crazy after hours of staring at this. thanks for all of your help lbass!!

Paul
 
Now that I have this working i have one more question. How would i go about always excluding the the time 11:59:58PM from the query? The database sums and entire days worth of data at that time and doubles my numbers so i just need that exact time period excluded from the results.

Thanks

Paul
 
Add a line to your selection formulas:

and
time({table.datetime}) <> time(23,59,58)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top