Report with Subreport - Summary Table On First or Last Page

Post Author: andbort
CA Forum: General
All-
My apologies in advance for the long post. I would like to know if something can be done in a single report instead of having to spread it across two reports. I will use generic (Xtreme sample database) field names to explain my dilemma. I currently have the following report:
Main Report
Customer ID, Customer Name
Subreport
Order ID, Order Amount, Customer ID
Each Customer and its associated subreport are displayed on a separate page. So it looks like this:
(first page)
1 City Cyclists
100    $200    1
101    $5000  1
102    $350    1
(second page)
2 Pathfinders
103    $760    2
104    $20      2
(third page)
3 Bike-A-Holics Anonymous
105    $120    3
106    $270    3
107    $400    3
And so on. This report often has numerous customers (i.e. ~10 or more customers, thus ~10 or more pages). The business users would like to have a "summary" page at the beginning of the report. This summary page would be in basic tabular format, with one row per customer, but each row would contain values from the subreport. So the updated report would look like this:
(first page)
Customer ID       Customer Name                        Most Recent Order Amount
1                       City Cyclists                             $350
2                        Pathfinders                              $20
3                        Bike-A-Holics Anonymous        $400
(second page)
1 City Cyclists
100    $200    1
101    $5000  1
102    $350    1
(third page)
2 Pathfinders
103    $760    2
104    $20      2
(fourth page)
3 Bike-A-Holics Anonymous
105    $120    3
106    $270    3
107    $400    3
Is this possible in Crystal Reports 10?
Additional Background: The application in question is ASP.Net 1.1 (Visual Studio 2003) which displays reports designed in Crystal Reports 10. The actual report displays customer records in the detail section Da. There are 5 subreports, one in each section Da, Db, Dc, Dd, and De. The summary page could be rendered either at the beginning of the report (e.g. report header) or at the end (e.g. report footer), but will ultimately need to contain Customer table field values, as well as field values from two of the five subreports. I am hoping that this requirement can be addressed in a single report, instead of having to spread it across two reports (each displayed in its own CrystaReportViewer control on the web page). I am assuming that a solution to the generic example above will be applicable to my specific report.
Thanks,
Andrew Bort
National Grid
[email protected]

Post Author: Guy
CA Forum: General
Hi,
If I understand you correctly, you could simply use a crosstab at the begginning of your report to summarize all customers.  If you put it alone in its section you'll be able to specify that you want a page break after.
The remaining of the report should be a simple report where you group on your customer and the detail line showing a sale.
finally, if I was wrong above and you still need subreports, you can use a shared variable (or a parameter) to allow the main report to receive the total from the subreport.
Good luck!

