Creating Main Report with Mutlipy subreports at runtime

  • Thread starter Thread starter rickbirnie
  • Start date Start date
R

rickbirnie

Guest
Not sure if this can be done. But my question is. Is there a way to create
a main report with multiply subreports using Code? What I am trying to do is
create a report that could have one page or mutliply pages depending on the
the data record on a form. The report is a purchase order that may contain 1
item for purchase or several items that would not fit on one page. Also
depending on where the items need to be shipped it could require a shipping
instructions page. I have created several one pages reports that I would
like to be able to add to one main report and deside which subreport to add
to the main report at run time.

Thanks Rick
 
What is the deciding factor as to whether these other pages (subReports) print or not.
 
First of all thank you for the reply. What I am trying to create is a very structured printable form and is based on an Purchase Order form that is a standard in the office. Our office does purchasing for several different bowling centers, Clubs, lodging facilities, etc.. world wide. The first page has a lot of data concerning Billing, Invoicing, Vendor and shipping information. The second page is just a continuation of the first page but with out all the Billing, Invoicing, etc.. data. So I have created the structure of the form in a reports with the first page having several subreports for the different sections that pull from dynamic/temporary tables. There is a one subreport on the first page the pulls in order details (items descriptions, price, quantity, and total to be purchase). This subreport can only be a certain size and if there are more then 5 items then the report will need to create a second page which is just a continuation of the subreport of the order details. I have created two reports with the first page of the Purchase Order being one being one report and the second being another. I have set the code behind when you wish to preview the report to decide if there are more then 5 items on the order and use a different main report with two subreports with the first page being the first page (one subreport) discussed above and a continuation page (another subreport). So what I have created is reports that are added to the a main report depending on the dynamics of the order. So instead of creating mutliply main reports with the required subreports and choice which one to use in code. What I was wondering if you could add the subreports to a main report in the code instead of having the mutliply main reports with the corresponding subreports. Sorry I wasn't clear in my first post and thanks in advance for any help.

Rick
 

Users who are viewing this thread

Back
Top Bottom