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

Sharepoint dropping link to Data Source for SSRS reports

$
0
0

I have published SSRS reports to sharepoint and used the Reporting Services Report viewer to present the reports on a Page.  Everything works fine for the day, however in the morning, when I go to view the page, I get an error message 

  • The report server cannot process the report. The data source connection information has been deleted. (rsInvalidDataSourceReference)
When I go to the report and manage data connections, I can see the appropriate data connection, when I click on it I get the properties for that data connection and the path to the data connections folder has been deleted???  I can't figure out why this is doing this.  I get the same error if I just double click on the report and try to open it.


Top 5 and Bottom 3 with colours in SSRS

$
0
0

Hi All,

I have to display Top 5 values in 'Green' and Bottom 5 in 'Red' out of some data.

Ex: my data is as below 

 
IDMarks
198
262
389
497
592
667
770
880
985
1077
1179
1272
1371
1478
1555
1656          

expected result is : if the marks are >= 80 then 'Green' (pick only top 5)  if marks are <= 70 then 'Red' (pick bottom 5) else 'Black'

As per my data even though we have values >=80 for more than 5 students display only top 5 in Green and same rule applies for Bottom 5 that means

ID 's : 1 ,3 , 4 , 5, 9 and their marks in Green (pick only Top 5 ) even though we have 6 students who got >=80

ID's : 2 , 6, 16 , 15 and their marks in Red (Bottom 5 but we have only 4 students who got <=70 )

Please let me know if you want more details,

Thanks,

Sam

RDLC report page break

$
0
0
i have used rdlc report. how can i set the page break in report

Add Sum and Average

$
0
0

Hello,

I am having trouble with calculating AVG in a matrix. I have done the subtotal but I would like to know how to calculate the Average. I would also like AVA below the Total.  I had a look at this blogg in the link below to help me but I really got confused

https://munishbansal.wordpress.com/2008/12/23/customizing-subtotal-functionalityusing-inscope-function-in-matrix-reports-ssrs/

I have also added an image oh how the matrix looks like.




Is there anyway that a sub-report of a report can pass any data back to the main report?

$
0
0

(This may be a dumb question but here goes.)  

I have a report with a number of sub-reports (SQL Server 2012).  The sub-reports have tables that can vary considerably in length.  A certain somebody wants the report to contain a table of contents at the beginning of the main report, containing the actual page number of the start of each sub-report, the page number generated automatically by SSRS.  (We customarily export these reports to PDF.)  

Everything I've read so far seems to indicate that it is impossible to pass anything back from a sub-report to a main report.  I was hoping I could update a shared data set using Custom Code within a sub-report but that appears to be a dead end as well. Other programmers within my organization have supposedly also spent time researching this but without success.

Suggestions?

Cache a temporary copy of the report using Impersonation

$
0
0

I have a report whose parameters are limited by the user who is logged in. Ex. if a user had full access they would see all 100 hospitals in our hospital parameter, if another user had limited access they might only see 5 - this will vary largely on who is logged in. The data source that drives these parameters are set as follows: Credentials stored securely in the report server, username and password are entered and Impersonate the authenticated user after a connection has been made to the data source is checked.

This all works great. I now want to cache this report for X minutes. So I goto Properties/Execution and select 'Cache a temporary copy of the report. Expire copy of report after a number of minutes'. Applying this gives me the following error: Credentials used to run this report are not stored.

In the example above, I would like to cache 100 versions of the report (because there are 100 hospitals) so I can guarentee that no matter who is logged in, they get a cached version.

How do I go about achieving this?

Report won't cache if I use User.UserId

$
0
0

I pass a parameter value to a dataset using User.Userid and the report won't cache. If I hard code the user's name than the report will cache.

How do I get the report to cache using User.UserId as the dataset parameter value?

Pass date to cte through reporting services report

$
0
0

I have the following situation, I have a report that works great! and the user can put a date into the parameter and it will produce the report, but can i also get that date put into the cte?...my 2 query's are below, i really like this cte as it will provide a total that i need for the dashboard i am building.

1.  User enter a date on the report, and this query runs;

SELECT     TOP (100) PERCENT { fn HOUR(DateTime) } AS TIME, AVG(CASE WHEN TagName = 'Keller_Hypochlorite_Area.NaOCL_Tnk1_Lvl_Gal' THEN [Value] END)
                       AS [Keller HypoChlorite Tank1]
FROM         dbo.v_AnalogHistory
WHERE     (DateTime BETWEEN DATEADD(dd, 0, DATEDIFF(dd, 0, @DateParam1)) AND DATEADD(ss, 59, DATEADD(mi, 59, DATEADD(hh, 23, DATEADD(dd, 0, 
                      DATEDIFF(dd, 0, @DateParam1)))))) AND (wwResolution = 60000) AND (TagName = N'Keller_Hypochlorite_Area.NaOCL_Tnk1_Lvl_Gal')
