reporting-services

T-SQL Declaring Connection String as a Parameter

荒凉一梦 提交于 2020-02-25 05:22:43
问题 DECLARE @DBS nvarchar(32) SET @DBS = 'Current' --'Archive' SELECT TOP 100 * FROM [@DBS].[dbo].[table] I have 2 structurally identical databases that sit on the same server. One only saves information for 30 days, for quick report processing, the other saves years worth of information. Either query executes fine if I have Current.dbo.table or Archive.dbo.table, but I'm wanting to set a parameter so we can toggle between Current and Archive, within the same report, so a user can pull from the

T-SQL Declaring Connection String as a Parameter

我与影子孤独终老i 提交于 2020-02-25 05:20:46
问题 DECLARE @DBS nvarchar(32) SET @DBS = 'Current' --'Archive' SELECT TOP 100 * FROM [@DBS].[dbo].[table] I have 2 structurally identical databases that sit on the same server. One only saves information for 30 days, for quick report processing, the other saves years worth of information. Either query executes fine if I have Current.dbo.table or Archive.dbo.table, but I'm wanting to set a parameter so we can toggle between Current and Archive, within the same report, so a user can pull from the

Hide parameter (dropdown control from the toolbar) in SSRS based on another Parameter

自古美人都是妖i 提交于 2020-02-08 01:29:09
问题 I'm using .NET ReportViewer control. We only want to display the "Dealer" dropdown if user is admin. Is it possible to hide the "Dealer" dropdown control based on another parameter passed in, like IsAdmin? 回答1: The Hidden property of a parameter can only be True or False so you can't have an expression that changes the visibility dynamically. However, what you could do is make the @Dealer parameter's available values restrict choice based on the logged in user. For example, let's assume that

SQL Reporting Services Boolean Parameter (True/False/All(?))

老子叫甜甜 提交于 2020-02-05 08:13:46
问题 I have a SSRS report that works with boolean parameter. I would like to add a third option to show all the records on the report. Both true and false. The concept is that the dropdown will include three options (All,True,False). Is there a way to acheive that? Thanks, -Y 回答1: Set the dataset filter to something like this: I have 3 available values for @parmTRUEFALSE False = False True = True All Records = (Null) =IIF(IsNothing(Parameters!parmTRUEFALSE.Value), ObjectFieldName.Value, Parameters

SSRS Matrix Page Break of Column Groups

 ̄綄美尐妖づ 提交于 2020-02-04 00:43:01
问题 I am currently working with SSRS 2012 and have apparently hit a road block. Is it possible to set a page break on each new instance of of a column group variable. I have given a basic example below. I have selected the page break across group option (picture below). I notice that there is a similar post - without working answer - Another Column Group - Page Break Question I have done a few hours of research on the web and found that this functionality 'may' not exist? I know it works for row

Using Custom Culture with ReportViewer returns a CultureNotFoundException

青春壹個敷衍的年華 提交于 2020-02-03 21:32:54
问题 My web site uses custom cultures that are created like this: var cib = new CultureAndRegionInfoBuilder("en-gb-xxxx", CultureAndRegionModifiers.None); cib.LoadDataFromCultureInfo(new CultureInfo("en-gb")); cib.LoadDataFromRegionInfo(new RegionInfo("en")); cib.Register(); And that are used like this: Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-gb-xxxx"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-gb-xxxx"); It is all working fine up to the point

Using Custom Culture with ReportViewer returns a CultureNotFoundException

走远了吗. 提交于 2020-02-03 21:32:08
问题 My web site uses custom cultures that are created like this: var cib = new CultureAndRegionInfoBuilder("en-gb-xxxx", CultureAndRegionModifiers.None); cib.LoadDataFromCultureInfo(new CultureInfo("en-gb")); cib.LoadDataFromRegionInfo(new RegionInfo("en")); cib.Register(); And that are used like this: Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-gb-xxxx"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-gb-xxxx"); It is all working fine up to the point

Convert Char field to Date field and remove time from the field name

社会主义新天地 提交于 2020-02-03 03:13:29
问题 I am using the following command to remove the time from the date field: SELECT CONVERT(VARCHAR(10), FieldValue,101) FROM table FieldValue is a char field, but has a date i.e. 2012-09-30 00:00:00 The above command returns 2012-09-30 , but I need it to be 09/30/2012 Any idea what I need to add to the command? 回答1: Yes, you should use format() format(Fields!YourField.Value, "MM/dd/yyyy") 来源: https://stackoverflow.com/questions/14281221/convert-char-field-to-date-field-and-remove-time-from-the

How can I loop records so that 2 records per row one on left and other on right, is this possible?

你说的曾经没有我的故事 提交于 2020-01-30 10:52:14
问题 In my SSRS report, I want to show 2 records in one row, so they each row contian one entry in left and other entry in right. So if there are total 10 records, there should be 5 rows with each row having 2 records each. Is this possible in SSRS? I am using list to achieve it. Please advise. 回答1: I have a potential solution that could solve your requirement. I recommend utilizing the RowNumber function of SSRS to specify odd numbered items in the first column and even numbered items in the