Recursive report?

M

m stroup

I am trying to create a report for prerequisites.
Math400
(PreReq) Math302
(PreReq) Math301
etc.

I have tblCourse with descriptions
I have tblPreq with fields
[PrereqNum](Auto, PK)
[Course](fk from tblCourse)
[PreReq](fk from tblCourse)
I have a report with [Course] in the group header
and PreReq in the detail
I also have a subreport in the detail linking the PreReq to the Course in the
detail (which is Prereq etc.)

Is there a better way to do this. As it stands I would have to put the
subreport in the subreport, having no way of knowing how many to do.

If I am way off the mark and there is a better way to do this, please point
me the way.
 
M

Mark A. Sam

I'm not sure what you are describing, but will suggest how it should be.

The main report should have the tblCourse table as it Recordsource. Place
its fields in the Report or Page headers and footer depending onyour needs.
Create another report using tblPreq as its recordsource.

You will need a unique field in tblCourse such as an Autonumber field,
Primary Key, maybe courseID. This is the LinkMasterField Place a similar
field in tblPreq, but make that a long integer if courseID is an autonumber.
This is the LinkChildField. It looks like you used the field Course, but
I'm not sure.

Drag the subreport onto the main report detail section and set the
LinkMasterFields and LinkChildFields properties as courseID (or Course if
that is the linking field you are using).

God Bless,

Mark A. Sam
 
M

m stroup

Thanks for your quick response, Sam. I have set that up and it is working,
but I really want to see a "chain" of prerequisites if you will in one spot
Math101 - > Math201 - > Math252
to indicate a sequence. (though i now have it set up as Math252 < - Math201
<- etc.)

I can do this if I have subreports in subreports, etc. but I am thinking
there might be a more eloquent way?
--
Teach me to fish! Thanks for the help.
Pax, M


Mark A. Sam said:
I'm not sure what you are describing, but will suggest how it should be.

The main report should have the tblCourse table as it Recordsource. Place
its fields in the Report or Page headers and footer depending onyour needs.
Create another report using tblPreq as its recordsource.

You will need a unique field in tblCourse such as an Autonumber field,
Primary Key, maybe courseID. This is the LinkMasterField Place a similar
field in tblPreq, but make that a long integer if courseID is an autonumber.
This is the LinkChildField. It looks like you used the field Course, but
I'm not sure.

Drag the subreport onto the main report detail section and set the
LinkMasterFields and LinkChildFields properties as courseID (or Course if
that is the linking field you are using).

God Bless,

Mark A. Sam


m stroup said:
I am trying to create a report for prerequisites.
Math400
(PreReq) Math302
(PreReq) Math301
etc.

I have tblCourse with descriptions
I have tblPreq with fields
[PrereqNum](Auto, PK)
[Course](fk from tblCourse)
[PreReq](fk from tblCourse)
I have a report with [Course] in the group header
and PreReq in the detail
I also have a subreport in the detail linking the PreReq to the Course in
the
detail (which is Prereq etc.)

Is there a better way to do this. As it stands I would have to put the
subreport in the subreport, having no way of knowing how many to do.

If I am way off the mark and there is a better way to do this, please
point
me the way.
 
M

Mark A. Sam

What you want takes programming otherwise the prerequsites would line up on
top of each other. You would need to set unbound textboxes along side of
each other and populate them programatically.


m stroup said:
Thanks for your quick response, Sam. I have set that up and it is
working,
but I really want to see a "chain" of prerequisites if you will in one
spot
Math101 - > Math201 - > Math252
to indicate a sequence. (though i now have it set up as Math252 < -
Math201
<- etc.)

I can do this if I have subreports in subreports, etc. but I am thinking
there might be a more eloquent way?
--
Teach me to fish! Thanks for the help.
Pax, M


Mark A. Sam said:
I'm not sure what you are describing, but will suggest how it should be.

The main report should have the tblCourse table as it Recordsource.
Place
its fields in the Report or Page headers and footer depending onyour
needs.
Create another report using tblPreq as its recordsource.

You will need a unique field in tblCourse such as an Autonumber field,
Primary Key, maybe courseID. This is the LinkMasterField Place a
similar
field in tblPreq, but make that a long integer if courseID is an
autonumber.
This is the LinkChildField. It looks like you used the field Course, but
I'm not sure.

Drag the subreport onto the main report detail section and set the
LinkMasterFields and LinkChildFields properties as courseID (or Course if
that is the linking field you are using).

God Bless,

Mark A. Sam


m stroup said:
I am trying to create a report for prerequisites.
Math400
(PreReq) Math302
(PreReq) Math301
etc.

I have tblCourse with descriptions
I have tblPreq with fields
[PrereqNum](Auto, PK)
[Course](fk from tblCourse)
[PreReq](fk from tblCourse)
I have a report with [Course] in the group header
and PreReq in the detail
I also have a subreport in the detail linking the PreReq to the Course
in
the
detail (which is Prereq etc.)

Is there a better way to do this. As it stands I would have to put the
subreport in the subreport, having no way of knowing how many to do.

If I am way off the mark and there is a better way to do this, please
point
me the way.
 
M

m stroup

Thanks Mark. I was hoping it would be easy. :)
--
Teach me to fish! Thanks for the help.
Pax, M


Mark A. Sam said:
What you want takes programming otherwise the prerequsites would line up on
top of each other. You would need to set unbound textboxes along side of
each other and populate them programatically.


m stroup said:
Thanks for your quick response, Sam. I have set that up and it is
working,
but I really want to see a "chain" of prerequisites if you will in one
spot
Math101 - > Math201 - > Math252
to indicate a sequence. (though i now have it set up as Math252 < -
Math201
<- etc.)

I can do this if I have subreports in subreports, etc. but I am thinking
there might be a more eloquent way?
--
Teach me to fish! Thanks for the help.
Pax, M


Mark A. Sam said:
I'm not sure what you are describing, but will suggest how it should be.

The main report should have the tblCourse table as it Recordsource.
Place
its fields in the Report or Page headers and footer depending onyour
needs.
Create another report using tblPreq as its recordsource.

You will need a unique field in tblCourse such as an Autonumber field,
Primary Key, maybe courseID. This is the LinkMasterField Place a
similar
field in tblPreq, but make that a long integer if courseID is an
autonumber.
This is the LinkChildField. It looks like you used the field Course, but
I'm not sure.

Drag the subreport onto the main report detail section and set the
LinkMasterFields and LinkChildFields properties as courseID (or Course if
that is the linking field you are using).

God Bless,

Mark A. Sam


I am trying to create a report for prerequisites.
Math400
(PreReq) Math302
(PreReq) Math301
etc.

I have tblCourse with descriptions
I have tblPreq with fields
[PrereqNum](Auto, PK)
[Course](fk from tblCourse)
[PreReq](fk from tblCourse)
I have a report with [Course] in the group header
and PreReq in the detail
I also have a subreport in the detail linking the PreReq to the Course
in
the
detail (which is Prereq etc.)

Is there a better way to do this. As it stands I would have to put the
subreport in the subreport, having no way of knowing how many to do.

If I am way off the mark and there is a better way to do this, please
point
me the way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top