GROUP BY { fn HOUR(DateTime) }
ORDER BY TIME

I have gotten this cte to work;

WITH CTE AS (

SELECT    TOP (100) PERCENT  { fn HOUR(DateTime) } AS TIME, AVG(CASE WHEN TagName = 'Keller_Hypochlorite_Area.NaOCL_Tnk1_Lvl_Gal' THEN [Value] END)
                       AS [Keller HypoChlorite Tank1]
FROM         dbo.v_AnalogHistory
WHERE     (DateTime = CONVERT(DATETIME, '2015-06-11 00:00:00', 102) AND DateTime <= CONVERT(DATETIME, '2015-06-11 23:59:59', 102)) AND 
                      (wwResolution = 900000) AND (TagName = N'Keller_Hypochlorite_Area.NaOCL_Tnk1_Lvl_Gal')
GROUP BY { fn HOUR(DateTime) }
ORDER BY TIME

)
SELECT  CTE.TIME, prev.[Keller HypoChlorite Tank1]  as PreviousValue,
CTE.[Keller HypoChlorite Tank1],
Case when prev.[Keller HypoChlorite Tank1] IS NULL then 0 
when CTE.[Keller HypoChlorite Tank1] < prev.[Keller HypoChlorite Tank1] then prev.[Keller HypoChlorite Tank1]-CTE.[Keller HypoChlorite Tank1]
Else 0 end as Calculateresult

FROM CTE
LEFT JOIN CTE prev ON prev.TIME = CTE.TIME - 1

but would like to use the following in the date field in the cte, is this possible?....thanks

BETWEEN DATEADD(dd, 0, DATEDIFF(dd, 0, @DateParam1)) AND DATEADD(ss, 59, DATEADD(mi, 59, DATEADD(hh, 23, DATEADD(dd, 0, DATEDIFF(dd, 0, @DateParam1)))))


Mark Jankowski


SSRS Matrix Aggregate Values and rounding error

$
0
0
I am using SSRS 2014. I'm using a matrix instead of a tablix because it allows me to have dynamic columns. In the example I'm showing, two of the columns use the sum function to get the total counts per practice. The third column contains percentages so I averaged for the total but the value is inaccurate compared to the value I would get if the divided the the two totals that are sums of the counts. Is there a way for me to specify that I want to divide the total counts numerator divided by the total counts denominator?

Here's an example report output with the percentage column averaged (inaccurate):
PCP            numeratordenominator percentage
John Smith  66             104  63.46
Tom Jones   4                36   11.11
.
.
.
Jane Doe     1       1       100
Total         708          1005       72.3

So the 72.3 value is from Avg(metricvalue)
I would like to do this instead: % total = 708/1005, which equals 70.5 - a significant difference.

