Using InScope() For Customize Subtotal
Jan 22, 2008
Hello All:
I have the following data:
2000 2001
Child Teen Adult Child Teen Adult
Region1 25 40 35 33 55 12
Region2 50 10 40 20 10 70
Total 75 50 75 53 65 82
and I need the following data
2000
Child Teen Adult Child%
Region1 25 40 35 25/(25+40+35)
Region2 50 10 40 50/(50+10+40)
Total 75 50 75 75/(75+50+75)
I was able to get the Child% column and Total row, except for the cell (75/(75+50+75) ) using InScope() operator.
Can any one help me in this regard.
Thanks,
Vishnu
View 4 Replies
ADVERTISEMENT
Apr 1, 2008
My report has two groups, company and error type for each company.
Company1
Functional Error
Data Error
Other Error
My goal is to show the subtotals for each error types when I show Company's subtotal/total; in the group 1 footer area.
Total for Functional Error:
Total for Data Error:
Total for Company1:
Please help me in figuring out how to do that.
Thank you in advance for your help.
View 3 Replies
View Related
May 16, 2008
In my report I have 3 row groups and two column groups as follows, where measure is number of hours for a given project.
2008/05 2008/06 ........
Demand | Allocated Demand | Allocated
- Project 1 1500 1000
- Department1 500 400
- Employee1 200
- Employee2 200
- Department2 1000 600
- Employee3 300
- Employee4 300
+ Project 2 1200 1000
-------------------------------------------------------------------------------------------------------------------------
Grand Total 2700 2000
My question is, is this possible using a Matrix? I have used matrix in some of my reports but have always used automatic/generic SUM feature it provides.
Note carefully that there are no values for Employees in Demand Column Group. Basically I would have to SUM Department groupings to get the Project level total and then SUM all Project Groupings to get the grand total. The Allocation column is okay since the Employees have values in that column. Can this be done using InScope( ) or some other function rather than simply doing the Generic SUM of Rows and Columns of the matrix which would probably throw error when trying to sum a blank value in demand column.
Thanks in advance.
View 2 Replies
View Related
Aug 7, 2007
Hello!
I have the following structure
Task | User | Value 1 | ..... | Value N | InScope Task | InScope User
--------------------------------------------------------------------------------------------------------------
Task1 User1 0 5 true false (!)
User2 5 3 true false (!)
Subtotal 5 8 true false
Task2 User1 1 5 true false (!)
User2 4 5 true false (!)
Subtotal 5 10 true false
Total 10 18 false false
The last two columns show in which row group the rows are. I have two groups "Task" and "User". I need to define for my purposes if the value are belong to user rowgroup. Unfortunatley =InScope("User") always return false. How I can define if the row value belongs to "User" row group??
View 2 Replies
View Related
Apr 20, 2007
Hello,
I got a matrix with two group columns, G1 and G2
I have totals for the innermost group G2
Article Size Stock Sales S/S
Shirt 31 1 2 2
33 2 1 0.5
...
Total 3 3 (I dont want a value here)
So i did =IIF(INSCOPE("G2"),Sale/Stock,nothing)
The problem is that all the size lines are considered outside the G2 group so i get nothing in all rows insted of only have nothing on the total.
I have installed SP2 of SSRS 2005
If i use Inscope("G1") it works, but i need to work with the G2
Is this a bug? Or am i doing something wrong?
Thank you
View 3 Replies
View Related
Jun 15, 2015
I have a simple matrix. The row group is schoolname. The column group is tweek. and the data field is thours (sum(thours)). on the right side of my matrix, I want to display the Average hours for all the week columns. SSRS can do a sum very simply, but when I use the avg function, I get erroneous results. Do I somehow use the inscope function in the data field ?? I just don't know. and I don't understand how to use the inscope function.
View 2 Replies
View Related
May 30, 2006
Hi guys,
i was developing some custom code to do a running total in a matrix, and i have noticed some odd behaviour with the InScope function. I am doing year on year reporting, so i have two row groups on my matrix: the first is on month (matrix2_Calendar_Month), the second on year (matrix2_Calendar_Year).
I needed to total the number of days covered by the months i was reporting on, so i wrote some very standard code to do this, along with an expression in that column of the matrix:
=IIf(
InScope("matrix2_Calendar_Year"),
CStr( Round( Sum(Fields!Sales.Value / (24 * Code.AddDays( CStr(Fields!Calendar_Month.Value), CInt(Fields!Calendar_Year.Value))), 2)) ,
Code.getBounds()
)
Code.AddDays() calculates and returns the number of days in the month of that year on that row. Code.getBounds simply returns the lower and upper bounds of the array, plus its contents (so i can inspect them). This is what is returned in the report:
Month / Year
Sales
Capacity
% Capacity
Avg $/h
February
2006
3842
7706
49.86%
2.86
2007
0
0
0.00%
0
March
2006
4949
8692
56.94%
3.33
2007
0
0
0.00%
0
April
2006
5160
8154
63.28%
3.58
2007
0
0
0.00%
0
May
2006
3309
8348
39.64%
2.22
2007
0
0
0.00%
0
Total
17259
32900
52.46%
0-8*28,28,31,31,30,30,31,31,28
If you look at the output in the total row, you will see that Code.AddDays() has been called one extra time at the end, with Feb 2006 as its parameters, thus adding an extra 28 days to the running total. Why is Code.AddDays called on the total row, when i should be out of the scope of both the row groups? (Note: this happens for whichever row group i use in the InScope check in the expression).
Here is the custom code used for all this:
Dim numDays()
Public Function AddDays(ByVal month As String, ByVal year As Integer) As Integer
Dim thisMonth As String
Dim upper As Integer
upper = 0
On Error Resume Next
upper = UBound(numDays) + 1
ReDim Preserve numDays(upper)
thisMonth = CStr(year) & "-" & month & "-01"
numDays(upper) = DateDiff("d", CDate(thisMonth), DateAdd("m", 1, CDate(thisMonth)))
AddDays = numDays(upper)
End Function
Public Function TotalDays() As Integer
Dim lower As Integer
Dim upper As Integer
lower = 0
upper = 0
On Error Resume Next
lower = LBound(numDays)
upper = UBound(numDays)
TotalDays = 0
Dim ii As Integer
For ii = lower To upper
TotalDays = TotalDays + CInt(numDays(ii))
Next
End Function
public function getBounds() as string
getBounds = Cstr(LBound(numDays)) & "-" & CStr(UBound(numDays)) & "*" & Join(numDays, ",")
end function
sluggy
View 5 Replies
View Related
Sep 11, 2007
Hi, I have a matrix with 2 row groups and 1 column group.
CGroup1 Val1
CGroup1 Val2
Total
- RGroup1 Val1
RGroup2 Val1
In
In
Out
RGroup2 Val2
In
In
Out
- RGroup1 Val2
RGroup2 Val3
In
In
Out
RGroup2 Val4
In
In
Out
Total
Out
Out
Out
I want to change the row totals at the RGroup2 level. I have put an expression in the measure cell as:
=iif(InScope("matrix1_RowGroup2"), "In", "Out"). Shouldn't the values in the Totals Column on the far right evaluate to "In"? If not, how can I isolate the totals at the RGroup2 level?
Also, I found that when I put =fields!RGroup2.value in the expression for the cell, the Totals Column on the far right is blank but when I put =fields!RGroup1.value the correct value is properly displayed in the Total Column. Why does =fields!RGroup2.value not work?
View 7 Replies
View Related
Jan 10, 2008
Hi to everyone,
By the way, I'm not sure if, I am in the right related forum to address this questions.
My problem is how to customize a primary key id of the table.
Example. I have a two tables customer and product, and my customer table has a customer id. I want to customize my customer id, which for example the starting id will starts CUS-0001...CUS-002 and so on.
And same also to my product table, product id will starts PROD-001..PROD-002 and so on. the digits of my id's is auto incremented.
Thank you for the time of reading my questions.
Your response is highly appreciated..
View 3 Replies
View Related
May 15, 2007
I have a sendmail task following a data flow task. How can I set "To" attribute on the sendmail task before running it ? for example, read a config table and detemrine who the mail should be sent to...
View 1 Replies
View Related
Apr 30, 2008
Hi,
Is it possible to customize the report manager web site so that I can set the report output format to excel by default.
Currently, to get the excel report user has to first select the report criteria and then click the "view report" button which renders the report in HTML format and then only the export to excel option appears.
Is there a way we can get the report exported to excel in one go.
Thanks,
Rajiv
View 1 Replies
View Related
Sep 17, 2007
I would like to use Report Managers interface for choosing reports.
But all of the reports uses different dsu(datasourceuser) and dsp(datasourcepassword) depending on which user that is logon.
I would like to call the interface from a webapplication(where they have the current dsu & dsp).
Is there a way to customize Report Manager to save the dsu & dsp so users don't have to login for each report?
Or could I make a clever transformation from the Windows userid?
Or any other ideas??
View 1 Replies
View Related
Dec 12, 2007
Can I customize the report filters?
I need to use the data from another table (in a Drop Down control) to filter the data of my report instead of having a simple textbox.
How can I do this?
View 7 Replies
View Related
Feb 3, 2008
Hello everyone,i have a web form to take user details.as soon as the submit button is clicked the form is submitting and the new row is being added into the sqldatabase.its fine ..but in the newly added row, i want the user id(primary key and auto generating) to display in different manner.in mytable column(userid),instead of userid auto displaying 1,2,3,4 ...i want it to display in this way.these are all primary keys of rows added.todaydate-username-1 eg(2.2.2008-jack-1)todaydate-usernaem-2 eg(2.2.2008-zak-2)todaydate-usernaem-3 eg(2.3.2008-leme-2)any idea how to achieve this.?thanks.jack.
View 9 Replies
View Related
May 20, 2015
Display customized data based on customized where statement from UDT.
The UDT is a parameter inside of a stored procedure.
Problem:
A parameter from a stored procedure is
@communication communications readonly
This parameter is a User-Defined Table Types (UDT) It contains criteria based on end-user's selection from a filtration functionality from a webpage.
Four example of filtration critera based on four end-users' selection that is located inside of a table below.
Each UDT table contains different criteria:
Number Criteria
------ --------
1 Phone
3 Email
Number Criteria
------ --------
1 Phone
2 Cellphone
3 email
Number Criteria
------ --------
4 None
Number Criteria
------ --------
2 Cellphone
1 Phone
Is it somehow possible to use the criteria's value as a column name in the where statement? I want to filtrate the data of the table datatable based on id, name and the UDT's criteria.
I was enable to apply the criteria inside of a variable by looping the UDT's table but the next thing is to paste it in the where statement after "id=1 and name" below
select *
from datatable
where id = 1 and name = 'Cost'
How should I do it?
[URL] .....
create table datatable (id int,
name varchar(100),
email varchar(10),
phone varchar(10),
cellphone varchar(10),
none varchar(10)
);
[Code] .....
View 4 Replies
View Related
May 7, 2007
Thanks in advance to anyone who can provide insight into this...
I am trying to specify a different stylesheet (other than ReportingServices.css) in the URL for running the ReportManager application; I am using the "rstylesheet=<stylesheetname>" parameter in the URL. However, it seems that no matter which format of stylesheetname I use (i. e, just the stylesheet file name with no extension, stylesheetname + ".css" extension, "/reports/styles/<stylesheetname>", etc.), the ReportManager application only uses the built-in ReportingServices.css stylesheet.
Is there some "magic" to specifying the name of an alternate stylesheet with the "rstylesheet" URL parameter, or does this just not work?
Thanks again!
View 12 Replies
View Related
Nov 7, 2007
Hi,
I'm trying to deal with a way to change the report parameter's default layout.
currently it seems to default to two columns, that's fine until you have a large screen and the "View Report" button is all the way to the right and you have a big chunk of whitespace.
For Example:
Parameter 1 Parameter 2 <View Report>
Parameter 3
I'd like it to show up instead as:
Parameter 1 Parameter 2 Parameter 3 <View Report>
anyone ever tried this before?
View 4 Replies
View Related
May 5, 2008
Is it possible to customize the SQL Server Reporting services home page to add our company Logo and custom title etc...?
Thank you,
View 3 Replies
View Related
Jul 23, 2005
Hello all,I have a stored procedure that prompts the user for beginning date andending date to run a monthly report. The prompt saysEnter_Beginning_Date and Enter_Ending_Date. I want the prompt to sayEnter Beginning Date (Example:1-1-2003) or something like that. Isthere a way to do this?CREATE PROCEDURE dbo.MonthlyReport(@Enter_Beginning_Date datetime,@Enter_Ending_Date datetime)AS SELECT incident, @Enter_Beginning_Date AS BeginningDate,@Enter_Ending_Date AS EndingDate, COUNT(*) AS OccurancesFROM dbo.IncidentWHERE (DateOccured BETWEEN @Enter_Beginning_Date AND@Enter_Ending_Date)GROUP BY incidentGO
View 6 Replies
View Related
Jul 6, 2015
I am working on one of the report. where I need to move the amount across column group.
My data is like this
Project Amount CurrentFiscalMonth DelaybyMonth
A 10 Jul 0
B 20 Aug 2
C 10 Sep 0
Report will be sum up the amount at CurrentFicalMonth grouping on column
But, if the Project is being delayed say by as per the example its 2 months than the amount should be moved from Sep to Oct column for the particular project. User has done it using the Offset function in excel.
Fiscal month starts at July and ends at June. and data source is SSAS cube.
View 4 Replies
View Related
Jul 23, 2005
Hi,I've managed to get a couple of shortcuts on my desktop that log meright into SQL Query Analyzer for whichever particular database I want(using the isql.exe command line options). Now, I want to do a similarcustomization for the SQL Server Enterprise Manager. I want to be ableto open SQL Server Enterprise Manager and have it pop me all the waydown into my particular database/tables view -> e.g. "Microsoft SQLServersSQL Server Group(LOCAL) (WindowsNT)DatabasesmyDatabaseName". I'm hitting a local db server...I've tried saving new consoles (.msc files), but that just doesn't seemto do anything. I've tried using bookmarks, also, and they just don'tdo anything at all when I select them.Any ideas??
View 1 Replies
View Related
Jul 23, 2015
I have a requirement associated with SSRS bar chart.
Data in my DB is like shown below:
A
B
C
Opt1
Data1
10
Data2
20
Opt2
Data1
30
Data2
40
Opt3
Data3
50
Now I would like to build up a bat chart which should have:
Legends:Â Opt1, Opt2, and Opt3
Categories:Â
Data1(showing bars with scores as 10 and 30),
Data2 (showing bars with score 20 and 40),Â
Data3 (showing bar with scores 50 only)
View 3 Replies
View Related
Jan 29, 2007
I need to create the script to upgrade the current named instance of sql 2000 desktop engine to sql server 2005 express edition. I am having difficulty preparing the template.ini and would appreciate help.
[Options]
INSTANCENAME=MY_INSTANCE
SQLBROWSERACCOUNT=NT AUTHORITYNETWORK SERVICE
SECURITYMODE=SQL
SAPWD=music
UPGRADE=SQL_Engine
SQLBROWSERAUTOSTART=1
RSCANINSTALLDEFAULT=0
RSCONFIGURATION=FilesOnly
RSSQLLOCAL=0
I get an error that this file is invalid..Any clues? I am trying to upgrade existing instance of msde 2k to sql express 2005 and uses sql authentication
View 2 Replies
View Related
Mar 15, 2007
Hi ,
Yesterday I Customize Style Sheets for the report manager. Today I tried to customize Style Sheets for HTML Viewer but it doesn't works. I have done all that steps :
- I include the <HTMLViewerStyleSheet> setting into the <Configuration> selection of the rsreportserver.config file and then specify the style sheet I want to use : <HTMLViewerStyleSheet>HtmlViewer2</HTMLViewerStyleSheet>
- My rsreportserver.config file is into the C:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesReportServer folder.
- The style sheet HtmlViewer2.css is located in the C:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesReportServerStyles folder.
I'm using SQL Server 2005.
Can someone Help me ? I have been trying change the style of the toolbar all the day and i start to be desperate !
Thank you.
View 1 Replies
View Related
Aug 17, 2012
The requirement is to customize database admin activities by creating new user group.
Need to create a group of user / dbauser1 which will have restriction in seeing the data but they should be able to alter database - add / remove the data file , increase or decrease the data file space when required.
This requirement came we wanted to create a new dba group they should not be able to any user data / any table but increase / decrease / add / modify space etc.
View 1 Replies
View Related
Jan 3, 2008
hi,
I am new to SSRS. I am doing some report models for Ad-hoc reports. Im my database i have some users and their roles according to my requirement. User should only see the particular reports if he have privilege. how to customize...
User will access Report Builder to do adhoc report.
For example
I have 5 report Models
rptModel1
rptModel2
rptModel3
rptModel4
rptModel5
In my data base there are 3 users.
user1 have privilege to view rptModel1, rptModel3
user2 have privilege to view rptModel4, rptModel5
user3 have privilege to view rptModel2, rptModel5
When Particular user access the report builder, There i want to show only that particular Report models...
is there any posibilities to do this please Help me.
Thanks in Advance...
-Kannan
kannan1017@gmail.com
View 5 Replies
View Related
Mar 7, 2008
I want to customize database maintenance to run only on selected databases based on their status in sys.databases, without having to statically select them in the GUI.
I'm trying to write an SSIS package that will do the following:
1. Query for a list of databases that are not read-only or recovering, etc.
2. Perform database maintenance tasks (e.g., rebuild indexes) on those databases.
I'm doing this because the database maintenance tasks do not provide a way to select databases based on criteria or a SQL query filter.
My package includes an Execute SQL task to get the list of databases, a Foreach loop container to loop through the databases, and then...this is where I get stuck. I can't use the existing maintenance tasks (Rebuild Index, Update Statistics, etc.) because I don't know how to provide an input variable for the list of databases. I'd rather not write dynamic SQL to generate commands for each database object.
Does anyone know how to do this?
Thanks much.
David
View 9 Replies
View Related
Apr 17, 2007
Hi all,
Got a good question to ask. At the moment, I do not have any control over the reporting server webserver. This is due to the company's policy. The webhosting is controled by antoher department.
Anyways, the question is the following:- Is there a way to customize the config file for the htmlviewer (css style sheet, rendering and others) for a specific client without affecting the rest ?
There are about 20 clients on a server, and I am responsible for one of them. I had customized my config file to render or allow only two formats for this particular client. Since I don't have any control over the websever, I just can't replace the config file without affecting the others. How do i do this ? I just want th config file to ONLY affect a certain client's HTMLViewer and not the others. I tried to do some research on this, but came up empty handed.
Thanks !
Bernard
View 4 Replies
View Related
Jul 30, 2015
I have 3 SSRS 2014 (Dev, UAT and Prod). I would like to change background colors of each environment and customize the title 'SQL Server Reporting Services' to ' SSRS Development'.
I prefer to implement both, a background color change and a title change. The reason for this is to clarify to end users which environment they are working with.
Where can I make those minimal changes in SSRS 2014.
View 2 Replies
View Related
Aug 26, 2015
I want to show on Power BI Dashboard a moving average - for example, I want to always show the last 30 measurement of body temperature but it looks like Power BI dashboard shows all measurements I have and compress them - which makes the dashboard ugly.
I tried to customize the X-axis properties but I dont know what I should change the default start/stop properties to (where the default property value is automatic).
[URL]
View 3 Replies
View Related
Apr 25, 2008
How can something like this be done in reporting services? I'm having trouble to get the totals, because if I do Sum(Fields!Yes.Value) + Sum(Fields!No.Value) it will just give me the overall total (133).
Please help guys. I tried with the matrix but it always breaks or just doesn't want to give me the subtotals.
Description
Yes
No
Subtotal
Studies
50
22
72
Works
28
33
61
€¦
€¦
€¦
€¦
View 1 Replies
View Related
Nov 7, 2007
I want to create a subtotal for my results in my table, for example:
=Fields!Animals.Value =Fields!Result.Value
Dogs 3
Cats 4
bird 6
SubTotal 13
If i use =Sum(Fields!Result.Value) i have a error #Error, i don't know how do ir, Someone can help me?
Thank you a lot!
View 12 Replies
View Related
May 28, 2008
Hello,
I have a matrix with subtotal.
I want to hide or show the subtotal by a parameter.
The header of the subtotal is not a problem since it have the "visibility" property.
The problem is that when I'm clicking on the green rectangle to go to the subtotal area itself - It doesn't have the "visibility" property.
So I don't see the header but I see the subtotal date itself.
Any idea on how to resolve this?
Thanks.
View 7 Replies
View Related