Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all 10045 articles
Browse latest View live

moving order of ssrs parameters

$
0
0

In an existing ssrs 2008, I want to add a parameter that is like userid. This will be a value the user enters as a parameter value. I want this user parameter to be the first parameter listed since I want to modify existing parameters to be cascading. I want the other parameters to limit what is displayed based upon the user value entered.

Due to that fact, can you tell me how I can make this new user parameter as the first parameter hopefully without deleting the existing paramters? 


#Error using IIF and divide by zero

$
0
0

I am getting an error in a calculated field that could potentially divide by zero, even though I'm using an IIF.  The column displays in the report as "#Error".  My expression looks like this:

= IIF(Fields!Qty.Value = 0,

"None", Fields!Hours.Value / Fields!Qty.Value)

I have successfully used this approach with INT fields, but this time the Hours field is a NUMERIC(9,2).  My workaround is to do this:

 IIF(Fields!Qty.Value = 0, "None", IIF(Fields!Qty.Value = 0, 42, Fields!Hours.Value) / Fields!Qty.Value)

I guess the 42 is cast to an INT inside the second IIF and the calculation works.

What's strange is that the division would even be carried out in the event of Qty = 0 from the first IIF, because the expression should just evaluate to "None" and that would be that.

Has anybody run into this problem?  Is my workaround the recommended approach?

-Larry

 

passing parameter values to ssrs report

$
0
0

For an existing ssrs 2008 report that is running on a ssrs 2012 report server, I believe the call from the .net application that will call the report server will look something like the following:
https://test.sch.org/AL/att/letter.aspx?schoolyear=2017&schoolnum=341&term=9&milestonecode=005&startdate=12/8/2016%2010:03:06%20AM&enddate=12/9/2016%2012:00:00%20AM&language=ALL&studentlink=ALL&UniqueID=999999

Since this is my first time obtaining parameter values from a call from an application, I have the following questions:
1. Does the name of the parameter need to be exactly like what is passed in the url. For example listed above, there 'schoolyear=2017'. Does the SSRS report name need to be exactly 'schoolnum' or can the name be something else?
2. How does the ssrs report know what parameter field applies to the values listed above?  For example, how does the ssrs report know where 'schoolnum=341' should be applied in the report? Does having the parameter marked as hidden make a difference? Does the order of parameters listed make a difference?
3. There are the first two parameters called admin and userid that are not listed in the url? These 2 parameters have default values. Do I need to pass those 2 parameters in the url? Can you tell me why or why I would not need to pass those parameter values in the url (link)?





Add a cumulative column on a column chart

$
0
0

Hi to everyone,

I create a stacked column chart. On the values window a have a float field "amount"  and on the category fields a have a group called "Type" with values A,B,C. On the Preview I get three columns one for each category value.

however, I want to add a fourth column with the cumulative values for all category values.

I tried through the Variables property option of the category field but I did not manage to overcome the proble.

Does anyone know how to figure out this issue.

Thank you in advance

Report Viewer 130.1700.305 bug? NULL checkbox displayed when 'Allow null value' disabled for Boolean parameter

$
0
0

I have a Boolean parameter in a report and 'Allow null value' disabled for it.

If I view the report via the Report Viewer 130.1700.305 control (sourced from NuGet) it mistakenly displays a NULL checkbox alongside that parameter.

Note that it doesn't do this/displays correctly via the SSRS web portal.

Get Client IP Address and Workstation Name of User Viewing Report

$
0
0

I am trying to get the user who executes (views) a report in SSRS 2008, IP and Workstation Name.  I followed the example at this post but receive the following security error...

Value expression for the textrun ‘Textbox18.Paragraphs[0].TextRuns[0]’ contains an error: Request for the permission of type 'System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

I researched this everywhere, adding Code Group permissions, Permission Sets, etc.

At minimum, does nayone know how to get just the user's IP in SSRS 2008? 

All help is greatly appreciated!  Thanks in advance :)

Bill

How to get the IPAddress and Host Name of the client machine on which reports are being viewed

$
0
0
I am developing reports using Reporting Services 2008. I want to get the IPAddress and the Host Name of the client workstation on which the reports are being viewed using "Report Manager" URL. I have tried using the below .NET methods but i have not been able to get the IP Address of the client browser/workstation on which the reports are being viewed. Can someone please help me with this.

A) Dim ipHost As System.Net.IPHostEntry
ipHost = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName())
Return ipHost.AddressList(0).ToString()

B) HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]


C) System.Web.HttpContext.Current.Request.ServerVariables("REMOTE_ADDR")

