Showing posts with label ssrs. Show all posts
Showing posts with label ssrs. Show all posts

Wednesday, July 17, 2019

SQL Server Reporting Services (SSRS) is not compatible with Internet Explorer 11

Problem
You upgraded to Internet Explorer 11, now when you preview a SQL Server Reporting Services (SSRS) report you find the print command is not visible in the report viewer. Also, sometimes when you change parameter values IE11 stops responding or it takes a long time to load the report. You may also find that the toolbar that displays the report controls and export features, appears on multiple lines when viewed with IE11. When you preview the same SSRS report in Chrome or Mozilla Firefox, it works fine without any issue, which means it is a browser compatibility issue. How can you make SQL Server Reporting Services (SSRS) compatible with IE11?
Solution
This tip assumes that your SSRS report is developed and working fine with Chrome or the Mozilla Firefox browser, but when you preview the report in IE11 you are facing one or more of the issues stated in the problem statement.
There are two ways to resolve this problem.
1. Fix at client browser level.
2. Fix at report server level.
In this tip I will be explaining both methods, let's start with fixing the issue in the client browser.

Fix the SSRS Compatibility Issue in IE 11

This has to be applied to all users' browsers.
  • Open the IE11 browser
  • Press F12 – which would open a developer tool at the bottom of the browser
  • Click "Emulation" tab
  • Change the "Document mode" to "Edge", you can refer to the below image.


IE11_Developer_Settings

  • Try to access the report. You should now be able to access the report in IE11 without any issues.

Fix the SSRS Compatibility Issue at the Server Level

This change will reflect in all users' browsers, you don't need to make any changes for the client browser settings.
  • It is recommended to take a backup of the reportviewer.aspx file located at \Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\Pages.
  • Open the reportviewer.aspx file located in \Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\Pages in notepad.
  • Change the meta tag from <meta http-equiv="X-UA-Compatible" content="IE=5"> to <meta http-equiv="X-UA-Compatible" content="IE=Edge">, you can refer to the below image:
Report_Viewer_Changes

  • Save the file and try to access the report in IE11, you should now be able to access the report without any issues.
Next Steps


Last Updated: 2015-09-22 

source : https://www.mssqltips.com/sqlservertip/3666/sql-server-reporting-services-ssrs-is-not-compatible-with-internet-explorer-11/

Configuring SQL Server Reporting Services in SQL Server 2012

Source : http://learnsqlwithbru.com/2011/12/27/configuring-sql-server-reporting-services-in-sql-server-2012/

SSRS – Setting Page Properties for a Report

Source : http://learnsqlwithbru.com/2012/01/20/ssrs-setting-page-properties-for-a-report/

Wednesday, April 3, 2019

SSRS : Setting up a A4 page in Reporting Services

สรุป วิธีการตั้งค่าหน้ากระดาษเพื่อเวลา print แล้วไม่ขึ้นหน้าใหม่เป็น Blank 

1. Report => Report properties => Paper size A4 => width 21 cm
2. เอาขนาด  width ลบ ออก ด้วย margin ซ้ายขวา  21 - 1.5- 1.5 = 18
3. เอาค่าที่ได้ไปใส่ใน Body(คลิกพื้นที่ขาวด้านข้างทางขวา จะโชว์ Body properties) => width

Hi,

I'm always a bit rusty when i start building reports in Reporting Services after a while. One thing i always has to figure out is how to set up the page size, body and margins. In a article on Microsoft you can find more information about this subjct. You can set the properties in the properties window or you can set the properties with report properties window (Menu -> Report -> Report properties). The relation between page, body, header and footer looks conceptual like the diagam below.


Below you can see how i manually set the page size of the report with A4 paper settings.


And don't forget to set the body properties:


The formula of setting the PageSize Width, bodysize and margins is this: Page Width = Body Width+ Left margin + Right Margin. In my case 21= 19+1+1.

In case of the height of the report you need to set the pagesize. In case of A4 : 29,7cm. In case of the body height you can set whatever you wan't. By setting the PageSize Height property the height of A4 is maintained and when the body height is larger than the pageSize (minus top margin and bottom margin) more pages are displayed/printed.

It's also possible to set the properties with the report properties window. Below you can see an example in inches.



We end up with the follow values for the proprties:








Thursday, January 31, 2019

Datasets pane in Visual Studio for SSRS report

If anyone is interested: Ctrl+Alt+D combo helped me.

In Visual Studio 2013 running SSDTBI for VS 2013 the option has moved to the "View" menu, and confusingly it only shows if an actual report has focus. So click somewhere in your report, and thenclick "View"
enter image description here
Or as stated by others Ctrl+Alt+d still works, though only if you have a report focussed.

Monday, October 17, 2016

Passing multiple values for a single parameter in Reporting Services

Passing multiple values for a single parameter in Reporting Services


=join(Parameters!<your param name>.Value,",")
source : http://stackoverflow.com/questions/512105/passing-multiple-values-for-a-single-parameter-in-reporting-services

Friday, September 30, 2016

Tablix: Repeat header rows on each page not working

Tablix: Repeat header rows on each page not working


