Re: Stored procedure with in a Sub Report



Probably because ADP is trying to put a server filter on an EXEC statement
when the subreport is used as a subreport; not as a main report (as it is
when you try it independantly).

Remove the EXEC word and the paramaters that follow, set the RecordSource to
the name of the stored procedure, the Record Source Qualifier to dbo and use
only parameters for the SP of the subreport that are either present as
fields on the RecordSource or as bound controls (name) of the main report
(names and fields without the @ of the parameter(s)).

If I remember correctly, the Link Child and Master Fields are useless when a
stored procedure is used as the record source of a subreport (they are only
good when using a table or a view).

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"ToniS" <ToniS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F6A44966-839A-4EEB-9A1B-50F5B216FEF8@xxxxxxxxxxxxxxxx
I tested the sub report with the Stored procedure and it works. As soon as
I
run the main report I get the following error: "Incorrect Syntax near the
keyword 'Exec' With in the subreport Recordsource I have the following
text
exec [GetRepGroups]. Any ideas on what I need to do?


Thanks
ToniS





.



Relevant Pages

  • Re: DIFFICULT Query!
    ... one uses your quarter query for the recordsource and the third one uses your ... subreports in this unbound report. ... subreport, quarter data in the second subreport and year data in the ...
    (microsoft.public.access.gettingstarted)
  • Re: setting report field equal to form field?
    ... i figured it out...i need to set the recordsource in the On Open event ... procedure of the subreport not the parent report ... > also how can i set the recordsource of a subreport thru VB? ...
    (microsoft.public.access.reports)
  • A97 Problem: Aliased fields not available in Detail.Format event
    ... I ran into a weird problem with a subreport with an OnFormat event ... when the report runs, ... I've decompiled, I've compacted, I've recreated the recordsource. ... one or more of the source queries is not the same as in the ...
    (comp.databases.ms-access)
  • Re: How to Programmatically Setting the Data Source of a Sub-Report
    ... You can assign the RecordSource of a report in its Open event. ... subreport repeatedly for the different spots on the report where the ...
    (microsoft.public.access.reports)
  • Re: How to Programmatically Setting the Data Source of a Sub-Report
    ... You can assign the RecordSource of a report in its Open event. ... subreport repeatedly for the different spots on the report where the ...
    (microsoft.public.access.queries)

Loading