SSRS 2014 - A network-related or instance-specific error occurred while establishing a connection to SQL Server - Works in Dev, Not when deployed

$
0
0

Hello,

When I deploy a SSRS data source to a development SSRS server and test the Data source the following message is thrown

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

This is limited to 2 SQL Servers endpoints.  When I use different SQL Servers I get connected. 

When I try to connect to problem SQL Servers

  • Success - SSMS - connects to the destination SQL Servers with Win Auth and a SQL Acct
  • Success - VS2015 (dev) - I can connect to the destination SQL Server using the same data source with Win Auth and a SQL Acct and get a result set.  Success
  • Failure - SSRS 'Test Data Source' fails with message above - 'Failure'
  • Success - SSRS Change Data Source to a different SQL Server, connection works

This is a weird one.

Thanks for any assistance - Covi


Mark Covian


Cannot read the next data row for the data set

$
0
0

Hi,

My report runs fine when I view in VS, data shows fine when I run the query in the data window, but when I publish it to the server, I get the above error. I am running SQL server 2005 RTM and I have re-deployed the entire solution.

Any ideas?

SSRS 2016 KPIs no longer refresh after upgrade to CU2

$
0
0
I set up a refresh plan for my KPIs on SQL Server 2016 RC and it worked fine. After installing the CU2 upgrade, the KPIs no longer seem to refresh when the underlying dataset is refreshed via the cache refresh plan. Does anyone know what the issue is and how to get the KPIs to refresh again?

SSRS chart filter

$
0
0

Good day,

I have a chart on my report which displays for the current month. I wish to add 2 other charts (copies) for the previous 2 months.

So, in example above, if I pull report for October, I want to see same chart for previous 2 months; i.e. September and August.

How can I achieve this?

Please assist

sqlserver 2014 data tools installation

$
0
0

Hello,

I installed VisualStudio 2013 and sqlserver management studio 2014 but sql data tools compatible for 2014 are not installed.I tried searching for it and I found in some links that business intelligence will get installed in VS 2013 version but for me it was not true. In my company I cannot install any software downloaded from internet. Can you please let me know if I am missing any and how can I get SSDT compatible with sql 2014

Thanks

Creating Chart for Report

$
0
0

I’m trying to create a Chart in my Report, and cannot fathom how to do it.

I think I’ve tried every combination, but cannot get the required result.

I also tried it in Excel, but still had no joy.

Given the following sample data set:

Less Than  6 Months

CANADA

ClassicMvp

5

Less Than  6 Months

UNITED KINGDOM

ClassicMvp

1

Less Than  6 Months

UNITED STATES

ClassicMvp

20

Less Than  6 Months

CANADA

ClassicStandard

8

Less Than  6 Months

UNITED KINGDOM

ClassicStandard

3

Less Than  6 Months

UNITED STATES

ClassicStandard

34

Less Than  9 Months

CANADA

ClassicMvp

2

Less Than  9 Months

UNITED KINGDOM

ClassicMvp

15

Less Than  9 Months

UNITED STATES

ClassicMvp

23

Less Than  9 Months

CANADA

ClassicStandard

10

Less Than  9 Months

UNITED KINGDOM

ClassicStandard

4

Less Than  9 Months

UNITED STATES

ClassicStandard

41

Less Than 12 Months

CANADA

ClassicMvp

1

Less Than 12 Months

UNITED KINGDOM

ClassicMvp

3

Less Than 12 Months

UNITED STATES

ClassicMvp

17

Less Than 12 Months

CANADA

ClassicStandard

4

Less Than 12 Months

UNITED KINGDOM

ClassicStandard

1

Less Than 12 Months

UNITED STATES

ClassicStandard

39

I wish to create a Chart which looks like this simulation [with inaccurate heights],

with the columns grouped by Period, stacked by Country and Product,

with the height of each section representative of the Count :

Stacked Multi-column Chart

Thanks, Dave

SSRS 2016 - Custom Auth support and documentation?

$
0
0

Hi,

Does anyone have any further information regarding the use of custom auth in SSRS 2016.

The official documentation for SQL 2016 custom auth has references to the depreciated report manager. It seems the documentation has been copied from SSRS 2012 with no update. See here; https://msdn.microsoft.com/en-us/library/cc281383.aspx

Also no responses from MS on https://connect.microsoft.com/SQLServer/feedback/details/2664276

SQL 2016 RTM documentation states custom auth is supported?

Any help or guidance is appreciated.

Regards

Alex


Alex Young

SSRS2016 Mobile Reports - Explicit typing / Prevention of stripping leading zeros?

$
0
0

