SSRS Report Question To Calculate Overall Percentage For Individual Employee
Feb 22, 2008
Hi All,
I have an SSRS reports that uses a list table to display the name of staff and the name of the department that he supports as well as the number of hours they support the department. Below would be a sample of the report:
Now I would like to add 1 more column to show the percentage (%) of time spent at the department for the employee. Therefore each employee % of time spent will be 100% spread over all the supported departments. So the report will be as below:
I am creating matrix report with grouping on WEEK and Fiscalyearweek,I need to calculate of difference between FY14W01,FY15W01 ande percentage of those..how to calculate in ssrs level.
I have requirement in which i need to calculate percentage value based on billamount and concession amount..to calculate the percentage part and show the o/p.
SELECT PP.KID_ID_NO_V,(PP.FIRSTNAME_V + SPACE(1) + PP.LASTNAME_V)AS [PATIENT_NAME],BM.TOTAL_AMOUNT_M AS [BILL_AMOUNT],BM.CONCESSION_AMOUNT_M AS [CONCESSION_AMOUNT],BM.BILL_AMOUNT_M AS [TOTAL_AMOUNT], FROM BILL_MASTER BM INNER JOIN PATIENT_PROFILE PP ON BM.PATIENT_ID_N=PP.PATIENT_ID_N WHERE BM.BILL_SETTLED_C='Y'
I need to calculate percentage [COUNT(ALERT_RECEIVED_DATE) FRAUDCT,over SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK] I tried my best but I cant come up with the solution.
Please, help.
Thk
SELECT CONVERT(nvarchar(10),dateadd(d,-day(ALERT_RECEIVED_DATE) + 1,ALERT_RECEIVED_DATE),101) PERIOD, COUNT(ALERT_RECEIVED_DATE) FRAUDCT, SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK, SUM(CASE WHEN FRAUD_DECISION ='D' THEN 1 ELSE 0 END) DECLINED, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) PENDING_EXCEPTION, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION='D' THEN 1 ELSE 0 END) DECLINED_EXCEPTION FROM TBLFRAUDFINDER O
I need to calculate percentage [COUNT(ALERT_RECEIVED_DATE) FRAUDCT,over SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK] I tried my best but I cant come up with the solution.
Please, help.
Thk
SELECT CONVERT(nvarchar(10),dateadd(d,-day(ALERT_RECEIVED_DATE) + 1,ALERT_RECEIVED_DATE),101) PERIOD, COUNT(ALERT_RECEIVED_DATE) FRAUDCT, SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK, SUM(CASE WHEN FRAUD_DECISION ='D' THEN 1 ELSE 0 END) DECLINED, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) PENDING_EXCEPTION, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION='D' THEN 1 ELSE 0 END) DECLINED_EXCEPTION FROM TBLFRAUDFINDER O
I want to be able to display the percent of growth for databases on the server. My query has the file sizes and names and the dates, its done monthly . How do i create a field with the growth % from one month to the next, or from one date entry , to the next. so it appears like this
2006 2007 2008
23000 % growth 3400 %growth 20000
keep in mind, this is how it is displayed in reporting services with a matrix(crosstab)
Here's my query
Code Snippet SELECT RC_STAT.dbo.Tbl_Database_Statistics.AutoId, RC_STAT.dbo.Tbl_Database_Statistics.Server_Description, RC_STAT.dbo.Tbl_Database_Statistics.Database_Size_Datetime, RC_STAT.dbo.Tbl_Database_Statistics.Database_Description, RC_STAT.dbo.Tbl_Database_Statistics.Database_Size_Mb, RC_STAT.dbo.Tbl_Database_Statistics.Database_Location, RC_STAT.dbo.Tbl_Database_Statistics.Database_File_Name, DbSTAT.MonthlyDBTotal FROM RC_STAT.dbo.Tbl_Database_Statistics INNER JOIN (SELECT Database_Size_Datetime, Server_Description, Database_Description, SUM(Database_Size_Mb) AS MonthlyDBTotal FROM RC_STAT.dbo.Tbl_Database_Statistics AS Tbl_Database_Statistics_1 GROUP BY Database_Size_Datetime, Server_Description, Database_Description) AS DbSTAT ON DbSTAT.Server_Description = RC_STAT.dbo.Tbl_Database_Statistics.Server_Description AND DbSTAT.Database_Description = RC_STAT.dbo.Tbl_Database_Statistics.Database_Description AND DbSTAT.Database_Size_Datetime = RC_STAT.dbo.Tbl_Database_Statistics.Database_Size_Datetime
so I have some data that looks like this: semester weekOfSemester counts Fall 2006 4 1 Fall 2007 4 6
I want to eventually graphically represent this data over the 18 weeks of the semester in terms of Fall 2007. I need to show change weather positive or negative as a percentage against Fall 2006. Can someone help with the sql?
This code displays dates, File name, and File size for four seperate dates 11/20/2007 , 11/30/2007, 12/30/2007 and 01/31/2007 . I'm trying to show the percentage growth from date to date (ie 11/20/2007 -11/30/2007 percentage growth)
is there a way i can get the previous date file size for each entry, so i can have a variable for the calculation. Or i can get the calculate it within this code (ie database_size_mb / ((database_size_md ) where database_size_datetime -1) *100 or whatever the formula is for percentage growth.
Code Snippet SELECT Database_Size_Datetime, Database_file_name, Database_Size_Mb FROM RC_STAT.dbo.Tbl_Database_Statistics AS Tbl_Database_Statistics_1 GROUP BY Database_Size_Datetime, Database_file_name, Database_Size_Mb
I need to calculate “NET_SALES” and “MARGIN_PERCENT” for each month of the current year … the following returns the same values for each month in the list, which are for the current month. Taking out the GROUP BY line works fine for an overall number.
I have a requirement,Create employee hierarchy(tree structure) with two parameters 1)OrganizationId 2) EmplyeenameIf i select one employee, it should show only the employees reporting to him. URL....I created one level, if i select one employee , i am not able to see the reporties names.
I have one view, i written below query to get employee hierarchy based on orgid and employee name..
If i select employeename it shoukd show employee reporties(under employees and below employee reporties like tree structure)
It is running fast in SSMS Level, but it is taking more time in SSRS(Sql Sever Report Services), If i run this query in SSRS,Some times System not responding.
Declare @OrgId int Declare @EName varchar(30) Set @OrgId=56793 Set @EName='ABCD' Select EmpId
Sample Query : SELECT 'A' [Type], 1 AS [NUMERATOR] , 2 AS [DENOMINATOR] UNION ALL SELECT 'B' [Type], 2 AS [NUMERATOR] , 4 AS [DENOMINATOR] UNION ALL SELECT 'C' [Type], 3 AS [NUMERATOR] , 6 AS [DENOMINATOR]
[Code] ...
I need to show the ratios beside each bar (shown in red) as shown in the above diagram.
Hai, Iam new to SSRS please help me, my question as follows:
in my table fields are departmentid, studentexpected, student name, date attendance,sortorder while grouping(drill down) the departmentid column , iam displaying student name, date attendance its working fine. problem: while grouping(drill down) the studentexpected resultant column i need to display student name, date attendance fields.
in my database studentexpected column displaying studentlist like 28, 56,250, while grouping(drilldown) the individual lists like 28,56,250, i need to dispaly student name and date attendance fields.
my problem is while grouping(drill down) the departmentid column iam getting result for studentlist 28 as iam getting 28 student names and 28 attendancedates, this functionality is correct.
but while grouping(drilldown) the studentexpected resultant column iam not getting (assume for studentlist 28) 28 studentnames and 28 attendancedates.iam geting only 2 studentnames, 2 attendance dates, but i need respective list columns
in database iam taking sordorder as 7.
iam facing difficulty at the time filtering the studentname and attendancedates columns in table properties
which data i have to give in filter column for displying 28 student names and 28 date attendances fields at the time of grouping studentexpected column?
take below references:
database prview:
departmentid studentexpected student name date attendance sortorder
101 28 jack 12-31-2007 7
dapartmetid drilldown report preview:
departmentid studentexpected student name date attendance +101 28 jack 12-31-2007 -- --- -- -- -- --- -- -- (assume 28 student names and 28 date attendance) My Problem:
like above preview i have to dispaly respective studentexpected column results,
departmentid studentexpected student name date attendance 101 + 28 jack 12-31-2007 -- --- --- ---- (here while drilldown the studentexpected resultant column like 28,56,250 ,i need to dispaly respective studentnames and respective date attendances)
which data i have to set in filter column in front end , how to solve above problem? help me
I created a view that i want to use in ssrs.In the view there is a column for running balance.In the table contain transaction of inventory with their quantity.
"SELECT TOP (100) PERCENT ITEMNMBR, TRXSORCE, DOCTYPE, DOCNUMBR, DOCDATE, HSTMODUL, UOFM, UNITCOST, EXTDCOST, TRXQtyInBase, (SELECT SUM(TRXQtyInBase) AS Expr1 FROM dbo.INVTRXB AS b WHERE (DEX_ROW_ID <= a.DEX_ROW_ID) AND (ITEMNMBR = a.ITEMNMBR)) AS ENDQTY FROM dbo.INVTRXB AS a ORDER BY ITEMNMBR, DOCDATE"
If i run the query on sql or use the view on ssr. The end qty is not showing accurately.I ran it on another database it works perfectly. Then i noticed that the dex_row_ID of the second database is sequential as the date. But for the initial database it was not sequential as with the date.
I'm using custom code in an expression to calculate the median of a column. It works fine up to a point. Like if there are 35 rows in the result set (or up to some number) but when it gets bigger results, like 42 rows or more it doesn't work, the median is -1. This is the custom code I'm using (found online).
I don't see anything limiting the count, but it comes back with a -1 median so I think that means the count is not > 0.
I have a column in the report called arrival_to_complete which is like: 53 min
I create a column with expression: =MAX(Code.AddValue(Val(Fields!Arrival_to_complete.Value))) to fill the array using just the number part of the column. Then in the report I have 'Median =' <expression>, where the expression is: =Code.GetMedian() I run the report with 2 parameters a begin date and an end date. I don't see where any of this should be limiting the median calculation so I don't get why it works sometimes and not other times.
Dim values As New System.Collections.ArrayList Function AddValue(newValue As Decimal) If values is Nothing Then values = New System.Collections.ArrayList End If values.Add(newValue)
I am trying to create a report in SRS that will calculate a Composite Score based on the Sum of other scores and then that Sum is divided by 12.
Here is a copy of the Query I have created to calculate the numbers I want to use, but when I create the expression in SRS the calculations don't come out correctly. The expression that I use in SRS is at the bottom of the Script.
Thanks in Advance
--6 Trait_03052008.sql
--Pull test scores for 6 Trait out of Campus for SRS reports.
SELECT s.lastname+','+' '+s.firstname AS Student, e.grade, sm.lastname+','+' '+sm.firstname AS Teacher, sc.name AS School,
t.name AS Test, t.code, ts.rawscore,
CASE WHEN t.name = '1 Ideas' AND ts.rawscore IS NOT NULL THEN CAST(ts.rawscore * 3 AS Numeric)END AS IComp,
CASE WHEN t.name = '2 Organization' AND ts.rawscore IS NOT NULL THEN CAST(ts.rawscore * 3 AS Numeric) END AS OComp,
CASE WHEN t.name = '3 Voice' AND ts.rawscore IS NOT NULL THEN CAST(ts.rawscore * 2 AS Numeric)END AS VComp,
CASE WHEN t.name = '4 Word Choice' AND ts.rawscore IS NOT NULL THEN CAST(ts.rawscore * 2 AS Numeric)END AS WComp,
CASE WHEN t.name = '5 Sentence Fluency' AND ts.rawscore IS NOT NULL THEN CAST(ts.rawscore AS Numeric) END AS SComp,
CASE WHEN t.name = '6 Conventions' AND ts.rawscore IS NOT NULL THEN CAST(ts.rawscore AS Numeric)END AS CComp
FROM testscore ts
JOIN student s ON s.personid = ts.personid
JOIN roster r ON r.personid = s.personid
JOIN test t ON t.testid = ts.testid
JOIN calendar ca ON ca.calendarid = s.calendarid
JOIN enrollment e ON e.enrollmentid = s.enrollmentid and e.calendarid = ca.calendarid
JOIN section se ON se.sectionid = r.sectionid
JOIN course c ON c.courseid = se.courseid AND c.calendarid = ca.calendarid
JOIN school sc ON sc.schoolid = s.schoolid
JOIN staffmember sm ON sm.personid = se.teacherpersonid AND sm.schoolid = ca.schoolid
WHERE t.code LIKE '6%' AND c.calendarid =50 AND c.homeroom = 1
GROUP BY s.lastName,s.firstName,e.grade,sm.lastName,sm.firstName,sc.name,t.name,t.code,ts.rawScore
ORDER BY [Student], t.code, t.name DESC
Expression being used in SRS to calculate the Composite Score.
I have done the following and a domain user would not access report created a login to the SQL server to the user (this SQL Server is where data source DB is)went to site setting in Report Manager and made this use a system userright clicked on report folder and made this user in the browser roleeven checked that in the report in question, the user is already in the browser role Still the user would not access the report! "User .......... does not have required permission" is the error message I am getting.
I have written a report visual studio. The report has 10 multi-value parameters that pull data from their individual data sets within the reports. When running the report from within Visual Studio it renders fine. There are no errors reported, only a warning related to a pathname I have use to retrieve image data and display on the report.Deployment of the report is error free.When I view the report I briefly get the "Loading" splash window, but then nothing. None of the headers or static text is displayed. The results window is blank.
The report defaults all the parameter values. In trying to debug the issue I have found by reducing the number of parameter values the report will render. Once I have all the values added, the report does nothing.Below is the query being used for the report. The where clause in the query shows the parameters being used and the syntax.We are running on Windows Server 2008 R2 and SQL Server 2008 R2.
Ralph SELECT RTRIM(a.ITEMNMBR) AS Style, RTRIM(a.ITEMDESC) AS Description, a.ITMSHNAM AS UPC, c.LOCNCODE AS Store, d.LISTPRCE AS ListPrice, a.CURRCOST AS Cost, a.USCATVLS_1 AS [Main Category], a.USCATVLS_2 AS Market, a.USCATVLS_3 AS [Alternate Retail], a.USCATVLS_4 AS Country, b.ITEMXTRAS_1_Type AS Type, b.ITEMXTRAS_2_Finish AS Finish, b.ITEMXTRAS_3_SubCategory AS SubCategory, b.ITEMXTRAS_4_Department AS Department,
I have a ssrs report having 2 tables in with 4 columns in each. When I go to export option in preview I can see all data coming in one excel sheet, But I am trying to get 2 tables in 2 different pages in Excel when I export.First page of excel comes with first table data with 4 columns and second page of excel comes with second table data with 4 columns .
We have an Office SharePoint 2007 site, we developed a couple of web parts and added them to our site. We used SQL Server Reporting services 2005 as our reporting solution. The reports are hosted on the report center and when we need a report, we open it by sending a URL requesting the report, passing the report parameters in the URL query string. So the report is filtered based on the parameters passed from the web parts.
But since best practices say that you should host reports directly under SharePoint, by configuring the reporting services to run in the SharePoint integrated mode. We followed the steps and installed SharePointRS and we finally succeeded to publish the reports to a SharePoint folder, but we had a limitation: we are unable to pass the report parameters internally to the report hosted in SharePoint. If we passed them in the query string as the report center case, SharePoint neglects them totally. So the question is: how can I pass parameters internally between a SharePoint web part and a SQL server 2005 reporting services report hosted in SharePoint?
I'm wondering how to print a SSRS report without bringing up a report viewer. Is there way to print(PDF format) the SSRS report in the web application( .net ) directly from the "print" button without bringing up a report viewer?
I'm encounter lately some weird behaviour of SSRS in BIDS as well as after deploying on Reporting Server. I'm running basic classical SQL SSRS Reports with Oracle DB connection. My reports have header and footer pagination and well defined report layer configuration. All the reports are simple based on one table and some basic parameters passed to query.
In query builder from BIDS from data tab, the query is running fine without any other execution delays. Also the query is runnign fine in PL/Dev environment. When I switch in "Preview" mode the report hangs in execution and just showing "Report is being generated" without any resuts. After a while is generating an execution error (after 20 min).
The behaviour is the same after deployment on Report Server . I now...here it comes...the problem is intermitent...some times the report is working...but most of the times it hangs on execution. I checked the report from top to bottom and nothing's wrong from design perspective.
On other reports I don't have this problem and I don't understand where to start to investigate.
I am trying to develop a report from cube,and it has one drill through report.when i click on sales amount field on main report,then it open the drill through report with details.Here i passed the **(category,subcat,product)parameters(Cascaded)** to drill through report in action part of main report.In my main report i have two columns .
when i click on 100, parameters are passed & it open the detail report correctly, but when i click on 50,the values for subcat parameter is not getting values in detail report and same as the product also.
How do I get data on my linked report based on my grouped subtotal and grand total from the main report. The subtotal and grand total are calculated columns.
I have a 3 columns in my matrix in the SSRS summary report. Actn_COAST, ActnCITY and NumbOfAccts.
The following is code for my summary report. The results are shown below.
SELECT Distinct ActnCITY, Count(ACCT) as NumbOfAccts, CASE WHEN ActnCITY in ('NY', 'OH', IN, 'NJ', 'SC', 'NC') THEN 'EAST COAST' WHEN ActnCITY IN ('CA'. 'NV', 'UT', 'WA', 'OR') THEN 'WEST COAST' ELSE 'OTHER' END AS Actn_COAST
FROM tbl1 where ACTNDATE between @STARTDT and @EndDT
Code for my detail report contains the following SQL
SELECT * FROM tbl1 where ACTNDATE between @STARTDT and @EndDT AND @ActnCITY = ActnCITY
I have linked my report based on the NumbOfAccts column. I am able to get data if I click any of the NumbOfAccts values related to the state I want. However when I am not sure how to make the subtotal and grand total work. I want when I click on the subtotal of either coast, I should be able to see records of that coast e.g., if I select 37 I should be able to see all the records in East Coast. If I click on the Grand Total, I only want data related to those 2 coasts.
Is there a way to subscribe SSRS report using dynamic parameters for email and trigger the report from autosys job so that report should generate the exact time the job is triggered.Let me describe, my SSRS report should be triggered on success of one autosys job. i need to send email parameter and time of report schedule from this autosys job.
Hi, I'm having problems navigating from one report to another one if the second report has a multi-valued report parameter. When I navigate to the second report, I don't pass any parameters, but I get an error "parameter is missing a value" for the multi-valued report parameter. I have it setup as allow "multi-value" and "blank value". Any idea what the issue might be? Thanks.
How to display the logo in middle of report header , The logo is embedded in the Image folder . The column of the report are static. we are using SSRS 2008