If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
insert header to report automatically
Is there a way to write a code to insert the same subreport to many
different reports automatically? Thanks. |
#2
|
|||
|
|||
insert header to report automatically
Hi,
Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#3
|
|||
|
|||
insert header to report automatically
Thanks again, Alex. If I want to put the code in module and scan all the
reports and insert, do you know how to do it once for all instead of one by one? Something like where I can get all the report names in the mdb. Thanks. "Alex Dybenko" wrote in message ... Hi, Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#4
|
|||
|
|||
insert header to report automatically
CurrentProject.AllReports is a collection of report objects. You can spin
through it and get the names of all the reports. "-003KobeBrian" wrote: Thanks again, Alex. If I want to put the code in module and scan all the reports and insert, do you know how to do it once for all instead of one by one? Something like where I can get all the report names in the mdb. Thanks. "Alex Dybenko" wrote in message ... Hi, Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#5
|
|||
|
|||
insert header to report automatically
I couldn't find the currentproject.allreports in access97. I found the
application.reports. But this is the open report. How do I use all reports including open and non-open ones? Thanks. "Klatuu" wrote in message ... CurrentProject.AllReports is a collection of report objects. You can spin through it and get the names of all the reports. "-003KobeBrian" wrote: Thanks again, Alex. If I want to put the code in module and scan all the reports and insert, do you know how to do it once for all instead of one by one? Something like where I can get all the report names in the mdb. Thanks. "Alex Dybenko" wrote in message ... Hi, Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#6
|
|||
|
|||
insert header to report automatically
When I tried to insert a report, I use the following code and I got the
error message "type mismatch". reportheader is the subreport existed. and I want it to assign to the new report as a subreport. Set ctl = CreateReportControl(rpt.Name, acSubform, acPageHeader, , Reports![reportheader]) And how do you assign name to this command. Please help. Thanks. "Klatuu" wrote in message ... CurrentProject.AllReports is a collection of report objects. You can spin through it and get the names of all the reports. "-003KobeBrian" wrote: Thanks again, Alex. If I want to put the code in module and scan all the reports and insert, do you know how to do it once for all instead of one by one? Something like where I can get all the report names in the mdb. Thanks. "Alex Dybenko" wrote in message ... Hi, Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#7
|
|||
|
|||
insert header to report automatically
Hi,
not sure that you need to pass Reports![reportheader], try leave it out. once you get a reference to ctl - you can then set it other properties -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... When I tried to insert a report, I use the following code and I got the error message "type mismatch". reportheader is the subreport existed. and I want it to assign to the new report as a subreport. Set ctl = CreateReportControl(rpt.Name, acSubform, acPageHeader, , Reports![reportheader]) And how do you assign name to this command. Please help. Thanks. "Klatuu" wrote in message ... CurrentProject.AllReports is a collection of report objects. You can spin through it and get the names of all the reports. "-003KobeBrian" wrote: Thanks again, Alex. If I want to put the code in module and scan all the reports and insert, do you know how to do it once for all instead of one by one? Something like where I can get all the report names in the mdb. Thanks. "Alex Dybenko" wrote in message ... Hi, Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#8
|
|||
|
|||
insert header to report automatically
How do you pass the source control to ctl? What is the syntax? THanks.
"Alex Dybenko" wrote in message ... Hi, not sure that you need to pass Reports![reportheader], try leave it out. once you get a reference to ctl - you can then set it other properties -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... When I tried to insert a report, I use the following code and I got the error message "type mismatch". reportheader is the subreport existed. and I want it to assign to the new report as a subreport. Set ctl = CreateReportControl(rpt.Name, acSubform, acPageHeader, , Reports![reportheader]) And how do you assign name to this command. Please help. Thanks. "Klatuu" wrote in message ... CurrentProject.AllReports is a collection of report objects. You can spin through it and get the names of all the reports. "-003KobeBrian" wrote: Thanks again, Alex. If I want to put the code in module and scan all the reports and insert, do you know how to do it once for all instead of one by one? Something like where I can get all the report names in the mdb. Thanks. "Alex Dybenko" wrote in message ... Hi, Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#9
|
|||
|
|||
insert header to report automatically
I think using SourceObject
ctl.SourceObject="Mysubform" -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... How do you pass the source control to ctl? What is the syntax? THanks. "Alex Dybenko" wrote in message ... Hi, not sure that you need to pass Reports![reportheader], try leave it out. once you get a reference to ctl - you can then set it other properties -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... When I tried to insert a report, I use the following code and I got the error message "type mismatch". reportheader is the subreport existed. and I want it to assign to the new report as a subreport. Set ctl = CreateReportControl(rpt.Name, acSubform, acPageHeader, , Reports![reportheader]) And how do you assign name to this command. Please help. Thanks. "Klatuu" wrote in message ... CurrentProject.AllReports is a collection of report objects. You can spin through it and get the names of all the reports. "-003KobeBrian" wrote: Thanks again, Alex. If I want to put the code in module and scan all the reports and insert, do you know how to do it once for all instead of one by one? Something like where I can get all the report names in the mdb. Thanks. "Alex Dybenko" wrote in message ... Hi, Do not see any problem with this - you have to open each report in design mode using docmd.openreport, then add new control using CreateControl, and then format it as required. The tricky part if you have other controls on the section where you insert subreport - then you have to move existing control around it -- Best regards, ___________ Alex Dybenko (MVP) http://alexdyb.blogspot.com http://www.PointLtd.com "-003KobeBrian" wrote in message ... Is there a way to write a code to insert the same subreport to many different reports automatically? Thanks. |
#10
|
|||
|
|||
How to copy all report info to a new blank report
I need to copy, using code, all objects from a report into a new blank
report. What about the grouping and sorting? This is a fix for reports which have a bug which causes them to crash on the NoData event. I copied some manually and that fixed the problem. |
|
Thread Tools | |
Display Modes | |
|
|