Placeholder continuation

Placeholder continuation

Forum member · Jan 17, 2008
Hi ceTe Software Support Team, I have a requirement where in some situations I have to place one table within the placeholder space or 2 tables or 3 tables that may extend to one or 2 pages with proper spacings between tables. Because this is dynamic i can design dplx file only with the placeholder that are within dimensions of the initial page. I cannot use recordbox as my data comes from my custom object and also my new pages should have header and footer with page numbers set accordingly in the footer. Any suggestions or ideas are highly appreciated. Thanks Murali

Re: Placeholder continuation

Support · Jan 17, 2008
Hello Murali, You can do this by using a SubReport element. You will have to add a subreport to the Report and this will have the header and footer also. You can get the data from any object and assign it to the subreport without any problem. You can refer to the SubReport Example and Event Driven Queries topics on our help documentation. Thanks, ceTe Software Support Team.

Re: Placeholder continuation

Forum member · Jan 17, 2008
Thanks for the quick response. You mean add a subreport element to the report, with same header and footer of the report and just one placeholder report element within the subreport and in the placeholder laid out event as many tables or my custom pageelements as needed and this will automatically extend to any no. of pages. This is just to make my understanding clear Thanks Murali

Re: Placeholder continuation

Support · Jan 17, 2008
Hello Murali, You do not have to set another header and footer for the subreport, if the subreport extends to multiple pages then the header and footer of the main report will be displayed in all the pages. Also you do not have to add placeholder and the tables in the LaidOut Event in the subreport. You can create a dotnet's DataTable object using the data from your objects and you can assign this DataTable to the subreport in the OpeningRecordSet Event of the query object. You can see this in the Event Driven Queries topic. You will have to use the RecordBoxes with the field names you created in the DataTable. The data from the DataTable will be displayed in the subreport. Thanks, ceTe Software Support Team.

Re: Placeholder continuation

Forum member · Jan 17, 2008
The data is not exactly mapped to schema of the DataTable object. So in the query.OpeningRecordSet event i set an dummy datatable just to satisfy the query object requirement. I dont use datatable for my purpose. so i will only use placeholders and i draw table , or custom pageelments in the laid out event based on the view objects i know at run time. let me try to explain my problem. say I have 3 view objects view1,view2,view3.At runtime i will know which view object to use. The dplx file will have only one placeholder to display for all the views. Each view has a tablecollection consiting of data for the table(not exactly datatable) . I will manually create rows and cells to populate the table based on the data. for view1 say tablecollection has one table.. within the placeholder position in the laid out event i will add table to the content area (e.ContentArea.Add(table); for view2 say tablecollection has 2 tables. within the placeholder position in the laid out event i need to add 2 tables to the content area (e.ContentArea.Add(table1),e.ContentArea.Add(table2)). the second table may not fit in the first page. so it should create in the second page with same header and footer with page number in sequence . And so on... Thanks Murali

Re: Placeholder continuation

Support · Jan 17, 2008
Hello Murali, If you are going for more customized code then it will be easy to use the Generator product so that you can have more control over the Elements you are adding to the PDF and on the page flow. Using report writer it will be complicated and needs more customization of the code. Using the Generator product will siplify the PDF generation in your case. Thanks, ceTe Software Support Team.

Re: Placeholder continuation

Forum member · Jan 17, 2008
I was looking at the SimpleReport.aspx.dplx file and it has just record boxes report elements and data is extended to multiple pages based on the results of the database query. Is it not possible to have same behaviour with the placeholder and extend to pages based on my requirement with placing either a table or bar chart with spacing accordingly? Thanks Murali

Re: Placeholder continuation

Support · Jan 17, 2008
PlaceHolder objects have a fixed height and width when adding them to Report and are not designed to hold variabled sized content. In the SimpleReport example you referenced, the DPLX is set up using RecordBox elements, but these RecordBox elements are designed to take variable sized content and can cause the Body section of the Report to expand as needed for an individual record and flow from page to page as needed. This is not the same for PlaceHolders. ReportWriter is a very useful tool when you have data coming from a Database, RecordSet. Since the application that you are describing does not have data that is being output in this way then you will actually be limited trying to accomplish your application with ReportWriter. Using our Generator product is very straight forward and will allow you to accomplish exacltty what you need. In fact we even have a SimpleReport example using only the Generator features. In your case however if sounds like you will just be creating your Tables and Bar Charts and placing them directly on the Page. you can use the Table's Overflow methods to check if you need to create additional Pages as you go. Feel free to let us know if you have any more questions. Thanks, ceTe Software Support Team

Re: Placeholder continuation

Forum member · Jan 17, 2008
Thank you very much.