It depends on the tablix structure you are using. In a table, for example, you do not have column groups, so Reporting Services does not recognize which textboxes are the column headers and setting RepeatColumnHeaders property to True doesn't work.
Instead, you need to:
  1. Open Advanced Mode in the Groupings pane. (Click the arrow to the right of the Column Groups and select Advanced Mode.)
    • Screenshot
  2. In the Row Groups area (not Column Groups), click on a Static group, which highlights the corresponding textbox in the tablix. Click through each Static group until it highlights the leftmost column header. This is generally the first Static group listed.
  3. In the Properties window, set the RepeatOnNewPage property to True.
    • Screenshot
  4. Make sure that the KeepWithGroup property is set to After.
The KeepWithGroup property specifies which group to which the static member needs to stick. If set to After then the static member sticks with the group after it, or below it, acting as a group header. If set to Before, then the static member sticks with the group before, or above it, acting as a group footer. If set to None, Reporting Services decides where to put the static member.
Now when you view the report, the column headers repeat on each page of the tablix.
This video shows how to set it exactly as the answer described
source : http://stackoverflow.com/questions/11285923/tablix-repeat-header-rows-on-each-page-not-working-report-builder-3-0

Thursday, September 29, 2016

First and Last day of current month

=DateSerial(Year(Now), Month(Now), 1) for first day of the month 
=DateSerial(Year(Now), Month(Now)+1, 0) for the last day of the month.
--previous month last
=DateSerial(Year(Now()), Month(Now()), "1").AddDays(-1)

--previous month first
=DateSerial(Year(Now()), Month(Now()), "1").AddMonths(-1)

SSRS Expression Cheat Sheet

SSRS Expression Cheat Sheet

ProblemsExpression
Return first day of current Week 
(ex. Default Start Date parameter to return WTD)
Expression on the parameter default value: 
=DateAdd("d",-DatePart(DateInterval.WeekDay,Today,0,0)+1,Today) 
Expression Output Example: 11/7/2010 12:00:00 AM
Return first day of current Month 

(ex. Default Start Date parameter to return MTD)
Expression on the parameter default value: =DateAdd("d",-(Day(today)-1), Today)
or
=DateSerial( year(today()), month(today()), 1) 
Expression Output Example:11/1/2010 12:00:00 AM
Return first day of current year 
ex. Default Start Date parameter to return YTD)
Expression on the parameter default value: 
=DateAdd("d",-DatePart(DateInterval.DayOfYear,Today,0,0)+1,Today) 
Expression Output Example: 1/1/2010 12:00:00 AM
Return period over period 
(ex. Default date parameters to a rolling year)
Expression on the parameter default value: 

Week over Week 
=DateAdd("ww",-1, Today) 

Month over Month 
=DateAdd("m",-1,Today) 

Year over Year 
=DateAdd("yyyy",-1, Today) 

Expression Output Example:10/9/2010 12:00:00 AM
Return current month nameExpression in Text Box: 
=MonthName(Month(Today())) 

Expression Output Example:November
Uppercase fieldsExpression in Text Box: 
=UCASE(Fields!FieldName.Value) 

Expression Output Example:NOVEMBER
Convert text to proper case 
(ex. 1st letter in each word is uppercase)
Expression in Text Box: 
=StrConv(Fields!FieldName.Value, VbStrConv.ProperCase)
Replace NULL with another valueExpression in Text Box: 
=iif(Fields!FieldName.Value = nothing, "No Value",Fields! FieldName.Value)
Alternating row color (Banding effect)BackgroundColor property on Text Box: 
=iif(RowNumber(Nothing) Mod 2 = 0, "Silver", "White")
Handling division by zeroExpression in Text Box: 

=iif(Fields!DenominatorField.Value = 0, 0, Fields!NumeratorField.Value/ 

iif(Fields!DenominatorField.Value = 0, 1, Fields! DenominatorField.Value))
security number)Expression in Text Box: 

=Replace(Fields!EmailAddress.Value,"-","")

source : http://pragmaticworks.com/Training/Resources/Cheat-Sheets/SSRS-Expression-Cheat-Sheet

Show all records/some records based on parameter value

Method 1 
You need to set up a filter similar to the following:
enter image description here
Where the expression is:
=IIf(Parameters!FilterColumn.Value = Fields!Category.Value
        or Parameters!FilterColumn.Value = "All products"
    , "Include"
    , "Exclude")
This matches the row Category based on the parameter value, or, if the value = All products, will include all rows.
As mentioned in the comments and the other answer, this is possible in the SP too, but since it seems to be specifically to demonstrate the functionality this should do the trick at the report level.
--------------------------------------------------------------------------------------------------------------------------
Method 2 
I have created some solution and worked for me:
enter image description here
In Expression field, I put first expression:
1.  Iif(Parameters!FilterColumn.Value = "All", 1, Fields!Category.Value)
In Value field, I put second expression:
2.  Iif(Parameters!FilterColumn.Value = "All", 1, Parameters!FilterColumn.Value)
So, when I choose "All" value in parameter, then first expression will result 1, and second expression will result 1, and i have 1 = 1 which is true for all rows, and I got all rows in table.
When I choose specific category from parameter, then in first expression result will be Fields!Category.Value and in second expression will be Parameters!FilterColumn.Value. Simple, I got Fields!Category.Value = Parameters!FilterColumn.Value, or just give me rows where category is that choosen in parameter.
source : http://stackoverflow.com/questions/18203317/show-all-records-some-records-based-on-parameter-value