M
Melody
Hello, I am having a problem with a report and subreport. The main report is
a stored procedure and there are 3 parameters (@EndDate datetime,@ChartID
int,@GroupID int). I provide the values in the "Input Parameter" of the Main
report. For the Sub Report, I have the same three parameters and I place the
values also in the "Input Parameter" of the sub report. The field that I
link the sub report to the main report on is "AcctLogID". The problem is
this link. If I change the control source of the sub report to just a
regular query, the report runs fine but the sub report includes all records
regardless of date. If I try to set the record source (Select ....where
EndDate=" & "'" form_frmCAcctRept.txtEndDate.value & "'") of the sub report,
when the sub report opens for the first time it is fine but then I get a
popup telling me that I can't set the recordsource once the report has
printed. I guess my question is, how can you use stored procedures in the
main report and sub report but keep the proper link? For example, instead of
getting
AcctLogID 3
Detail Records (for AcctLogID 3)
AcctLogID 4
Detail Records (for AcctLogID 4)
I am getting
AcctLogID 3
Detail Records (for AcctLogID 3)
Detail Records (for AcctLogID 4)
AcctLogID 4
Detail Records (for AcctLogID 3)
Detail Records (for AcctLogID 4)
Any help would be VERY appreciated!! I am pretty much at my wit's end!
TGIF
a stored procedure and there are 3 parameters (@EndDate datetime,@ChartID
int,@GroupID int). I provide the values in the "Input Parameter" of the Main
report. For the Sub Report, I have the same three parameters and I place the
values also in the "Input Parameter" of the sub report. The field that I
link the sub report to the main report on is "AcctLogID". The problem is
this link. If I change the control source of the sub report to just a
regular query, the report runs fine but the sub report includes all records
regardless of date. If I try to set the record source (Select ....where
EndDate=" & "'" form_frmCAcctRept.txtEndDate.value & "'") of the sub report,
when the sub report opens for the first time it is fine but then I get a
popup telling me that I can't set the recordsource once the report has
printed. I guess my question is, how can you use stored procedures in the
main report and sub report but keep the proper link? For example, instead of
getting
AcctLogID 3
Detail Records (for AcctLogID 3)
AcctLogID 4
Detail Records (for AcctLogID 4)
I am getting
AcctLogID 3
Detail Records (for AcctLogID 3)
Detail Records (for AcctLogID 4)
AcctLogID 4
Detail Records (for AcctLogID 3)
Detail Records (for AcctLogID 4)
Any help would be VERY appreciated!! I am pretty much at my wit's end!
TGIF