Trying to get a muli page form running. RRS feed

  • Question

  • User-740453238 posted

    Might be wrong place, but I am using Visual Studio Local Report in VS 2008.  I have a database that pulls overdue records and creates a form for each customer.  However the report only displays the first one.  How can I get this to show each customer and start each on new page.

    Friday, November 4, 2016 8:03 PM

All replies

  • User753101303 posted


    To me it should just work. So for now even if you create a new report you are not able to return 10 lines from your query and see then 10 lines in your report? For now I'm trying to understand if this is a problem in your query, in how you designed your report or maybe in how you view the final result...

    Saturday, November 5, 2016 7:09 PM
  • User-740453238 posted

    Here is the query I'm using:

    SELECT     TOP (100) PERCENT dbo.Owners.PermitNumber, dbo.Owners.Name, dbo.Owners.StreetNumber, dbo.Owners.StreetName, dbo.Owners.Address1,
                          dbo.Owners.Address2, dbo.Owners.City, dbo.Owners.State, dbo.Owners.zip, dbo.Owners.RentalAgent, dbo.Owners.ExpirationDate, dbo.Owners.Active,
                          dbo.Owners.Bedrooms, dbo.Owners.Email, dbo.Payments.Owner, dbo.Payments.AmountDue, dbo.Owners.ContactInfo
    FROM         dbo.Owners INNER JOIN
                          dbo.Payments ON dbo.Owners.PermitNumber = dbo.Payments.PermitNumber INNER JOIN
                          dbo.Agents ON dbo.Owners.RentalAgent = dbo.Agents.Name
    WHERE     (dbo.Owners.ExpirationDate > GETDATE() - 55)
    ORDER BY dbo.Owners.ExpirationDate DESC

    Saturday, November 5, 2016 9:44 PM
  • User753101303 posted


    And so if you run that in SSMS how many rows do you get? Your query depends on the current date so you could have 4 rows one day and just 1 one row the next day.

    Not related but this TOP 100 ORDER BY construct doesn't have any effect since SQL Server 2005 (I remember it as I inherited once of an application that used this awful trick to create "ordered views").

    Saturday, November 5, 2016 11:19 PM
  • User-740453238 posted

    I get a bunch.  I cleaned it up and took off the payment table.  I was getting a bunch of rows per record.  Now I am only getting one row per record, but still have a lot of records but the report only prints one page (the first record).

    Saturday, November 5, 2016 11:52 PM
  • User753101303 posted

    Do you have the same issue if you create a new report with the same data source for testing? What if you add https://msdn.microsoft.com/en-us/library/dd255215.aspx to your report? Does it show 1 ?  

    Sunday, November 6, 2016 12:17 AM
  • User-740453238 posted

    Where do I put the count at?

    Sunday, November 6, 2016 1:07 AM
  • User753101303 posted

    Just next to your customer data. This is just to see if it shows 1 or something else.

    What is the structure of your report? You are using a Table zone with a Details section? To be on the safe side you are using Reporting Services ? Not Crystal Report ? This is your first report?

    Also what if you just create a new report that points to a SELECT 1 AS Value UNION ALL SELECT 2 query. Then you do see 2 rows in the new report?

    The problem is that by design if you create a report, it will show all data returned by the query. So I would suspect for now that this is your first report and made something wrong when creating the report (or maybe some dev features such as limiting the number of rows for performance while designing the report ???).

    Ah could it be something such as showing data for your customer in a report or page header/footer rather than in a detail section ? In this case it might show a single customer even if the query returns more customers ?

    Sunday, November 6, 2016 10:01 AM