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

Microsoft Reporting Services in Visual Studio-Add datasets through scrip

$
0
0
Hello everyone,

I have reporting services project in visual studio. I need to add a same dataset based on same datasource accross all the reports in my project. Is there any way to do this just running one script. It's difficult to open all the reports and add manually. Any solution?

Thanks

rectangle keeps resizing

$
0
0

 

i have a report with several rectangles.  How do I make the size of the rectangles fixed so that they do not resize automatically?

 

They appear fixed until i put a table inside.  once I do that it automatically resizes

uploading xslt files in 2017

$
0
0

I am transitioning from SSRS 2012 to 2017.  I have a number of reports that use Data Transformations.  On my 2012 server I simply created a hidden folder and dumped all my xslt files in that folder and then referenced that location from each report.  On 2017 I planned to do exactly the same.  The problem is when I try to upload an XSLT file I get this error:

An error has occurred.

Uploading or saving files with .xslt extension is not allowed. Contact your administrator if you have any questions.

How do I deploy xslt files to SSRS 2017?


Filtering category group for data from last 10 months in SSRS line chart?

$
0
0

I am creating line chart in a paginated SSRS report and my data consists of two columns and looks something like this:

MonthYear   |   Percentage
Sep 2018    |   29.8
Sep 2018    |   87.5
Jan 2019    |   18.3

For creating my line chart I need MonthYear on X-axis and Percentage on Y-axis. 

Is there a way to filter the rows to get data for the last 10 months? I don't know how to convert MonthYear to a comparison-friendly format.

Thanks.


How to connect to Report Server in Report Builder?

$
0
0

I'm a newcomer in SSRS, My issue is that I'm unable to connect to a report server hosted in a remote machine from report builder/Visual Studio (SSDT) installed in my local machine (laptop).

For illustration my URLs are as below

Report Manager URL - http://devssrsreports/reports/browse/ 
Report Server URL - http://devssrsreports:80/ReportServer

I've got full access to the report server, below are my roles 

  • System Administrator
  • System User
  • Browser
  • Content Manager
  • My Reports
  • Publisher
  • Report Builder

I could open both report manager & server URLs from my web browser, however when I tried to connect to the report server URL from report builder it's not connecting and eventually throws an error (same happened with Visual Studio (SSDT))

I was wondering about the fact that when connecting to report server from report builder it didn't ask for my user credentials (whereas when I log in from web browser it asked for my login credentials) so I suspect something is wrong there.

Any advice would be appreciated. Thanks in advance.

Need to create Boxplot in ssrs

$
0
0

Hi I want to create box plot to analyse the users who got the response in which seconds.

below is the script which I use to get data according to process ,startdate,12 hrs format,the seconds as the columns.


SELECT
  [ProcessName],
          StartDate,
          sum(case when Resttime=5 then 1 else 0 end) AS [5]
          ,sum(case when Resttime=10 then 1 else 0 end) AS [10]
          ,sum(case when Resttime=15 then 1 else 0 end) AS [15]
           ,sum(case when Resttime=20 then 1 else 0 end) AS [20]
     ,sum(case when Resttime=25 then 1 else 0 end) AS [25]
           ,sum(case when Resttime=30 then 1 else 0 end) AS [30]
    
              FROM
          (
          SELECT
          [ProcessName]
          ,CONVERT(DATE,StartTime) AS StartDate
          ,CASE WHEN DATEDIFF(SECOND,StartTime,EndTime) >= 20 THEN 'Failure' ELSE 'Success' END AS [Status]
    ,CASE WHEN DATEDIFF(SECOND,StartTime,EndTime) <5 THEN  5
           WHEN DATEDIFF(SECOND,StartTime,EndTime) BETWEEN 5 AND 10 THEN  10
     WHEN DATEDIFF(SECOND,StartTime,EndTime) BETWEEN 11 AND 15 THEN 15
     WHEN DATEDIFF(SECOND,StartTime,EndTime) BETWEEN 16 AND 20 THEN  20
      WHEN DATEDIFF(SECOND,StartTime,EndTime) BETWEEN 21 AND 25 THEN  25
     WHEN DATEDIFF(SECOND,StartTime,EndTime) >25 THEN  30 END AS Resttime
            FROM [OMS].[dbo].[T_AuditProcess] WITH(NOLOCK)
           WHERE CONVERT(VARCHAR,StartTime,112)  BETWEEN  @fromDate AND @toDate
    and [ProcessName] in (@ProcessName)
          ) D GROUP BY
          [ProcessName],
          StartDate
        order by  [ProcessName],StartDate

