DataSet panel in SSRS designer (BIDS or SQL Server Data Tools for SQL 2012) is gone

Dataset not showing in the left side ?

If you are using BIDS with SQL 2008 R2 you can only get the “Report Data” menu by clicking inside the actual report layout itself.

  1. Click inside the actual report layout.
  2. Now select “View” from the main menu bar.
  3. Now select “Report Data” which is the last item.


SSRS Conditional Changing Text Color

To make the contents of a text box render negative values in red for a field called Profit, open the Properties pane and use the following expression in the Color property:

=IIF(Fields!Profit.Value < 0, “Red”, “Black”)

To alternate the background color for every other row in a table, you can set the BackgroundColor property for each text box in the row to the same conditional expression. This technique works for detail rows only in a table with no groups.

=IIF(RowNumber(Nothing) MOD 2, “PaleGreen”, “White”)


Or for details look at this reff:

By simplemsexchange Posted in SSRS

Print SSRS report directly to a printer without viewing using

1. Add a form PrintReport.vb

2. Add a report viewer in the form. configure the report viewer property (server url, path)

3.  code behind:


Imports System.Drawing.Printing
Imports System.Drawing.Imaging
Imports System.IO
Imports Microsoft.Reporting.WinForms

Public Class PrintReport
Dim pages As New List(Of Metafile)
Dim pageIndex As Integer = 0
Dim doc As New Printing.PrintDocument()

Private Sub PrintReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim doc As New Printing.PrintDocument()
doc = New Printing.PrintDocument()
AddHandler doc.PrintPage, AddressOf PrintPageHandler
Dim dialog As New PrintDialog()
dialog.Document = doc
Dim print As DialogResult
print = dialog.ShowDialog()

doc.PrinterSettings = dialog.PrinterSettings

Dim deviceInfo As String = _
“<DeviceInfo>” + _
“<OutputFormat>emf</OutputFormat>” + _
”  <PageWidth>8.5in</PageWidth>” + _
”  <PageHeight>11in</PageHeight>” + _
”  <MarginTop>0.25in</MarginTop>” + _
”  <MarginLeft>0.25in</MarginLeft>” + _
”  <MarginRight>0.25in</MarginRight>” + _
”  <MarginBottom>0.25in</MarginBottom>” + _

Dim warnings() As Microsoft.Reporting.WinForms.Warning ‘Warning
Dim streamids() As String
Dim mimeType, encoding, filenameExtension, path As String
mimeType = “” : encoding = “” : filenameExtension = “”

‘Report Parameter Input. Add form text box as per your requirements

Dim parmI As New ReportParameter(“INVOICE_NUMBER”, INVOICE_NUMBER)
Dim parmSO1(1) As ReportParameter
parmSO1(0) = parmSO
parmSO1(1) = parmI

Dim data() As Byte
data = rpt_control.ServerReport.Render(“Image”, deviceInfo, mimeType, encoding, filenameExtension, streamids, warnings)
pages.Add(New Metafile(New MemoryStream(data)))

For Each pageName As String In streamids
data = rpt_control.ServerReport.RenderStream(“Image”, pageName, deviceInfo, mimeType, encoding)
pages.Add(New Metafile(New MemoryStream(data)))

End Sub

Private Sub PrintPageHandler(ByVal sender As Object, ByVal e As PrintPageEventArgs)
Dim page As Metafile = pages(pageIndex)
pageIndex += 1
Dim pWidth As Integer = 827
Dim pHeight As Integer = 1100
e.Graphics.DrawImage(page, 0, 0, pWidth, pHeight)
‘e.Graphics.DrawImage(page, 0, 0, page.Width, page.Height)
e.HasMorePages = pageIndex < pages.Count
End Sub

End Class



Further Details here

SSRS How can I read Report Modified date

Use the Catalog table from the reportserver database, which will field called ModifiedDate for each report that you can use to display the modified date.


1. Create a dataset with the follwing query:

SELECT        TOP (1) ModifiedDate
FROM            ReportServer.dbo.Catalog
WHERE        (Name = @ReportName) AND (Type = 2)

//ReportServer is the database name

This will create a ReportName parameter automatically.

2. Change the default value of that parameter to expression: =Globals!ReportName


Now add a text box and add Modified Date from the dataset.

By simplemsexchange Posted in SSRS