Hi. First, I am VERY new to SQL Queries and Reporting. A co-worker is "mentoring" me, but I am trying not to fill his day with questions.
I HAVE read the help files, searched the forums, looked at books, and done general web searches, but any answers I have found have either no addressed my issue, or the answers are way over my head.
Furthermore, the (SQL 2000) DB is built into proprietary software (ISS Proventia Intrusion Prevention System), and the database may NOT be modified outside of the software.
With that said, I am querying multiple tables within the DB. I am using Business Intelligence Dev Studio, and placing my queries on a reporting server maintained by my co-worker. My goal is not only to get a solution, but also to UNDERSTAND it so I can continue to learn. Of course, the solution takes precedence over my understanding!
My Primary key is dbo.SensorData1.SensorDataID. dbo.SensorDataAVP.AttributeText returns a different number of rows, containing different data depending upon the value of dbo.SensorData1.AlertName. I need to return all rows, hence the Left Joins.
Depending upon my query, I might have 1000 events, and due to the many rows of data from dbo.SensorData1.AlertName I might return 20,000 rows (or more.)
I would like to return a report that "groups" events by dbo.SensorData1.SensorDataID., BUT, rather than simply providing these in groups, provides me single rows with a plus sign next to each even, that can be expanded for the additional data.
My co-worker has discussed sub-tables, but since I cannot modify the DB, it will be difficult / complex to do so, AND, for me to understand.
One of my queries follows. I have thirteen queries, total, that use various groupings of attributes. I have chosen one of the more complex combinations so I can generally apply the concept to the queries with fewer parameters more easily.
Note, I'll be asking the same question on www.sqlservercentral.com in the hopes of getting an answer I can understand one of these two places - If you answer here, there's obviously no need answering there answering there.
I have a table with a row group "Sales Area" that lists customers per sales area. There is one column with the sales per customer and another column with the planned sales per customer.A third column "Under Plan" is a simple calculation that compares the two Report Items of the sales to the plan and puts a 1 there if plan is higher. My issue is how to get the total of the group "Sales Area", to display the group total of all customers that are under plan. SSRS doesn't let me use aggregate functions on group totals;Unfortunately I cannot pre-calculate the "Under Plan" figure in the query, since this example is a simplified overview (the customers is a distinct count for example...)
How can I calculate a subtotal for a Report Item? I have a textbox(lets call it "PlusMinus") in the detail section of my table, which is a calculated textbox of two others (lets call them "Budget" and "Spent"). So, PlusMinus = (Budget - Spent). What I would like to do is get a subtotal for PlusMinus. I have tried several ways, using Sum() or RunningValue, even tried to write code, but I can't seem to get it right. Any ideas??
I'm having an issue creating a report that can group & sum similar items together (I know in some ways, the requirement doesn't make sense, but it's what the client wants).
I have a table of items (i.e. products). Â In some cases, items can be components of another item (called "Kits"). Â In this scenario, we consider the kit itself, the "parent item" and the components within the kit are called "child items". Â In our Items table, we have a field called "Parent_Item_Id". Â Records for Child Items contain the Item Id of the parent. Â So a sample of my database would be the following:
Item's 2 & 3 are child items of "Kit A", Item 5 is a child item of "Kit B" and Item 6 is just a stand alone item.
So, in my report, the client wants to see the SUM of both the kit & its components in a single line, grouped by the parent item. Â So an example of the report would be the following:
Name | Available Qty -------------------------- Kit A | 15 Kit B | 25 Item 4 | 100
select top 15 count(*) as cnt, state from table group by state order by cnt desc
[code[...
Can the above three queries be combined into one and still be fast, if so how?What i am trying to go is an item count, by group, similar to ones Inbox in Outlook.
I have a matrix with two row groups and one column group with about 6 items in it. I have about 2100 rows at the lowewst row group level. This report was built solely for excel export. The first row group has about 20 items and controls the visibility of the other group. When I toggle the visibility of the second row group, how can I make the the header of the first row group copy down for each row of the other row group? The first row group is the Section and the second is Mnemonic.
I have a table with a group. I have one row of the group that is the header for the detail section. How can I suppress the row header in the group if there is no data in the detail section for a group value? I was thinking something along the line of setting the visibilty of the row header to an expression based on the existence of data in the detail, but don't know how to go about this.
How could one do this? I understand you could use the COUNT() function, but I'm not sure which object's visibility would best support this. All that I've tried (subtotal area, group visibility) do not seem to work.
If you change the visible property on the subtotal textbox that RS adds, it will only 'blank out' the area where the subtotal row would have been - this doesn't achieve the desired effect of saving space.
Let me first describe my report: I have the following table
Header Group 1 row--There is a textbox that in this row that when toggled makes visible the two below group 1 rows and the detail row. Group 1 row Group 1 row Detail row Group 2 row-- This row has a textbox that can hide the below group 2 row. Group 2 row-- This row contains a subreport.
Currently, I have a parameter that allows the user to conditionally collapse or show the tables' information for printing purposes so the user doesn't have to go through and click on so many plus signs. My problem is I would like to use a parameter to conditionally hide both of the Group 2 rows so that the user cannot view or click on them. The information in Group 2 is extra and not always needed, so I would like to provide the user with a way to hide this information when they go to view the report. However, I imagined this would be easy enough. I went to group2's visibility tab through the table interface and set the expression to "=IIF(Parameter!ShowIndexes.Value, FALSE, TRUE)". However, when I view the report the report is hiding the detail information as well as the Group2 rows.
I have several nested sub-total groups. Depending on a report parameter, I may want to suppress one of the sub-totals. This one group is not the lowest group in the hierarchy and, when I hide it, all the groups "below" it become hidden too. I only want the one group to "disappear", not any others. Is there a way to accomplish this other than creating two versions of the report?
I have sql server 2000 that was working fine until today,today I opened EM and under sql server group where used to be all my information now there is NO ITEM, nothing shows(database,Nothing) .no items under SQL SERVER GROUP. But my application connected with sql server is running without any problem insert record and show all data. ERROR MESSAGE: A connection could not be established to sql server-2000- Reason: Cannot open user default database. Login failed
Please vrify SQL Server is running and check your SQL server registration properties(by right clicking on the Win-2000-Server node and try again)
PLEASE what that happens. please iam afraid help me now iam waitting now Thanks
I am using SQL Server 2000. I am logging on local machine. When I open "SQL Server Enterprise Manager," I only see following: Console Root --> Microsoft SQL Servers --> SQL Server Group --> (No items)
The server is running properly and applications are able to access the database. Also, I can run "Query Analyzer" and view all databases.
Please help to resolve the issue to view items in SQL Server Group. Thanks, Suraj.
I have main reports and also sub reports in the same project [folder]. I don't want to show sub reports in the reports drop down list. Can you please let me know how to do it?
Installed the Northwind database for data to practice with. I'm trying to combine data from several tables to make the orders table more readable. Meaning, I'm trying to replace the EmployeeID field with the combination of the firstname and lastname fields from the Employees table. Everything works fine until I try to sum the Unit price field from the [Order Details] table. Using just a SUM() function or the Select statement below causes the error and any combination of fields in the Group By command don't correct it. It's clear that I'm doing something wrong, I'm just not sure how to get the data I want or use the group by command properly. Query below:
Select o.OrderID, c.companyName, e.firstname + ' ' + e.lastname EmployeeName, o.orderdate, s.companyName, o.Freight, o.shipName, o.ShipAddress, (Select Sum(od.UnitPrice) from [Order Details] od where od.OrderID = o.OrderID)as Amount from orders o, customers c, Employees e, Shippers s, [Order Details] od where o.CustomerID = c.CustomerID
[Code] ....
Running the first query (with the select statement) works, but returns a row for each of the the items that was ordered for that OrderID and NOT using the Group By. I would like to have the SUM() of the items ordered in one row. Is this possible?
Let's say I have the following table:entry product quality1 A 802 A 703 A 804 B 605 B 906 C 807 D 808 A 509 C 70I'm looking for a way to find the average "quality" value for aSEQUENTIAL GROUPING of the same Product. For exmple, I need anaverage of Entry 1+2+3 (because this is the first grouping of the sameproduct type), but NOT want that average to include row 8 (which isalso Product A, but in a different "group".)I'm sure it can be done (because I can describe it!), but I'll be amonkey's uncle if I can figure out how. I would imagine it wouldinvolve some sort of running tally that references the next record asit goes... to see if the product type has changed. Perhaps use of atemporary table?Muchas gracias!!Cy.
Can anyone help me with the expression I need to use in order to hide a table with no rows? I have put my table inside a rectangle with the idea that I would just hide the rectangle if there weren't any rows but I can't find any examples of what expression I can use to specify the no rows condition.
ID                      Customer              Type                 TypeNUm 100                     Tiger                    Item                   T100  100                      Tiger                    Item                   T200 100                     Tiger                    Item                   T300 100                     Tiger                    Shiper                  SAAA 100                      Tiger                   PO                      POAAA 200                      Panera                 GL                  WE 200                      Panera                 PO                  POBBB
The reftypes are not always the same, what I need is to get it in this form
ID                      Customer              Type             TypeNUm 100                     Tiger                    Item                   T100,T200, T300 100                     Tiger                    Shiper                  SAAA 100                      Tiger                   PO                      POAAA 200                      Panera                 GL                     WE 200                      Panera                 PO                    POBBB
I just asked you about how to hide the sub report from showing it in the drop down list. I have done it with the report manager [Report properties--> general --> Hide in Listview]. I am using RSBuild tool to automatically deploy the reports.I don't know what modification I have to make in the RSBuild code to incorporate this new functionality[Hiding sub report]. Can you please let me know how to do it?
I am using the following code, The description property is working correctly. But the Hide in List view property is not working. Property[] properties = new Property[2];
Property Prop1 = new Property(); Property Prop2 = new Property();
I have lot of information to display on one report. I am trying to come up with a reasonable layout, that could include all the information on one page without over whelming the user. Essentially I would like to divide the report in three sections, ideally with a collapse/expand functionality. Is it possible with Reporting services. How?
I created a report which has duplicates on one field. I want the report to display the duplicates, but cannot figure out how. Anywhere I have found where there is a "Hide Duplicates" option I have it turned off (in matrix properties), but the report matrix still hides the duplicates. I don't understand why this would happen since the other fields on the same record are not duplicates. I tried grouping but that was no help.
The query in the dataset DOES return the duplicates as expected.
I have developed a custom report item that works fine in design and preview mode while in Visual Studio. I cannot get it to show up on my deployed reports. Here's what I have done so far:
1. Deployed the report using Visual Studio
2. updated the rsreportserver.config file with the following entry:
I've also tried using the StrongNameMembershipCondition with no better results.
4. The dll and its dependencies are copied to the bin directory of the report server.
5. When I load a report with this custom report item on it, the report loads fine with no errors or warnings in the log file (even with verbose tracing). The area where the custom item should be is just white. It's almost like Reporting Services isn't registering the item correctly.
This is particularly frustrating because the report works fine in Visual Studio - apparently I configured that correctly. Any suggestions would be greatly appreciated. I'm stumped.
We sell & ship packages that contain multiple items within them. The actual package (we call it the "parent item") is in the same table as the items within it ("child items"). If the record is a child item within a package, its "ParentId" field will contain the ItemId of the package.
So some sample records of a complete package would look like this:
ItemId's 2 & 3 are items contained within the ItemId 1 package.
Now however, the client wants us to build a report showing all packages (all items where ParentId is NULL) however, they want to see the QtyAvailable of not only the package but the items as well (a total of 15 when using the example above), all grouped into a single line. So a sample report line would look like this:
Name | Available Qty -------------------------- Package A | 15 Package B | 100
How can I do a SELECT statement that SUMS the "QtyAvailable" of both the parent & child items and displays them along with the package name?
I am wondering if someone has some experience with hiding columns in a Matrix report. I have got two details columns: "Yr to Yr Credits Growth€? and "Yr to Yr Credits Growth %" and those two columns return only one value "N/A" for the earliest year since there is nothing to compare to. Thus, I don't really need them for the earliest year. On top of detail columns, I have got three matrix groups: matrix1-Year, matrix1-Quarter and matrix-Date. Once those two detail columns are hidden, I would like obviously resize (shrink) those three matrix groups columns to reflect the fact that the detail columns were hidden.
I'm working on a scheduling report to display work to be completed on each day. I have each day iteration as separate subreports by adding day values to "Today()"Â I'm trying to hide subreports that return as Sat or Sun.
Here's what I'm using to define my WeekDayName=WeekDayName(Weekday(DateAdd("d",1,Today())),True,0)
What I would like to do is =WeekDayName(Weekday(DateAdd("d",1,Today())),True,0) = 'Sat' OR WeekDayName(Weekday(DateAdd("d",1,Today())),True,0) = 'Sun' but I get an error when I attempt that.
I'm entering this under Sub-Report Properties - Show/Hide based on Expression using Report Builder 3.0.
I have a main report and a subreport. If the subreport doesn't have any data then I hide it, but the main report still shows the white space of where the subreport would show up if it had data. So how can I get rid of the extra white space in the main report?
I have a query that returns the data about test cases. Â Each test case can have multiple bugs associated to it. Â I would like a query that only returns the test cases that have all their associated bugs status = closed.For instance here is a sample of my data
TestCaseID TestCaseDescription  BugID BugStatus 1         TestCase1            1    Closed 2         TestCase1            2    Open 3         TestCase2            11   Closed 4         TestCase2            12   Closed 5         TestCase2            13   Closed
How can I limit this to only return TestCase2 data since all of that test case's bugs have a status of closed.
I am having a main report having two subreports, say M1,S1 and S2 respectively.
The issue is S2 normally tend to go beyond one page, for all pages except first page of the of the subreport I am getting the page header and footer blank,
Actually this is not loading the ReportItems that are used in main report but it shows text boxes containing strings for eg . "My Name" and date functions eg Today()
I have built a report using the Report Model but want to be able to collapse rows as is possible with the Toggle and Hidden attributes in normal reports. Can this be done?
I am using SQL Server 2005 Reporting Services and have successfully created and deployed a Custom Report Item to use instead of the standard Chart Control.
This new Item works fine in both Report Designer (Visual Studio) and when generating Reports on the Report Server
However, I have a requirement that the same chart style must be available in Report Builder. Unfortunately, when using Report Builder to create a new report I can only select Tabular, Matrix or Chart style, and the chart option uses the standard style which is not suitable.
I cannot see any obvious way of including a Custom Report Item within Report Builder, so I have 2 questions :
Can I use a Custom Report Item in Report Builder? None of the samples or tutorials that I have found give any indication of whether this is possible.
I'm totally new to SSRS2005 and I was wondering if I could extend the existing report items. For instance, I'd like to add a few extra properties to the textbox report item. I tried wrting a custom Textbox control that inherits from System.Windows.Forms.Textbox. When I imported the dll in VS, the new textbox showed up in the toolbox, but it was grayed out.