I am struggling to plot the bloxplot in ssrs.

Set table row background color based on cell background color

$
0
0

I'm new in SSRS reports. I have a problem with applying table cell bg color to entire row.

Basically, I have list of projects, each of them has Order property and Year property, list ordered by Order property. For example:

ProjectNameOrderYear
first project12020
second project22022
next project32019
one more project32019
last project42021
very last project52019

I created report where columns are years (without duplicates), ascendingordered, and rows are projects, but each project name placed in cell below necessary year. Additionally, based on Order property, I need to set background color to entire row, depends on value in Order field. Hard to explain, now it looks like this:

Despite the fact that I set expression for setting bg color to entire row, in report it set bg only to cells with project name.

Expression for row bg color is:

=Switch(Fields!Order.Value Like "1", "#8db4e2",
Fields!Order.Value Like "2", "#ebf1de", 
Fields!Order.Value Like "3", "#fde9d9", 
Fields!Order.Value Like "4", "#daeef3",
Fields!Order.Value Like "5", "#d9d9d9" )

How can I set bg color to entire row, not only to one cell? Maybe there is something with row and column grouping. There is row group properties (all other tabs are empty):

There are column group properties:

My best solution for now is using custom JS code, that added on page with Report Viewer webpart, and this JS code set bg color to entire row. But, it works only on page, and when I export report, for example in Excel, report looks like on my first screenshot here.

Please, help me find better solution. If Report Builder can't do it, maybe there is some way to add my custom JS script directly in report, so after export it will have row bg color set like I need.

How to migrate SSRS SQL 2012 dev edition reports to SQL 2016 STD edition

$
0
0

Team ,

Can you guide me to migrate reports from sql 2012 developer server to sql 2016 Standard edition. I have checked online and found no threads . I have got the encryption key moved over and all the necessary setup for migration. Installed SSRS on the new server installed the report builder . When i try to backup reportserver DB from SQL 2012 version and restore on SQL 2016 the SSRS reports URL does not work. I have tried multiple ways but nothing worked . 

First can we migrate dev 2012 to std 2016 edition what are the necessary steps and precautions.

I have never done SSRS migration at all .


Subreports (with different widths): Blank pages in PDF Export SSRS 2008

$
0
0

We are using Sql Server 2008 Reporting Services and Visual Studio 2008 Business Intelligence Development Studio for reports development.

I have a report that consists of two rectangles: the title page A and the data page B. "A" appears before "B" and there is a page break between them.

Rectangle "A" has several text boxes and is 26 cm wide. Rectangle "B" has a table but is 80 cm wide.

The main report that houses these subreports is defined to have dimensions 29 cm wide x 21 cm high.

When I export the main report to PDF, the exported file has 4 pages: Page 1 has A's contents, Page 2 and 3 is blank, Page 4 has B's contents.

I made sure that there are no blank spaces in the report, also made sure that the rectangle A's contents+ margin are less than 29 cm wide but still I get the blank page in PDF. So, why are Page-2 and 3 blank?

The KeepTogether property applied to the rectangle A does not change anything.

"Add a page break after/before" in different combinations does not help.

I'll appreciate very much any help to solve this issue. Thanks!

#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

 

SSRS Installed different product versions on prod and non-prod

$
0
0

Hi,

I have installed SQL 2017 SSRS product version 14.0.600.1109 on dev and test servers and installed 14.0.600.1274 on prod server, would it be any  impact to users while rendering reports or any otherpotential issues running different product versions in prod and non-prod.

Thanks