Similar Messages

  • Changing database server on a report with subreports = formula error

    Good morning,
    I currently have several reports that print out, and were developed attached to our development database. However, I need to be able to dynamically change the server that the report uses according to the server configured in our application. Each of these reports contains one or more subreports, which point to the same server and database as the main report. All reports, both the main and subreports, are based on manual SQL commands.
    I'm running into some significant issues. So significant, in fact, that we were forced to deploy our application with reports that had been switched to our production environment in the designer in order to get them functional. This is, obviously, not an acceptable or long-term solution.
    I've gone round and round a couple of times I get different results with different methods of changing this information. I'll outline them below. First, my current code:
    ConnectionInfo connectionInfo = new ConnectionInfo();
                    TableLogOnInfo logOnInfo = new TableLogOnInfo();
                    Console.WriteLine("Report \"{0}\"", report.Name);
                    foreach (Table table in report.Database.Tables)
                        logOnInfo = table.LogOnInfo;
                        connectionInfo = new ConnectionInfo(logOnInfo.ConnectionInfo);
                        connectionInfo.ServerName = "panthers-dev";
                        connectionInfo.DatabaseName = "Prosys";
                        logOnInfo.ConnectionInfo = connectionInfo;
                        //table.Location = "Prosys.dbo." + table.Location.Substring(table.Location.LastIndexOf(".") + 1);
                        table.ApplyLogOnInfo(logOnInfo);
                        table.LogOnInfo.ConnectionInfo = connectionInfo;
                        Console.WriteLine("\t\"{0}\": \"{1}\", \"{2}\", \"{3}\", {4}", table.Name, table.LogOnInfo.ConnectionInfo.ServerName, table.LogOnInfo.ConnectionInfo.DatabaseName, table.Location, table.TestConnectivity());
                    foreach (Section section in report.ReportDefinition.Sections)
                        foreach (ReportObject ro in section.ReportObjects)
                            if (ro.Kind == ReportObjectKind.SubreportObject)
                                SubreportObject sro = (SubreportObject)ro;
                                ReportDocument subreport = report.OpenSubreport(sro.SubreportName);
                                Console.WriteLine("\tSubreport \"{0}\"", subreport.Name);
                                foreach (Table table in subreport.Database.Tables)
                                    logOnInfo = table.LogOnInfo;
                                    connectionInfo = new ConnectionInfo(logOnInfo.ConnectionInfo);
                                    connectionInfo.ServerName = "panthers-dev";
                                    connectionInfo.DatabaseName = "Prosys";
                                    logOnInfo.ConnectionInfo = connectionInfo;
                                    //table.Location = "Prosys.dbo." + table.Location.Substring(table.Location.LastIndexOf(".") + 1);
                                    table.ApplyLogOnInfo(logOnInfo);
                                    table.LogOnInfo.ConnectionInfo = connectionInfo;
                                    Console.WriteLine("\t\t\"{0}\": \"{1}\", \"{2}\", \"{3}\", {4}", table.Name, table.LogOnInfo.ConnectionInfo.ServerName, table.LogOnInfo.ConnectionInfo.DatabaseName, table.Location, table.TestConnectivity());
    Using this approach, my console output prints what I expect and want to see: the correct server and database information, and True for TestConnectivity for all reports and subreports. The two reports I have that have no subreports print out correctly, with data from the proper server. However, all of the reports with subreports fail with formula errors. If this procedure is not run, they work just fine on either server.
    I had to place the assignment of table.LogOnInfo.ConnectionInfo = connectionInfo after the call to ApplyLogOnInfo, as that function did not behave as expected. If I perform the assignment first (or not at all), then calling ApplyLogOnInfo on the outer report's table did NOT affect the values of its ConnectionInfo object, but it DID affect the values of the ConnectionInfo object's of its subreports!
    In any event, if anyone could post a code sample of changing database connection information on a report containing subreports, I would appreciate it.
    Any help is greatly appreciated and anxiously awaited!

    Hi Adam,
    Code for changing database connection information on a report containing subreports :
    private ReportDocument northwindCustomersReport;
        private void ConfigureCrystalReports()
            northwindCustomersReport = new ReportDocument();
            string reportPath = Server.MapPath("NorthwindCustomers.rpt");
            northwindCustomersReport.Load(reportPath);
            ConnectionInfo connectionInfo = new ConnectionInfo();
            connectionInfo.ServerName = "localhost";
            connectionInfo.DatabaseName = "Northwind";
            connectionInfo.IntegratedSecurity = false;
            SetDBLogonForReport(connectionInfo, northwindCustomersReport);
            SetDBLogonForSubreports(connectionInfo, northwindCustomersReport);
            crystalReportViewer.ReportSource = northwindCustomersReport;
        private void Page_Init(object sender, EventArgs e)
            ConfigureCrystalReports();
        private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
            Tables tables = reportDocument.Database.Tables;
            foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                tableLogonInfo.ConnectionInfo = connectionInfo;
                table.ApplyLogOnInfo(tableLogonInfo);
        private void SetDBLogonForSubreports(ConnectionInfo connectionInfo, ReportDocument reportDocument)
            Sections sections = reportDocument.ReportDefinition.Sections;
            foreach (Section section in sections)
                ReportObjects reportObjects = section.ReportObjects;
                foreach (ReportObject reportObject in reportObjects)
                    if (reportObject.Kind == ReportObjectKind.SubreportObject)
                        SubreportObject subreportObject = (SubreportObject)reportObject;
                        ReportDocument subReportDocument = subreportObject.OpenSubreport(subreportObject.SubreportName);
                        SetDBLogonForReport(connectionInfo, subReportDocument);
    Hope this helps!!
    Regards,
    Shweta

  • Report with more columns than will fit on a page

    <p>I&#39;m just beginning to use Crystal Reports (30-day Developer eval). I&#39;m trying to create a report with more fields than will fit across one page. The "extra" fields seem to wrap on the first page. I&#39;d really like to print the report across two pages, like Excel does with its "Fit to 2 pages wide" option.</p><p>Is this possible in Crytal? What do folks do when their report is "wider" than the width of the page? </p><p>&#160;</p>

    This is a relatively easy fix. Basically you need to make a huge default page for your printer, and use that layout when printing.
    1. On Windows, go to Start -> Printers & Faxes
    2. Click on File -> Server Properties
    3. Check 'Create a new form'
    4. Change the form name field to something you can remember... I called mine GIGANTIC CRYSTAL LAYOUT
    5. At the bottom change the units to the size you would like. I use 100" wide x 14" tall.Â
    6. Click Save Form when you are done.
    7. Then click 'Close'
    In crystal start your report (or create a new one) and change your printer settings to use this new form. If it doesn't show up under your default printer, try changing the printer crystal is looking at, and selecting your new form.
    Â Hope that helps.

  • How to print header in first and last  page only in SAPSCRIPT

    Hi!
    How to print header in first and last  page only in SAPSCRIPT,
    in between pages,  I need to print all line items in MAIN window only .
    Thanks in anticipation!
    Aki.

    Hi All,
    Thanks for your early update...but my requirement here is
    I have two pages (FIRST , NEXT ) First is having Header, Main and Footer
    NEXT is having Main and Footer ..I am printing PO here..let us think that my PO is having 20lines items , let us assume that it takes five pages...
    Now how application is printing is ..first set of data is printing in FIRST page and remainiang data distributed to 4 pages printing in NEXT page ..but what my requirement is , I need fifth page print on FIRST page, instead of NEXT page... Ultimately I need last set of data always print in FIRST ie out of 5 pages 1st print on FIRST 2nd 3rd 4th print on NEXT and 5th print again on FIRST .
    hope you this will clear you.
    Thanks!

  • IDCS3 Print Booklet - Image across first and last page

    Does anyone know how I could place an image to be wrapped around the cover of a booklet? No problem on inside pages because they show as two page spreads but the first and last pages don't display as a two page spread.

    Place it on the cover and stretch it out across what would be the back
    cover if it were there.
    Copy to clipboard and scroll to the last page. Edit>copy in place. Crop
    to fit on back cover and front cover.
    Bob

  • Report with subreports. Web Service/XML problem. Please help!

    Hi,
    I have a composite report (main report with 9 subreports). The report uses web service as datasorce and is provided with single xml file containing the schema and all the tables for the main reports and its subreports.
    The problem I encounter is that i have to establish a connection for each subreport in order to get it work and it is the same connection. Moreover, I have observed that each time a subreport is drilled there is distinct call to the web service.
    So, i end up having a single .rpt file which makes up to 10 unnecessary calls over http just get the same xml data ???
    I've tried everything to solve this problem without any success.
    Option 1: Removing subreports. Not posible because main report can not handle multiple detail section separately.
    Option 2: Using multiple detail section in main report and conditionally suppress rows. Not possible
    Option 3: Removing datasource from subreports and pass array variables instead. Not posible
    Option 4: Remove subreports and use crosstabs in main report. Not posible
    Any ideas?
    Please I would greatly appreciate any input, I am getting quite desperate about this.
    Thank you very much.

    Subreports make their own data connection, the reason why subreports are used for other data sources.
    Post to the Report Design forum to help on redesigning the report

  • Crystal Report with subreports breaks when running on different databases.

    HI there
    I have a report with 5 subreports on that only works on the database I am designing it on. As soon as I run the report through my application on a database different to the one I design on, it seems to have lost all the parameter fields I created in one of the subreports (the one I have just added, the other 4 work fine) used to link to the main report.
    It then pops up with the Parameter Value box and asks for values for 2 parameters that I do not use to link to the subreport, nor have added to the subreport in design time, and in code when I step through the parameterfields list property, the parameters I added in design time to the subreport are not in the list but somehow these 2 parameter fields have been added to the subreport? These 2 parameters have the same names as some main report parameters which have been set already, but as mentioned these somehow now belong to the subreport.
    When I run the report through my app on the database I design on all parameters are present and the report works fine.
    The parameters in the subreport are all command parameters, linking to a command field, a formula field and another non-command parameter in the main report. All these are set and work fine in the main report.
    I set all the parameter values in code to the main report, and the subreports all use those to link to.
    I am using CR v10.2 with VB2008 using .NET 2.0 framework (although I had similar problems in VB2005), where the report links directly to a SQL databse via commands. There are 4 commands in the main report and one in the problematic subreport. The subreports command incudes a SQL "IF" statement based on one of the parameters I am linking from the main report.
    Please let me know if more info is required.
    Thanks.

    Hello, Eugen;
    I understand you are using Visual Studio .NET 2008 with bundled Crystal Reports Basic for 2008 (10.5). Do you have a full version of Crystal Reports you use to design reports with or are you designing inside Visual Studio .NET?
    I would like to suggest some ways to test and narrow down the issue.
    One subreport appears to be changing the parameters used when the underlying database changes. Is there a change in the Command it is based on?
    Create a simple report using the same command and the same database as is used in the problem subreport. Run it to confirm you get the same data as in the original.
    Now in design, go into Database|Set Datasource location and change to the new datasource. Do a Database|Verify database. Do you see the change in parameter fields you are seeing at runtime? Has the Command changed? Does it run through the application?
    If you see the same change there, it will have to be addressed in the designer first. If it runs well there, let us look further at the application.
    What is the order of your code?
       Open main report
       Logon to database
       Pass parameters
       Open each subreport
       Logon to the database
       Pass parameters
       View the report.
    Do you set all database locations before passing parameters?
    Were any of the parameters created as "NULL" in the designer?
    Once I have the answers to these questions we can look a little further.
    Elaine

  • Report with top 10 tables ...

    Hello !
    I need to create an report with the top 10 tables :
    1 - The most bigger tables
    2 - The most access tables
    3 - The bigger number of sorts
    4 - The physical access
    5 - The bigger shared memory use
    The first one i can get from dba_segments, but the others i have no clue where i can find this informatation on the database.
    Any help is good .
    thanks
    Fernando

    Hi
    Answer of your first point is hidden in dba_segments view. this view contain colum bytes. it is size of any objects in bytes
    like select segment_name,segment_type,owner,bytes/1024/1024 as size_in_mb
    from dba_segments
    where owner='SCOTT'
    order by bytes desc.
    Answer Point No. 2
    there is dynamic view v$sql
    this view contain a colums sql_text,first_load_time, last_load_time
    select colums sql_text,first_load_time, last_load_time
    from v$sql
    order by sql_text
    copy colum sql_text in excel sheet and you can count table name how many time it has been accessed. or by apply a group funcation
    select select count(*) from v$sql
    from v$sql
    group by sql_text
    Answer of point No. 3,4,5 lies in a statspack report. in oracle 9 and 10g contain following information in automaitc work load repository reprot.
    Best Regard
    Abdul Hameed
    Islamabad Pakistan
    [email protected]
    cell 92 333 5587 318

  • Crystal Reports 8.5: Report with Subreport: Nearly empty pages?

    Post Author: alois2805
    CA Forum: General
    Hallo!
    I am using Crystal Reports 8.5.
    I have created a report with a subreport.
    My problem: When I print the report, there is always a large empty space after the subreport entries?
    Can anybody help me?
    Alois Blaimer

    Post Author: Evans
    CA Forum: General
    Originally the stored procedure had the last parameter as an integer.  I tried everything with the formulas, CDBL(1.00)  ToNumber(1.00)  1.00  1  hoping it just wasn't recognizing that the value needed to be a number but nothing worked.  I changed the stored procedure to require a VARCHAR for the last parameter, updated the report and it worked for me. 

  • Reports with subreports take longer to preview in Crystal 2008 Viewer

    Previewing reports containing one or more subreports within a .NET application using the 2008 Windows Forms Crystal Report Viewer control takes much longer than running those same reports from the XI R2 viewer.  This occurs because the report will run a subreport for all pages before the report shows the first page.  In Crystal XI R2, the report would run the subreport for only the first page and only retrieve additional data for that subreport when scrolling to subsequent pages.  Is there a way we can ensure that a subreport only runs for the first page before it previews the first page?

    Hello Darin
    2008 Windows Forms Crystal Report Viewer control takes much longer than running those same reports from the XI R2 viewer
    - What exactly is the difference? In some instances one or two seconds are considered undesirable...
    - How does the performance of the report compare when you run it in the CR designer?
    - What CR Service Pack are you on?
    - Place a check mark at the following report options:
    "No Printer"
    "Dissociate Formatting Page Size and Printer Paper Size"
    "Verify on First Print"
    "Verify Stored Procedures on First Print"
    If your subreports are set to "Re-import", turn this option off.
    This occurs because the report will run a subreport for all pages before the report shows the first page.
    - I do not think this is correct. What is this conclusion based on?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Group matrix report with an hierarchy table???

    Hello,
    I have a big trouble making up a report involving many tables and one of them having a many-to-many recursive relationship. The user has a defined request in having the information grouped.I'll give some more details. I would like to know if you have any ideas in how to structure the report..
    Here are the tables:
    ORG
    (org_id not null,
    org_name not null)
    DNR
    (dnr_id not null,
    org_id not null,
    dnr_age,
    dnr_gender)
    CS
    (cs_id not null,
    dnr_id not null)
    Smpl
    (smpl_id not null,
    dnr_id notnull,
    org_id,
    smpl_tp not null,
    cs_id,
    meth,
    notes)
    Tr_map
    (tr_id not null,
    smpl_prnt not null,
    smpl_chld,
    pos)
    Some data..
    Smpl_id Dnr_id Org_id Smpl_tp Cs_id Meth Notes
    107 101 137 tss a xxxx
    118 112 137 tss ab xxxx
    122 108 25 tss 3768 a xxxx
    123 108 25 tss 3768 ab xxxx
    124 108 25 blk c yyyy
    125 108 25 sld d zzzz
    126 108 25 blk c yyyy
    tr_id Smpl_prnt Smpl_chld Pos
    1 107
    2 118
    3 122
    4 123
    5 124 122 1
    7 125 124 1
    8 126 122 1
    10 125 126 2
    The user wants the data reported as follows:
    Org name
    Dnr_id, dnr_age etc...
    Cs_id
    Smpl_id, Smpl_tp (tss), Meth, Notes
    Smpl_id,smpl_tp(blk), Meth, Notes ...
    Smpl_id, smpl_tp(sld), Meth, Notes...
    Cs_id
    Smpl_id, Smpl_tp (tss), Meth, Notes
    Smpl_id, smpl_tp(blk), Meth,Notes...
    Smpl_id, smpl_tp(sld), Meth, Notes...
    I think the grouped matrix would be the solution but I don't know how to do that with the hierarchy table to show the children and grandchildren as subgroups. Is that possible in a single query? How can I build a group matrix with multiple subgroups?
    Thanks in advance.
    simona
    null

    The example given by Oracle (from the above link) using the following SQL for a matrix report is flawed.
    SELECT DEPTNO, JOB, SUM(SAL)
    FROM EMP
    GROUP BY DEPTNO, JOB
    ORDER BY DEPTNO, JOB
    The SUM function handled by the query restricts you from doing so many things - especially when you want the empty fields to be filled by 0 (by using the Value if Null property).
    If the query is changed to ''SELECT DEPTNO, JOB, SAL FROM EMP' , and use the SUM function in the wizard to build the Matrix cell, then the 'Value if Null' property can be used without any issues.
    This also makes Section 25.6 (Add zeroes in place of blanks) of the documentation a joke.
    Anyway, that's my cents worth....

  • Login error with report viewer when opening Crystal report with subreport

    Hi
    I have a problem with a login error (database vendor code 18456) when I try to open a crystal report to view it.
    The report uses data from an external payroll database but I'm running it via our Accounts system (it's a convenient front end for users to run the report from). This works fine for another report that doesn't have any subreports. However when I run the Crystal report that has subreports, the report generation process works but when the crystal reports viewer tries to open the report I get the login error. It doesn't seem to be passing the login details for the payroll database down to the subreport.
    I'm using Crystal Reports version 11.0.0.1282. The Accounts system is Technology One. Tech One have provided a report template that has several formulas designed to allow Tech One to play nicely with Crystal. One of these formulas allows me to enter the nickname of the external database that the report needs to use. The external database's connection details are fully specified in the Tech One configuration section (server console). So in this case the report says use database U1 & the server console identifies U1 as being the payroll database, specifies the connection path  & has the username & password required to logon to the payroll database/server.
    The report is running ok & retrieving data, but for some reason the viewer is erroring. If anyone has any ideas for how I can get the login details used to run the main report to flow through to the subreport it would be much appreciated.
    Thanks
    Sue

    I understand your  frustration. We can do a few things. But really, it should be Technology One contacting us. To use an analogy (which you are free to share with Technology One). They built a car and sealed the hood. You bought the car, but he engine does not quite run as it should. You bring the car to the mechanic and all he can do is look at the car as he can not even open the hood.
    In any case, here is what I would do if I could open the hood (e.g.; if I was dealing with Technology One):
    1) Look up database vendor code 18456. This is simply the error our print engine is receiving from the database client and it simply passes it through relatively unhandled. This you should be able to do your self or ask Technology One to tell you what that means.
    2) Break out the subreport and see if it runs on it's own in the application (if this is a permissions issue - which I doubt -  it should come up here too). Unfortunately, this is for Technology One to do...
    3) Run the report (with the subreport) in the CR designer. Does it work there? If this is a win app and it works, we again eliminated permission issues. And we also confirmed that the report is good. Again, Technology One should do this for you.
    BTW.; CR 11.0 is out of support - not sure if you or Technology One are aware of this...
    4) Can the developer duplicate the issue on his development computer?
    Now, there are couple of instances where you say something like; "the report works and gets data, but the viewer errors out":
    +The report is running ok & retrieving data, but for some reason the viewer is erroring.
    However when I run the Crystal report that has subreports, the report generation process works but when the crystal reports viewer tries to open the report I get the login error.  +
    How do you know the report is retrieving data? From the error I would say the report never connects, thus the error / request for a logon...
    So, the short of all of this is; get Technology One to contact us. They can do it over the forums or obtain a phone case here;
    http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100
    Now, here is a warning. As CR 11.0 is out of support Technology One will have to upgrade to CR 11.5, before that can create a phone case, which for them and you brings up another bunch of issues...
    If you do not get any joy from the support person at you are talking to at Technology One, get him to escalate the issue. They are the ones that should be talking to us...
    Ludek

  • Creating report with Subreports

    I am creating a report with two subreports and am getting an error.  The error is Error source: Error code:0x80070057 I can;t seem to figure out what is prompting this and it comes up when I try to preview the report.  Can anyone please help?

    Hi Jeff,
    I did not find any specific description of the error, but previous incidents research tells me that it could be related to parameter prompt. Do you have any parameters in your report? How many, what type?
    You may try to locate the problem:
    1. Is it possible to temporarily delete some parameters?
    2. Are your subreports linked using parameters?
    3. You have three reports (main and two subs). Run each report separately to make sure they work fine.
    4. Run main report with one sub
    5. Try unlinked subreports
    More tests should help us better understand the situation.

  • Report with Subreport very slow from SharePoint

    HI,
     I have a report with a sub-report that runs in about 9 seconds from my PC using the Report Designer with SQL Server 2008R2.
    When I run the deployed report from SharePoint it takes 4 minutes. If I remove the sub-report it again runs fine from SharePoint.
    The sub-report is pretty simple and links to the main report using 3 parameters.
    What would cause this?
    Any ideas would be appreciated.
    Thanks,
    Trish
    Trish Leppa

    Hello Trish,
    I have found similar thread with some good suggestion for optimizing the report in sharepoint.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c140d26e-1c02-4f8d-bc61-f6ac75706556/reporting-services-very-slow-in-sharepoint?forum=sqlreportingservices
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to report header and footers on first and last page only

    Hi
    We are trying to create a report that has a one data header on the first page and another header on subsequent pages then the data body then a footer section on the last page only. If we only have one page of data it works fine but when we move to multiple pages the data body section does not expand to fill the gap and we are left with second header but then a gap before the data.
    We have tried to use anchors but are realy stuck. Any help would be greatly appreciated
    Ian

    Something like:
    LOOP AT t_output1.
      WRITE:/1 vline,
      2 t_output1-ktokd,
      17 vline,
      18 t_output1-kunnr,
      29 vline,
      30 t_output1-name1,
      70 vline,
      71 t_output1-katr1,
      87 vline,
      88 t_output1-land1,
      96 vline,
      97 t_output1-vkorg,
      107 vline,
      108 t_output1-kvgr1,
      118 vline,
    * DV4K934131-Start.
    * 119 T_OUTPUT1-TTEXT,
      120 t_output1-v_text,
    * 150 VLINE.
      255 vline.
    * DV4K934131-End.
    ENDLOOP.
    WRITE:/1 sy-uline(255).
    TOP-OF-PAGE.
      IF p_upda = 'X'.
        v_linsz = 255.
        FORMAT COLOR COL_HEADING INTENSIFIED ON.
        WRITE:/1 vline,
        2 text-h01, "'Sold to/Ship to'
        17 vline,
        18 text-h02, "'Customer#'
        29 vline,
        30 text-h03, "'Customer Name'
        70 vline,
        71 text-h04, "'Customer Status'
        87 vline,
        88 text-h05, "'Country'
        96 vline,
        97 text-h06, "'Sales Org.'
        107 vline,
        108 text-h07, "'EST Status',
        118 vline,
        119 text-h08, "'Change History',
    * 150 VLINE.
        255 vline.
        FORMAT RESET.
        WRITE:/1 sy-uline(255).
      ENDIF.
    Rob

Maybe you are looking for