I have a table that is a very general layout so I can expand upon values later in the future easily. Basically it looks like this:
Code:
ID PlayerID Ability Score
1 1 STR 18
2 1 DEX 17
3 1 CON 16
What I'm trying to do is create a stored procedure where I pass in a PlayerID and it will return a result set of
Code:
STR DEX CON
18 17 16
It doesn't appear that there's a way in SQL Server 2000 to SELECT a column AS a variable. I suppose I could go about creating a temporary table, but seems like an odd work around to get it to work. Any suggestions? Or am I just missing something obvious?
Is there any way to give Title to matrix row and column groups?
I know If i have only one row i can give title in the textbox provided at the top of the Rows group area. But i have more than one row and group and more than one column group. i want to give title to all of them.
In a title of a column of a table, I put a too long text, with sorting, but when I spread (display) the report has a problem on text of the title of the column there.
The probleme settles (arises) when I activate the sorting to post (show) the image of sorting.
I have a query to get data group by High, Medium and Low so only three rows will be returned.
select sum(case .... ) then 1 else 0 end) as [Column1], sum(case .... ) then 1 else 0 end) as [Column2], sum(case .... ) then 1 else 0 end) as [Column3] from sometable Group by High, Medium, Low
I want to manually add High, Medium and Low to each row's first column. the final result should look like:
Column1 Column2 Column3 High 123 123 123 Medium 123 123 123 Low 123 123 123
I have a SSRS report in which we have a subreport i am trying to hide the link in excel after exporting from report documents, in report my logic is working fine but when we are deploying in SharePoint application then it is not working. Report is not opening.
Example, suppose you have these 2 tables(NOTE: My example is totally different, but I'm simply trying to setupthe a simpler version, so excuse the bad design; not the point here)CarsSold {CarsSoldID int (primary key)MonthID intDealershipID intNumberCarsSold int}Dealership {DealershipID int, (primary key)SalesTax decimal}so you may have many delearships selling cars the same month, and youwanted a report to sum up totals of all dealerships per month.select cs.MonthID,sum(cs.NumberCarsSold) as 'TotalCarsSoldInMonth',sum(cs.NumberCarsSold) * d.SalesTax as 'TotalRevenue'from CarsSold csjoin Dealership d on d.DealershipID = cs.DealershipIDgroup by cs.MonthIDMy question is, is there a way to achieve something like this:select cs.MonthID,sum(cs.NumberCarsSold) as 'TotalCarsSoldInMonth',TotalCarsSoldInMonth * d.SalesTax as 'TotalRevenue'from CarsSold csjoin Dealership d on d.DealershipID = cs.DealershipIDgroup by cs.MonthIDNotice the only difference is the 3rd column in the select. Myparticular query is performing some crazy math and the only way I knowof how to get it to work is to copy and past the logic which isgetting out way out of hand...Thanks,Dave
Using SQL Server 2000. How can I refer to one alias in another column?E.g., (this a contrived example but you get the idea)SELECT time, distance, (distance / time) AS speed, (speed / time) AS acceleration FROM dataNote how the speed alias is used in the definition of acceleration alias but this doesn't seem to work.
Hello All,Is there a way to run sql select statements with column numbers inplace of column names in SQLServer.Current SQL ==> select AddressId,Name,City from AddressIs this possible ==> select 1,2,5 from AddressThanks in Advance,-Sandeep
hey guys, so i have my website, everything is ok, until i have to put in a title field, along side my description. so far i have this code which searches in the description, how can i make it so i can search in the title as well SelectCommand="SELECT [Stock_ID], [cat_id], [description], [size], [selling_price], [qty], [picture1] FROM [tbl_stock] WHERE ([description] LIKE '%' + @description + '%')"> Any help would be great Cheers Jez
I'm building a stored procedure to edit a row in my database but first I'm wanting to check for null values in the parameters and set them to their respective value in the row I'm attempting to edit.
I'm building a stored procedure to edit a row in my database but first I'm wanting to check for null values in the parameters and set them to their respective value in the row I'm attempting to edit.
I'm new to these forums. If this is not the right place to post this question, please let me know where I should ask. :)
Anyway, I have a report that is grouped something like this:
Team Location Score
TEAM 1 #Loc# #Total#
Home 10
Away 14
Away 8
NULL 0
NULL 0
Home 14
TEAM 2 #Loc# #Total#
Home 10
Away 14
Home 19
NULL 0
Home 14
TEAM 3 #Loc# #Total#
Away 7
Away 12
For each team grouping, the header columns needs to perform an action on the grouped records to determine the text.
The #Total# header is easy -- here I want a total of the points ( =Sum(Fields!Points.Value) ). No problem.
The #Loc# header is the problem. What I want to do is to count the number of "Home" values in the group (so Team 1 location reads "Home (2 of 6)", and Team 2 location reads "Home (3 of 5)"). If there are no "Home" values, I want to use the "Away" value (so Team 3 location reads "Away (2 of 2)").
Can someone tell me how I can create a custom code function that will allow me to iterate through the values of the grouped records from the group header textbox? I assume I need to be able to create a custom aggregate function of some kind, but I don't quite know where to begin.
i am having a problem querying a field in a database to show all records where the title has a keyword within the title. Select * FROM tblCourse WHERE title =@Search But not the full title just a keyword within the field? Thanks
I need to create a report showing the title the first and last name of all sales representatives-This is what I have so far but am having difficulty retrieving ONLY the "Sales Representatives" Titles.
Select Firstname, Lastname, Title From Employees Where ???
I have created a report in SQL Server Business Intelligence Development Studio 2005. I need to add a report title above the parameters area. Is that possible?. please help me
The output should be like
_____________________________________________________________________ Report Title
How do I change the report title via an expression? I have a parameter that can contain 1 of 3 values and want to change my Report Title accordingly. Can I nest the IIF statements somehow or how can I accomplish this?
Is there anyway that I can have a multi-line chart title? I have even tried placing a text box over the title part of the chart that is multi-line, although this appears to work once the report is deplyed and viewed in a web browser the text box appears below the chart and the chart then has no title.
Hi All, I have created a report in SQL Server Business Intelligence Development Studio 2005. I need to add a report title above the parameters area. Is that possible?. please help me
The output should be like
______________________________________________________________________ Report Title
i dont't know how to select row with max column value group by another column. I have T-SQL
CREATE PROC GET_USER AS BEGIN SELECT T.USER_ID ,MAX(T.START_DATE) AS [Max First Start Date] , MAX(T.[Second Start Date]) AS [Max Second Start Date], T.PC_GRADE,T.FULL_NAME,T.COST_CENTER,T.TYPE_PERSON_NAME,T.TRANSACTION_NAME,T.DEPARTMENT_NAME ,T.BU_NAME,T.BRANCH_NAME,T.POSITION_NAME FROM (
This maybe a very simple question but somehow I cannot find the way to do it.
1. How to delete Subtotal in Matrix by using Report Designer (Visual Studio). It looks simple, but after I click on the Total and right click - delete. Somehow only the text "Total" being deleted and not the whole row. I still can see the grey cell in my matrix table
2. How to create link from the value in Total in Matrix We can add the link in the Data via navigation and jump to another report by passing the parameter, but the Total value will follow whatever we have set in the Data. Which means that it will passing the parameter as well. How to enable the link via the Total value and remove all the previous filter and jump into my other report without any filter value ?
3. How to create drill up function in matrix ? For example I have 2 Reports, 1st report is Region (AP, EMEA, US), 2nd Report is Country When I click on 1st report and click on AP, it will open up another report and show country like Hongkong, Indonesia, Singapore Now, I want to click on AP in 2nd report and going back to 1st report by showing all AP, EMEA, US. When I click on AP in 2nd report, I am going to pass the parameter of Region there and still I want to show AP, EMEA, and US.
4. How to show the Title in Matrix ? I cannot find a way to show the Field name as the title in the Matrix for column grouping. Anyone can help me ?
I am new to this level of coding in SQL SERVER 2012, but I am looking to update the TITLE_YEAR field in the temp table with the Year the employee is in that title. For example for employee 11127 the data should look like this:
EMP_IDTitle DateValue TITLE_YEAR 3 Senior Consultant 2009-01-01 00:00:00.0001 3 Director 2010-01-01 00:00:00.0001 3 Director 2011-01-01 00:00:00.0002 3 Director 2012-01-01 00:00:00.0003 3 Director 2013-01-01 00:00:00.0004 3 Senior Director 2014-01-01 00:00:00.0001
On SSRS 2008 R2 I've set the Action of a pie chart title to Go to URL. When I run the report in the browser the title can be clicked and all is well.
However, when I export/render the report to pdf, the hyperlink disappears. I've tested with a small URL, but that fails as well. I've also tried the same URL in the Action of a text box and that works fine. But, I don't want a text box on top of the chart (which comes with its own positioning issues) and use the more elegant approach of having the link in the title instead.
I'm assuming this is a SSRS limitation? Re-writing the url or making it shorter does not have any effect.
I am trying to build a reportviewer so that I could use reporting services (due to company's security policy).
I am getting a VERY weird error here.
Before I get on ahead, here is the scenario.
I had created a rdl that will give a certain report based on two parameters. At the moment, I didn't assign the parameters to any default values since i don't want the report to start running. These two parameters are run based on stored procedures to get the starting date and an ending date.
I had tried to view this report on Report Manager and it works.
I had set the parameters this way. NOTE: ReportingServer is the disgused name of the reportserver I am using for privacy purposes
'PDF Rendering extensions don't have any useful DeviceInfo settings
'the toolbar shown below only affects HTML rendering
Dim devInfo As String = "<DeviceInfo><HTMLFragment>True</HTMLFragment><JavaScript>True</JavaScript><Toolbar>True</Toolbar><Parameters>True</Parameters></DeviceInfo>"
Dim credentials() As ReportingServer.DataSourceCredentials = New ReportingServer.DataSourceCredentials() {}
Dim showHideToggle As String = ""
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings() As ReportingServer.Warning = New ReportingServer.Warning(0) {}
Dim reportHistoryParameters() As ReportingServer.ParameterValue = New ReportingServer.ParameterValue() {}
Dim streamIDs() As String = Nothing
Dim sh As ReportingServer.SessionHeader = New ReportingServer.SessionHeader
rs.SessionHeaderValue = sh
But when I started building this reportviewer.aspx, it gives me this error on the following line:-
Code Snippet
results = rs.Render(ReportPath, format, historyID, devInfo, Parameters, credentials, _
{"This report requires a default or user-defined value for the report parameter 'start_date'. To run or subscribe to this report, you must provide a parameter value. --> This report requires a default or user-defined value for the report parameter 'start_date'. To run or subscribe to this report, you must provide a parameter value. --> This report requires a default or user-defined value for the report parameter 'start_date'. To run or subscribe to this report, you must provide a parameter value."}
this is occuring on the line where it needs to render the report.
As simple as it is, i tried the following:-
NOTE: some variables has been changed to protect some identity.
Code Snippet
Dim ReportRenderer As New RenderSQLReports
Dim Parameters As int.rrd.sqlreporting_test.ParameterValue() = Nothing
{"Default value or value provided for the report parameter 'start_date' is not a valid value. --> Default value or value provided for the report parameter 'start_date' is not a valid value. --> Default value or value provided for the report parameter 'start_date' is not a valid value."}
This is probably occuring because the date I had provided is not found in the list of dates. I really don't want to default a date at the moment, to allow the user to select a date.
So I finally gave it a date...... a valid date.
Code Snippet
Dim ReportRenderer As New RenderSQLReports
Dim Parameters() As Reportingservices.ParameterValue = New Reportingservices.ParameterValue(1) {}
Parameters(0) = New Reportingservices.ParameterValue
Parameters(0).Label = "start_date"
Parameters(0).Name = "start_date"
Parameters(0).Value = "10/1/2004 12:00:00 AM"
Parameters(1) = New Reportingservices.ParameterValue
var rep = new Report(1, 16, pageHits, false, docMapIds); <-where error is occuring.
if (parent != self) parent.OnLoadReport(rep);
}
//-->
</script>
It did show the report, but I don't understand why it is still getting an error here. Moreover, I didn't even get the HTMLViewer too even when I had assigned the devinfo....
Really need some help here, as this is quite urgent.... I am at a loss at this, and maybe that there is an option that I am not seeing or something I am missing. please help .
Bernard-So close yet so far, How cruel are the software bugs-
having on mind that this is my Target server: what is the way of creating shared folder in order to perform operation from the title (and, of course, to continue with installation of packages etc...)? SQL SERVER 2008 R2