Get the SSRS shared data source list by report name by using TSQL

$
0
0

Hi,

Get the SSRS shared data source list by report name by using TSQL, please help is there any easy way to do by TSQL?

tHANKS

HOW TO HIDE SUB REPORT OR ROW BASE

$
0
0
I have a report which has a subreport  for detail accounts for a few employees. My issue is that I have an employee list in the main report based on accounts, so I have listed the employee id many times based on those accounts. Therefore, I have the subreport under the employee id many times time as well. The idea is to have the subreport with the account information just one time. any suggestion. 

SSRS Temporary Report Snapshot Files do not seem to be purged

$
0
0

Our Reporting Services Temporary Files do not seem to be automatically cleaned up by the Report Server. It just keeps growing and growing and we are getting space warnings.

Two questions.

  1. What is creating and writing to these Temporary Files?
  2. And how do we get Reporting Services to automatically delete/purge them to relieve some of our disk space?

Thanks for your review and am hopeful for a reply.

Failed to load expression host assembly. Details: Loading this assembly would produce a different grant set from other error

$
0
0
The SSRS report throws "Failed to load expression host assembly. Details: Loading this assembly would produce a different grant set from other error" after few hours of Microsoft path applied. 

Subquery taking too much time

$
0
0

 I am creating a view with this query, but since I added the subquery to it, the script has been taking too much time to run without completion. any help on how to make the query work faster and better?

CREATE VIEW [dbo].[Vw_KPI]

AS

WITH

CTE_ReadyAS

(SELECT  equipmentname, equipmentfleet ,ShiftMonth, ShiftYear,sum(duration)as Duration from [EquipmentStatus] WHERE EquipmentStatusName ='Ready'
groupby
ShiftMonth, ShiftYear,
equipmentname, equipmentfleet) ,

CTE_DelayAS (SELECT  equipmentname, equipmentfleet,ShiftMonth, ShiftYear,sum(duration)as Duration from [EquipmentStatus]  WHERE EquipmentStatusName =Delay
groupby ShiftMonth, ShiftYear,equipmentname, equipmentfleet) ,

CTE_StandbyAS (SELECT  equipmentname, equipmentfleet,ShiftMonth, ShiftYear,sum(duration)as Duration from [EquipmentStatus]  WHERE EquipmentStatusName =Standby
groupby ShiftMonth, ShiftYear,equipmentname, equipmentfleet) ,

CTE_DownAS(SELECT  equipmentname, equipmentfleet,ShiftMonth, ShiftYear,sum(duration)as Duration from [EquipmentStatus]  WHERE EquipmentStatusName =Down
groupby ShiftMonth, ShiftYear,equipmentname, equipmentfleet) ,

selectE.equipmentfleet, E.equipmentname, E.shiftmonth, E.ShiftYear,ISNULL(r.Duration,0)as ReadyDuration ,ISNULL(d.Duration,0)as DelayDuration,ISNULL(S.Duration,0)as StandbyDuration ,ISNULL(do.Duration,0)as DownDuration

,Past7Days_AP =(SELECTCASEWHEN(Sum(cast(isnull(d.Duration,0)asbigint)))=(Sum(cast(isnull(r.Duration,0)asbigint))+Sum(cast(isnull(d.Duration,0)asbigint))+Sum(cast(isnull(do.Duration,0)asbigint))+Sum(cast(isnull(S.Duration,0)asbigint)))THEN 0WHEN (Sum(cast(isnull(r.Duration,0)asbigint))+Sum(cast(isnull(d.Duration,0)asbigint))+Sum(cast(isnull(S.Duration,0)asbigint)))=0THEN-1 ELSECast(Round(((Sum(cast(isnull(r.Duration,0)asbigint))+Sum(cast(isnull(d.Duration,0)asbigint))+Sum(cast(isnull(s.Duration,0)asbigint)))*100.0)/ (Sum(cast(isnull(r.Duration,0)asbigint))+Sum(cast(isnull(d.Duration,0)asbigint))+Sum(cast(isnull(S.Duration,0)asbigint))+Sum(cast(isnull(Do.Duration,0)asbigint))),1)asNumeric(4,1))ENDASAP FROM [DownEvents] DE

LEFTJOIN CTE_Ready RON R.equipmentname= E.equipmentname

LEFTJOIN CTE_Delay D ON D.equipmentname= E.equipmentname


LEFTJOIN CTE_Standby S ON S.equipmentname= E.equipmentname


LEFTJOIN CTE_Down Do ON Do.equipmentname= E.equipmentname WHERE enddatetimebetweendateadd(day,-7,enddatetime)andgetdate()

and E.EquipmentName= DE.EquipmentName)FROM [EquipmentStatus] Ewith(nolock)

