output report with a subreport

M

Matt Creel

I have a report that I created that uses a subreport to show all of the group
totals again at the report footer. I need to export this report to a folder
using vba. When I use the output to function to output it as a SNP file, it
outputs the report just fine, but it shows a blank where the subreport should
be. I look at the report in Access and the subreport is there. Is there a
way to export the report to my harddrive another way? Is there a way to
specify a printing location for the MS XPS writer?
Is there a way to show the grouping totals again without subreports? I also
can not download anything in order to export it as a PDF. This is how it is
grouped:

A1 A1#
A2 A2#
A A1#+A2#

B1 B1#
B2 B2#
B B1#+B2#

A A1#+A2#
B B1#+B2#

Thanks,
Matt
 
J

Jack Leach

Using a subreport to show group totals seems to be a long way around. Can
you not use calculated fields at the report footer to tally totals from the
groups and display them accordingly?

To export a report to pdf, see http://www.lebans.com/reporttopdf.htm


hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
M

Matt Creel

Well what type of calcutaled field would you use? I am just familar with the
basics of access reports. The thing is that the groups may change depending
on what location I run the report in. I want the report to be flexible
depending on the location, so I can not tie "B" permently to the report,
because the location might not have a group "B", they might have a group "C".

Thanks,
Matt
 
J

Jack Leach

I'm not 100% on the rules, but calculated fields are basically unbound
controls with a function as the control source to calculate them.

Ex. =Sum([thiscontrol])

The above in an unbound control would return the sum of all records of a
control called thiscontrol. That's probably the most I can offer on that,
but it should be a pretty easy subject to research.

I want the report to be flexible
depending on the location, so I can not tie "B" permently to the report,
because the location might not have a group "B", they might have a group "C".

A situation like this probably calls for different reports, rather than
different modes of the same report. If you don't have the same underlying
structure, you should have different reports.

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
M

Matt Creel

A calculated field will only return one result. In my earlier example, if I
placed a calculated field at the end of each group (ex. sum([A]) ) it would
return the sum of the group [A] at the group footer. My proble is a little
more complex being that I have this information on the group footers but I
want to repeat the information again on the report footer. Making it more
complex is the fact that the groups change acording to what location my
report is running. If i had constant groups, I could just place a label (A)
with the group name and a calculated field next to it such as : Sum(Select
[Groupname] Where [Groupname] = [A]. At least I beleive you can use a select
where expression in a calculated field. I have never tried. but all this to
say that a subreport was the best option at the time. For some unknown
reason, when I specified the location and name for the SNP file to save to in
my code, the SNP file will include my subreport so my problem was fixed.

Thanks
Matt

Jack Leach said:
I'm not 100% on the rules, but calculated fields are basically unbound
controls with a function as the control source to calculate them.

Ex. =Sum([thiscontrol])

The above in an unbound control would return the sum of all records of a
control called thiscontrol. That's probably the most I can offer on that,
but it should be a pretty easy subject to research.

I want the report to be flexible
depending on the location, so I can not tie "B" permently to the report,
because the location might not have a group "B", they might have a group "C".

A situation like this probably calls for different reports, rather than
different modes of the same report. If you don't have the same underlying
structure, you should have different reports.

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)



Matt Creel said:
Well what type of calcutaled field would you use? I am just familar with the
basics of access reports. The thing is that the groups may change depending
on what location I run the report in. I want the report to be flexible
depending on the location, so I can not tie "B" permently to the report,
because the location might not have a group "B", they might have a group "C".

Thanks,
Matt
 

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