I'm having a scenario in SSRS2016 where I'd like to use a custom map shape and link corresponding sales. The MapKey is in the format "0180" (Swedish municipality code) and I have my data as "Sales By Municipality Code" but as soon as I import the data into the Mobile Report Publisher the municipality code column gets auto-detected as a double - which then prevents me from linking the sales to the map/shape.

I've tried both a shared dataset and an Excel file as a data source with the same result. I've tried different methods to cast/define the column in Excel, no luck. I've even tried to mix in some strings into the otherwise numeric municipality code (e.g."AAAA"), it now gets detected as a string but the leading zeros still get stripped.


Any ways around this issue (apart from modifying the shape file)? Thanks in advance!


How do I use 'DECLARE' in SSRS 2012?

$
0
0

Hi,

This will be my first report to be created with 'DECLARE' in the SQL query.

How do I use or convert this in SSRS? Should I convert this to Stored Procedure? If so, do I need to create SP in SSRS or SSMS?

If anyone can provide a sample of the converted SP from below query and show how to use that in SSRS, would be of great help.

Here is the SQL Query -

Declare @Current_College_year Varchar(20)
,@Prior_College_year Varchar(20)

Set @Current_College_year = '2015-16'
set @Prior_College_year = '2014-15'

select
CYR.College_YEAR
,CYR.SPE_ALT as CYR_EStatus
,CYR.College_DIS_CODE
,DIST.DIS_NAME
,PYR.College_YEAR
,PYR.SPE_ALT as PYR_EStatus
,PYR.College_DIS_CODE
,ISNULL(CYR_COUNT,0) as CYR_COUNT
,ISNULL(PYR_COUNT,0) as PYR_COUNT
,(ISNULL(CYR_COUNT,0)-ISNULL(PYR_COUNT,0)) as Count_Diff
,case when ISNULL(PYR_COUNT,0) = 0 then 0  else cast((CYR_COUNT-PYR_COUNT)/cast(PYR_COUNT as numeric(8,2)) as numeric(8,2)) end *100 AS Percent_Diff

from

(select
ml.SPE_ALT,ml.SPE_SORT
,College_DIS_CODE
,College_YEAR
,count(distinct s_key) AS CYR_COUNT
from
TELECOLL_R.ML_ATTEND as ml WITH (NOLOCK)
where College_year = @Current_College_year
and  enrolled_fs_id = 'Yes'
group by ml.SPE_ALT,ml.SPE_SORT,College_DIS_CODE,College_YEAR
)CYR
left join
(
select
ml.SPE_ALT,ml.SPE_SORT
,College_DIS_CODE
,College_YEAR
,count(distinct s_key) AS PYR_COUNT
from
TELECOLL_R.ML_ATTEND as ml WITH (NOLOCK)
where 1=1
and College_year = @Prior_College_year
and  enrolled_fs_id = 'Yes'
group by ml.SPE_ALT,ml.SPE_SORT,College_DIS_CODE,College_YEAR
)PYR
on CYR.College_DIS_CODE = PYR.College_DIS_CODE
and CYR.SPE_ALT = PYR.SPE_ALT
left join [TELECOLL_USRDATA].[XL_DIS] as DIS WITH (NOLOCK)
on CYR.College_DIS_CODE = dist.DIS_ID
order by Percent_Diff
Thank You.

[SSRS] History Snapshot Creation

$
0
0
In order to create history snapshots using SQL Server Reporting Services 2014, we are calling CreateReportHistorySnapshot APIwhich returns a historyID (that is a datetime with seconds accuracy). We store that historyID  to later render it through report viewer.

This works well as long as we do it in a single thread, if we try to scale and generate the reports in multiple threads, the snapshots that are generated in the same second and corresponds to the same ReportID gets overridden.

Is a way to avoid the snapshots being overridden?

Or this is a limitation of SSRS?

Add Comments for SSRS 2016

$
0
0

Hi, 

I have just installed SSRS 2016 SP1 in native mode but I cannot see the Comments section. What could I be missing? 

Please let me know if any suggestions or any helpful indicators. 

TIA! 

Limit report from being exported to excel

$
0
0
We have a report that we do not want to be able to be exported to excel. Is there a way, just on one report to limit the types it is exported to
DBA

How can I have a Report in my 2005 Report Server with a 2010/01 nameSpace?

$
0
0
I am trying to edit a report in my 2005 Report Server, But when I open it up in VS2005 it error because it has a Namespace of 2010/01. I can open it up in VS2013 and edit it but it won't Deploy to a 2005 Report Server(Where it came from)
Viewing all 10045 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>