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.
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...
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").
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).
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 ?
Member
236 Points
551 Posts
Trying to get a muli page form running.
Nov 04, 2016 08:03 PM|mhinkle2|LINK
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.
All-Star
45840 Points
16682 Posts
Re: Trying to get a muli page form running.
Nov 05, 2016 07:09 PM|PatriceSc|LINK
Hi,
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...
Member
236 Points
551 Posts
Re: Trying to get a muli page form running.
Nov 05, 2016 09:44 PM|mhinkle2|LINK
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
All-Star
45840 Points
16682 Posts
Re: Trying to get a muli page form running.
Nov 05, 2016 11:19 PM|PatriceSc|LINK
Hi,
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").
Member
236 Points
551 Posts
Re: Trying to get a muli page form running.
Nov 05, 2016 11:52 PM|mhinkle2|LINK
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).
All-Star
45840 Points
16682 Posts
Re: Trying to get a muli page form running.
Nov 06, 2016 12:17 AM|PatriceSc|LINK
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 ?
Member
236 Points
551 Posts
Re: Trying to get a muli page form running.
Nov 06, 2016 01:07 AM|mhinkle2|LINK
Where do I put the count at?
All-Star
45840 Points
16682 Posts
Re: Trying to get a muli page form running.
Nov 06, 2016 10:01 AM|PatriceSc|LINK
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 ?