Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Taurkon
Starting Member
26 Posts |
Posted - 2007-02-16 : 11:14:24
|
I have a number of reports where the number of rows returned is one, yet the row count at the bottom of the report returns a number far greater. When I write the SQL, I receive the correct number of rows returned (not just a single row).I profiled the SQL and it also generates SQL the correct number of rows, in this case it returns multiple rows.Any ideas? |
|
jhermiz
3564 Posts |
Posted - 2007-02-16 : 13:48:13
|
quote: Originally posted by Taurkon I have a number of reports where the number of rows returned is one, yet the row count at the bottom of the report returns a number far greater. When I write the SQL, I receive the correct number of rows returned (not just a single row).I profiled the SQL and it also generates SQL the correct number of rows, in this case it returns multiple rows.Any ideas?
Not enough info. Post your dataset, your grouping, post sample data, expected results. Post screen captures of the report. Post how you generated the groups in RS. We cannot help you with the info you provided. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
|
Taurkon
Starting Member
26 Posts |
Posted - 2007-02-16 : 15:21:55
|
Ok, here is the detailed version.Dataset sample: **Note white space formatting not working. Billing Id's are last numeric characterAccouting_Period Charge_Amt Billing_Id200401 10545.6100 1 200401 633.8100 2200402 30.1100 1 200402 10817.6800 2200402 31.8500 3200403 -77.6100 1200403 17.1400 2etc.....SQL statement run in Management Studio as baseline:select accounting_period, charge_amount, billing_id from service_revenue_admin order by accounting_period, billing_id Result: 1373 rows returnedsample results returned:Report Builder DesignReport Model Design: Contains 2 entities. 1. Service_Revenue_Admin2. Scenario_Version - related to Service_Revenue_Admin through Scenario_Id (not shown)Report Builder ad-hoc design2 Entities available to user, Service_Revenue_Admin and Scenario_Version.Create First group on canvas that contains Accounting_Period from Service_Revenue_AdminCreate Second group ob canvas that constains Charge_Amount and Billing_IDFilter: NoneSort and Group: no sortingResults:One row for each accounting period. Total accounting periods equals 26, and 26 rows returned by Report Builder. Text at bottom of report states: Total SERVCIE_REVENUE_ADMIN: 1373** Same number as results from SQL query run in management studio baselinedesignresults:** Note, the results are what you see. 1 page, yet 1373 records. I have worked this design many ways and cannot seem to get the desired results. I can create 3 different groups, using billing_id, accouting_period, and then another field to get the correct results, but in many cases, our users don't want to show billing_id. They may want to see all charge amounts by accounting period, and not display the billing_id. |
|
|
jhermiz
3564 Posts |
Posted - 2007-02-16 : 16:29:08
|
quote: Originally posted by Taurkon Ok, here is the detailed version.Dataset sample: **Note white space formatting not working. Billing Id's are last numeric characterAccouting_Period Charge_Amt Billing_Id200401 10545.6100 1 200401 633.8100 2200402 30.1100 1 200402 10817.6800 2200402 31.8500 3200403 -77.6100 1200403 17.1400 2etc.....SQL statement run in Management Studio as baseline:select accounting_period, charge_amount, billing_id from service_revenue_admin order by accounting_period, billing_id Result: 1373 rows returnedsample results returned:Report Builder DesignReport Model Design: Contains 2 entities. 1. Service_Revenue_Admin2. Scenario_Version - related to Service_Revenue_Admin through Scenario_Id (not shown)Report Builder ad-hoc design2 Entities available to user, Service_Revenue_Admin and Scenario_Version.Create First group on canvas that contains Accounting_Period from Service_Revenue_AdminCreate Second group ob canvas that constains Charge_Amount and Billing_IDFilter: NoneSort and Group: no sortingResults:One row for each accounting period. Total accounting periods equals 26, and 26 rows returned by Report Builder. Text at bottom of report states: Total SERVCIE_REVENUE_ADMIN: 1373** Same number as results from SQL query run in management studio baselinedesignresults:** Note, the results are what you see. 1 page, yet 1373 records. I have worked this design many ways and cannot seem to get the desired results. I can create 3 different groups, using billing_id, accouting_period, and then another field to get the correct results, but in many cases, our users don't want to show billing_id. They may want to see all charge amounts by accounting period, and not display the billing_id.
What do you use to write your reports? We use visual studio.net's business intelligence program, I highly recommend it and so does MS. The MS Report Writer you are using is a very basic stripped down version.By the way dont you want to GROUP BY your results according to the Accounting ID ? Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
|
Taurkon
Starting Member
26 Posts |
Posted - 2007-02-16 : 16:37:49
|
Our users write reports using Report Builder. Our users are all experts in their field of business and usually want to view data in many different ways often, so they write their own ad-hoc reports. To teach them how to write reports that a developer would normally write in Visual Studio, and then have them deploying each time is not an acceptable solution to them. I can write the same report in Visual Studio and get the expected results, it is just the results spit out by Report Builder that are screwy! You mean group by accounting_period? Yes, if you notice the design screen shot, you will see that the first grouping is Accounting_Period and the second is Service_Revenue_Admin. |
|
|
jhermiz
3564 Posts |
Posted - 2007-02-18 : 01:04:33
|
Its probably a bug in report builder, as I said I dont recommend using that tool to create reports. YOu may want to put a request into MS about the issue. I wrote up some test tables and a query and created the exact data set you have and get the right results but not using the crappy report builder.Sorry nothing else I can think of :). Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url] |
|
|
Taurkon
Starting Member
26 Posts |
Posted - 2007-02-20 : 09:02:06
|
Did you by chance try Report Builder with your test data? Thanks for you time on this issue. |
|
|
|
|
|
|
|