LEFTJOIN CTE_Ready R ON R.equipmentname= E.equipmentnameand R.ShiftMonth = E.ShiftMonth and R.ShiftYear= E.ShiftYear

LEFTJOIN CTE_Delay D ON D.equipmentname= E.equipmentnameand D.ShiftMonth = E.ShiftMonth and D.ShiftYear= E.ShiftYear

LEFTJOIN CTE_Standby S ON S.equipmentname= E.equipmentnameand S.ShiftMonth = E.ShiftMonth and S.ShiftYear= E.ShiftYear

LEFTJOIN CTE_Down Do ON Do.equipmentname= E.equipmentnameand Do.ShiftMonth= E.ShiftMonth and Do.ShiftYear = E.ShiftYear

leftjoin [DownEvents] DE WITH(nolock)on DE.EquipmentName= e.EquipmentNameand e.ShiftID = DE.ShiftID

groupby E.equipmentfleet, E.equipmentname, E.ShiftYear, E.shiftmonth,r.Duration, d.Duration , S.Duration  , do.Duration

Report Viewer Large data Request timed out.

$
0
0

I have a report, it has large data. When I generate the report it wait for more then 10 minutes and timeout, show this message:

  • The operation has timed out.
    Or
  • Server Error in '/HEMReports' Application.

    Request timed out. 
      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

     Exception Details: System.Web.HttpException: Request timed out.

    Source Error: 

     An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.   

    Stack Trace: 
    [HttpException (0x80004005): Request timed out.]

The report has 20 meters and  every 15 minutes has a record, last for one year, 20 * 24 * 4 * 365 = 700,800.  The request use more then 20 minutes, the procedure which get date from SQL use almost 2 minutes and render the page use 2 minutes. I think the rdl process the data use the most time, is there are anyone has suggestion to improve the performance? Make the server response the data quickly? As the customer want to show 200 meters which means 200 * 4 * 24 * 365 =  7,008,000 pieces records, set much lager timeout limit is not acceptable. Thank you for any suggestion.

 

Render format MHTML Subscription column size problems with SSRS

$
0
0

Hi everybody.


I have 2 tables in my rdl file.

In normal conditions it displays like this and its ok.

But only and just only when I use a email Subscription with rendor format of MHTML is displayed like this.

Basically transforms the size of columns to the width of values of the columns, how can I avoid that in MHTML subscription?


TThank you all in advance.

Unable to edit Parameters of SSRS Report developed in SSRS 2016 and deployed in SSRS 2017

$
0
0

Hi,

I have developed a report in SSRS 2016 portal using Report Builder version 14.0.609.142. The report work fine in this environment.

When the report got deployed to production it was SSRS 2017 portal. When our Ops people try to manage the report and access Parameters they get "An unknown error has occurred" and can't even see the parameters.

Any idea what's causing this? Does the report need to be edited with newer version of Report Builder? Can the reports developed in SSRS 2016 environment be deployed on SSRS 2017 portal?

Thanks,

Stan


Stan

SSRS 2017 License Key Error

$
0
0
I originally installed SSRS 2017 with an evaluation license.  I now need to enter a product key using Add/Remove programs to upgrade the version.  I am using the Enterprise SQL 2017 license key we have from my MSDN subscription.  The installer is telling me I have an invalid license key.  Any suggestions?
Viewing all 28687 articles
Browse latest View live


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