The metricvalue column is what is the value for every number above (Because it's a matrix).

Can I do this? Please let me know if you need additional information from me or if I have been unclear.

Thanks in advance!

SSRS - Zoom and Print control are not visible in IE11, Firefox and Chrome. Works in older versions of IE

$
0
0

It seems the features are disabled when using any of the above because of compatibility issues with scripting/ActiveX not being properly supported by the FireFox and Chrome.

I believe the control determines the browser you are using is not IE and will not render the controls to prevent unexpected behavior because if the lack of ActiveX support. This can be seen when you compare the HTML of a page using IE8 and that of either IE11, FF, Chrome you'll see that the HTML for a zoom drop down control will show up in the IE8 browser and not in the others.

As for IE11 it presents itself as a Mozilla browser. eg: "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"so when the control see's this it wont generate any of the controls believing the browser can't support it, even though IE11 should certainly be capable of doing so. I wanted to know if this is correct and if this is a bug?

Browser Support for ReportViewer"The ReportViewer Web server control is used to embed report functionality in an ASP.NET Web application. The type of browser used to view the application determines the kind of functionality that you can provide in a report. Use the table provided in this topic to find out which of the supported browsers are subject to report functionality restrictions."

The page mentions that the following wont be supported by other browsers The following features are not supported in third-party browsers:

  • Document map
  • Searching within the report
  • Zoom
  • Fixed table headers
  • The progress indicator for report processing (a green spinning wheel) is not available for server reports, or for locally processed reports that are configured for asynchronous processing.

<rsweb:ReportViewer 
ID
="ReportViewer1" runat="server" Visible="true" Height="100%" 
ShowZoomControl
="True" ShowPrintButton="True"Width="100%" ProcessingMode="Remote" ShowCredentialPrompts="False" 
ShowParameterPrompts
="False"DocumentMapCollapsed="False" ShowBackButton="True" ShowRefreshButton="False" 
InteractivityPostBackMode="AlwaysSynchronous"ShowExportControls="False" BackColor="#c4dcfb" AsyncRendering="false" 
WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
SplitterBackColor="#C4DCFB" ShowDocumentMapButton="True" DocumentMapWidth="20%"></rsweb:ReportViewer>



Compatibity of SQL Sever 2008 R2 with SharePoint 2013 for SQL Server Reporting Services & PowerPivot

$
0
0

Hi Guys,

In my development box, I have my SQL server 2008 R2 and SharePoint 2013 installed, now am not able to configure the reporting services and Powerpivot services for SharePoint 2013. On searching a lot on internet I found that SQL server 2008R2 is not compatible with SharePoint 2013 for reporting services, below is the link:

https://msdn.microsoft.com/en-us/library/gg492257.aspx

Is that so ?? If yes, is there any way we can get SSRS reports to work in SP 2013.

Cheers,

Amit

Colour Formatting Based on Conditions

$
0
0

I have an issue in trying to format rows base on conditions. Below is a replication of the tables and the select statement.

CREATE TABLE #CompareVal
(CompareValID  INT          Not Null
, ValName      NVARCHAR(75) Null
, Vehicle      INT          Null
, Driver       INT          Null
);
GO

INSERT INTO #CompareVal(CompareValID, ValName, Vehicle, Driver)
VALUES(1,'ABC Company Value',10, 15)

SELECT * FROM #CompareVal


CREATE TABLE #GroupStatistic
(StatisticID      INT          IDENTITY(1,1)
, CompanyName     NVARCHAR(75) Null
, [Description]   NVARCHAR(75) Null
, VehicleAvalible INT          Null
, DriverAvailable INT          Null
);

INSERT INTO #GroupStatistic(CompanyName, [Description], VehicleAvalible, DriverAvailable)
VALUES ('APC and Sons', 'Something..', 5, 7)
     , ('ABC Camp limited', 'We deliver..', 15, 15)
	 , ('Silas and Sons', 'Anything goes.', 10, 7)
	 , ('Richard and Co', 'Helping you all the way.', Null, Null)
	 , ('Kayla and Jane', '', 0, 3)
	 , ('James and Jane', '', 1, 0)

SELECT * FROM #GroupStatistic

SELECT CompanyName
     , [Description]
	 , ISNULL(CAST(VehicleAvalible AS NVARCHAR(30)),'N/A') AS VehicleAvalible
	 , ISNULL(CAST(DriverAvailable AS NVARCHAR(30)),'No Driver available') AS DriverAvailable
FROM #GroupStatistic

  UNION

SELECT '' AS CompanyName
     , 'Group Value Standard' AS [Description]
	 , CAST(Vehicle AS NVARCHAR(30)) AS VehicleAvalible
	 , CAST(Driver AS NVARCHAR(30)) AS DriverAvailable
FROM #CompareVal


DROP TABLE #GroupStatistic
DROP TABLE #CompareVal

 

  1. First issue, James and Jane does not have a driver available and that should show "No Driver available"
  2. I am to compare values in VehicleAvailable and DriverAvailable to the first row - (Group Value Standard row) so that when a value is less than the value in first row, it should be Gold, if equal to, Blue and if greater than then, Red.
  3. The first row is to be Black

In other for me to be able to compare, I added columns like so:

SELECT #CompanyName
     , [Description]
	 , ISNULL(CAST(VehicleAvalible AS NVARCHAR(30)),'N/A') AS VehicleAvalible
	 , ISNULL(CAST(DriverAvailable AS NVARCHAR(30)),'No Driver available') AS DriverAvailable
	 , 0 AS TotalVehicles
	 , 0 AS TotalDrivers
FROM GroupStatistic

  UNION

SELECT '' AS CompanyName
     , 'Group Value Standard' AS [Description]
	 , CAST(Vehicle AS NVARCHAR(30)) AS VehicleAvalible
	 , CAST(Driver AS NVARCHAR(30)) AS DriverAvailable
	 , Vehicle
	 , Driver
FROM #CompareVal


And my expression for "VehicleAvailable" column is :

=Switch(Fields!Description.Value = "Group Value Standard" AND Fields!VehicleAvalible.Value = Fields!TotalVehicles.Value, "Black" , Fields!Description.Value = "Group Value Standard" AND Fields!VehicleAvalible.Value < Fields!TotalVehicles.Value, "Black" , Fields!Description.Value = "Group Value Standard" AND Fields!VehicleAvalible.Value > Fields!TotalVehicles.Value, "Black" , Fields!Description.Value <> "Group Value Standard" AND Fields!VehicleAvalible.Value < Fields!TotalVehicles.Value, "Gold" , Fields!Description.Value <> "Group Value Standard" AND Fields!VehicleAvalible.Value > Fields!TotalVehicles.Value, "Red" , Fields!Description.Value = "Group Value Standard" AND Fields!VehicleAvalible.Value = Fields!TotalVehicles.Value, "Blue" )

This doesn't work as I am comparing integer against text value. How do I format to get result like the below image?

Thank you


Zionlite


Grouping Data in a Field

$
0
0

Hello,

I am creating a report that shows orders created by our employees but I am having trouble with one employee.  She changed her last name this year and so in the report, it shows a line her with her maiden name and one with her new name.  Is there a way to combine all the data from both names into one name so it appears on one line and looks like a single person instead of two. 

Thanks!


Changing credential used for SSRS data source programatically

$
0
0
I am looking command (cmd/powershell/c#) for setting/updating credential for SSRS data source.

Parameter is missing a value

$
0
0

Hi there,

 

I have an issue where I need to set a whole bunch of internal parameters' values to the result of a dataset first executed with the report...nothing new or majestic about it.

 

The problem is that the 'First dataset', under some parameter values, return no records..it is empty (which is fine). But this meas that these internal parameters error my report as the 'NEED' a value even though I have specified a default, I still get the 'Paremeter X is missing a value' error. I just want the other datasets, which are reliant on these erroring parameters to either execute with parameter values of 0 or not execute at all. Thus I want the sub datasets to return with blank data in this case or not execute at all.

 

How can I achieve this? I am at a loss.

 

Cheers

Milke


SSRS Q

$
0
0

Hi

I am working on SSRS and need some help to solve one issue.

Based on parameter value I needs to call the related view. Below are my current expression query. but it has some error. Can anyone  help me to solve below issue?

=IIF(Parameters!RacServiceOfferingsOnly.Value=0, SELECT * FROM VW_FLIGHT_SHEET_SUMM_RAC_N WHERE "TransferDate" BETWEEN DECODE(:StartDate,NULL, "TransferDate",:StartDate) AND DECODE(:EndDate,NULL, "TransferDate",:EndDate) AND (:TransferType IS NULL OR :TransferType = "Direction"),SELECT * FROM VW_FLIGHT_SHEET_SUMM_RAC_Y WHERE "TransferDate" BETWEEN DECODE(:StartDate,NULL, "TransferDate",:StartDate) AND DECODE(:EndDate,NULL, "TransferDate",:EndDate))

Thanks in advance...

Regards,

Anand


Dynamic Column width for a report

$
0
0

Will the width property of a column be able to be set at run-time (i.e. ability to set the width of a column to an expression) in SQL Reporting Services 2008? One problem I have seen is the inability to set the width of columns in a report when you you have several columns whose order is determined based on parameters.

 

Lets say I have 2 columns in a report and two fields from the database which will populate those columns: 1 field that is varchar(5) and one which is varchar(50). If I do not know which column each field will go to until runtime how am I supposed to adjust the column width? Letting the column width be set by an expression would solve everything as I could pass the width in to the report. As it stands now, I would have to set each column's width to accomodate a field of type varchar(50) in order to avoid wrapping of data.

 

You could say just create 2 reports, one for each case, but what if I had 15 fields? 20?

 

Has anyone figured out how to dynamically set the width of a column? Will the width of a column be able to be set at run-time in SQL Server Reporting Services 2008 via expression or some other means?

 

Questions, questions, questions.

 

Chuck

SSRS: Indents are not included when eported an SSRS report to excel

$
0
0

Hi All,

I have one SSRS report which contains indents but it is not included when exporting to excel sheet. Is it possible to include indents when exporting to excel?

I have included indent in the textbox property of a field-->Alignment-->Padding Options-->Left-->Exp-->

=CStr(2+(Level()*20))&"pt"

This is working fine in the SSRS report but its not applied when exporting to excel. Please suggest.

Regards,

Julie

Error creating Reporting Database

$
0
0

SQL 2012 SP1, installed Reporting Services, trying to create a database, I'm getting a error on the "Running Database script" line item in the wizard, I'm using the Service Account "NT Service\ReportServer$SCCM2012" it is giving me the error below, how do I get past this?

Pat

System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database 'master'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(SqlConnection conn, String script, ICommandWrapperFactory commandWrapper)
   at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(String connectionString, String script)
   at ReportServicesConfigUI.SqlClientTools.SqlTools.ApplyScript(String connectionString, String script)

SSRS error while OPEN file procedure from Recent Sites and Servers

$
0
0

Hi,

please, what might be the reason for this error:

A propos above error, traying to open

http://localhost/Reports/Pages/Folder.aspx

I am getting this error:

User 'domain\userName' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.

Plese, how to proceed with this ?


Viewing all 10045 articles
Browse latest View live


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