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

One subreport of 3 Not working

Status
Not open for further replies.

ThinWhiteDude

Technical User
Sep 21, 2004
97
US
Though I’ve searched the archives and read several threads on problems like this, I still can’t find a solution to mine, so I will try to explain as lucidly as possible what’s going on:

I have a daily report that is run from an unbound form that has buttons on it for several departments. The department is captured at the Click event of it’s button, and stored in a public variable, then used in the criteria for the query the report is based on. The report then shows activity in that department for the last 24 hours. All of this is working well.

There are several sub-reports in the report footer. Two of these show Month To Date and Year To Date Activity in the form of a crosstab, are also set up to use the variable captured from the form, and thus show only the appropriate Dept’s activity for that time span. Neither of these is bound to the Main report as I need them to display, even if there was no activity in that department in the last 24 hours (thus producing an empty detail section for the Main report with these subreports in the footer). These are also working well.

Now, I have an additional subreport in the Main Report footer that is also unbound, but uses the variable. This is not a crosstab, but a grouped report that needs to display, even if there are no detail records in the Main report. This is not working well. When I click the button for a department, I get the other subreports, even if there’s nothing in the detail section of the Main, but this last subreport either doesn’t show up at all, or displays the wrong number of records. I’ve run the subreport alone, while the form was up and the public variable still available, and it produces the correct number of records. I’ve run the query independently too, and it produces the correct data.

But the subreport, when run with the Main report, doesn’t display the correct data.

I am stumped. I realize subreports can’t always be controlled because of what’s going on in the detail section of Main, but all my other subreports are doing fine.

Any help you can give me will, as always, be greatly appreciated.

TWD
 
I apologize to all for taking up forum time, but I found that my problem was that I have two public variables I am using for these subreports, and I had neglected to empty one properly, thus my skewed data was being skewed by me.

Thanks to anybody who read this and tried to come up with something.

TWD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top