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

cannot modify folder permissions

$
0
0

Hi. We have a SQL 2012 SSRS instance. We need to modify the permissions on one of the reporting folders. I went to the Security setting of the folder, clicked "New role assignment", then entered a group name into the box and selected desired permission ("Browser" in this case).

However this always fails with the same error: "The user or group name 'BUILTIN\BUILTIN' is not recognized. (rsUnknownUserName)"

I always get the same error no matter if I enter user or group, domain or local. And it always says BUILTIN\BUILTIN. I've tried changing the SSRS service account to a domain account (it was a local one), but that didn't help.

Any help is appreciated.


Printing SSRS from a .net app

$
0
0

Hi,

I and trying a to code a .net function that from a parameter indicating the report url (example http://DEVELPC/ReportServer/Pages/ReportViewer.aspx?%2fLocalPlans%2fproduction%2fproduction&rs:Command=Render), and the printer name  can send automatically the report to the printer.

I´d like to know which options I got to implement this feature.

I am thinking of exporting first the report as PDF, and then sending the PDF to the printer. But I would like to know if there is any way to send the report straight to the printer. Like for example SSRS API, or if it exist a paramater that can be added to the URL to achieve this.


SSRS hide tablix based on parameter input

$
0
0

Hi Guys,

I have 2 tables in my report, a multi value parameter (tp_title) is passed to the report. I am trying to hide the first tablix with this expression in the visiblity option of the tablix properties.

=IIF(Parameters!tp_title.value = "Financial Years" or Parameters!tp_title="ALL", False,True )

I get the error:

The Hidden expression for the tablix ‘Tablix1’ contains an error: Overload resolution failed because no Public '=' can be called with these arguments:
    'Public Shared Operator =(a As String, b As String) As Boolean':
        Argument matching parameter 'a' cannot convert from 'Object()' to 'String'.

When I render the report.

Any suggestions as how the tablix  can be made invisible based on the parameter is highly appreciated.

SSRS hide tablix based on parameter input

$
0
0

Hi Guys,

I have 2 tables in my report, a multi value parameter (tp_title) is passed to the report. I am trying to hide the first tablix with this expression in the visiblity option of the tablix properties.

=IIF(Parameters!tp_Title.value = "Financial Years" or Parameters!tp_Title.value="ALL", False,True )

I get the error:

The Hidden expression for the tablix ‘Tablix1’ contains an error: Overload resolution failed because no Public '=' can be called with these arguments:
    'Public Shared Operator =(a As String, b As String) As Boolean':
        Argument matching parameter 'a' cannot convert from 'Object()' to 'String'.

When I render the report.

Any suggestions as how the tablix  can be made invisible based on the parameter is highly appreciated.

Subscription with Error not running.

$
0
0

We have a
subscription that got a parameter dropped by accident in a stored
procedure.  To accomplish this create a valid subscription than change the
underlying procedure to not have a variable that should be in
subscription.  I have code that is in place that looks for errors, logs
the error, sends an email, and then attempts to retry the subscription 1x per
hour.  This works great with most any error.  Example if the
email address is not correct it will run every hour failing and
then retry until someone fixes it.  IF we have a deadlock then
it will retry in 1 hour and normally succeed automatically.   This
error with dropped parameter for some reason will not rerun after first
failure.  Here is what I have noticed is happening and I have no idea
why.  <o:p></o:p>

The first
time the execution happens it works great we get the email and it inserts a
record into the Event table to attempt a retry and the Subscription table shows
the LastRunTime correctly and the LastStatus gets updated with correct error
"The subscription contains parameter values that are not
valid".  However 1 hour later it does not send an email or retry
because it never fully retries.  Even if I enter a record manually in the
event table it will not fully retry.   What I have found is that the
Subscriptions table will never get an update to the LastRunTime after the first
run.  It will however update in the Schedule table with the new
LastRunTime.  Why would it never attempt to rerun or update the
subscriptions table?   Here is the code below we use to find
records with errors.  Since we just found this new error we added a
new piece to our code, " or S.LastStatus like '%Not Valid%' ". 
This works on the first run for this parameter error, but once we try to
restart it the Subscription will not update with LastRuntime again.  Why,
help?

--Below code has a table tblAdmLogJobError.  This table also gets wrote to (logged) if a error is emailed and retried.  This way we do not attempt to rerun for an error already ran.  For testing purpose you can remove this table from below.
--Next it will only look for errors that are over 1 hour old in where clause you might want to comment this out as well for this case.


Select C.name, S.EventType, Cast(S.SubscriptionID as varchar(36)) as SubscriptionID, S.LastRunTime, SC.[Path], S.[Description], S.LastStatus, S.DeliveryExtension
into ##tmpSubError
From [SharePoint_Reporting_Service].dbo.ReportSchedule as R
	INNER JOIN [SharePoint_Reporting_Service].dbo.Schedule sc ON r.ScheduleID = sc.ScheduleID
	INNER JOIN [SharePoint_Reporting_Service].dbo.Subscriptions s ON r.SubscriptionID = s.SubscriptionID
	INNER JOIN [SharePoint_Reporting_Service].dbo.[Catalog] c ON r.ReportID = c.ItemID AND s.Report_OID = c.ItemID
	LEFT JOIN sqlAdm.dbo.tblAdmLogJobError as L on L.dtmRun = S.LastRunTime
		and L.strName = 'Subscription Failed: ' + Left(C.Name COLLATE DATABASE_DEFAULT, 225) + ' / ' + Cast(S.SubscriptionID as varchar(36))
WHERE s.LastRunTime >= cast(convert(varchar, getdate(), 112) as smalldatetime)
	and s.LastRunTime < Dateadd(hh, -1, getdate())
	and (s.LastStatus like '%fail%' or S.LastStatus like 'Error%' or S.LastStatus like '%Not Valid%')
	and L.strName is null

 

Ken Craig

Re: Optional parameter usage (either/or first parameter or second parameter) in SSRS

$
0
0

Hi all,

In my report I have two parameters PID and patientName, but user want to enter either PID or patientName. When I preview the report user can only enter one parameter not both. Is there any way  to create two parameter available but users  can enter only one parameter value?

Here is my report layout and query I used for that report. These two parameters comes from  one column 'String_NVC' as from query and column name 'Description' as from the report layout.

SELECT    Username_NVC AS Username,
String_NVC,
Time_DT AS UserActionDateandTime,
FROM     test
WHERE
 (CONVERT(date, Time_DT) >= CONVERT(date, @Time_DT_Start)) AND
                  (CONVERT(date, Time_DT) <= CONVERT(date, @Time_DT_END)) and


String_NVC  like '%Open'+'%'+@PID+'%'

and  String_NVC like '%Open'+'%'+@Patient_Name+'%'

Order by Time_DT  desc

Thanks,


bihelp


Opening an SSRS report in Excel

$
0
0
Hello

I've noticed than when opening an SSRS report in Excel, its columns increase. Eg where in SSRS it would have 4 columns, once it gets opened in Excel, we now have two columns where there was just one in SSRS.

Does anyone know a way of stopping this happening? I have one or two teams who like to move the data into Excel for further analysis, and the multiple-column issue is a pain for them.

Thanks

SSRS text box input validation

$
0
0
Hi I need to validate my text box value for instance when the user will enter the value if its 6 - 10 character its fine but if it's less than 6 I have to display a message invalid value.

You do not have permission to access this page

$
0
0

In SSRS 2008 R2, my profile is defined with the System Administrator and System User roles.  However, when I click the Security link for some of the folders on this report server, i get the message "You do not have permission to access this page".  Could you please tell me what additional security setting(s) I need to configure to allow full access to the folders/reports on this report server?

By the way, under Site Settings I have System Administrator and System User roles.  Under Security for the Home folder, I have Content Manager role.

In the report server log, just prior to the "you do not have permission" message, I see the message "ui!ReportManager_0-33!f70!10/19/2015-10:32:18:: e ERROR: HTTP status code --> 500".


Convert Milliseconds to HH:MM:SS

$
0
0

I am writing a report that Queries a SQL DB using 'SQL Server Business Intelligence Development Studio'. I have a field in the DB called duration and it is in milliseconds. I am trying to find an easy way to convert the format from Milliseconds to HH:MM:SS.

Nearest I can get is the following for the field:

=Int(((Fields!DURATION.Value/1000) / 60) / 60) &

":"& Int(((((Fields!DURATION.Value/1000) / 60) / 60) - Int(((Fields!DURATION.Value/1000) / 60) / 60)) * 60)

The output is in HH:MM. One issue with this is if the MM is say :03, it prints as :3. I lose the leading 0 so 9:03 (9hrs and 3 minutes) prints as 9:3. Where as 9:30 (9 hrs and 30 minutes) prints as 9:30 as it should.

Is there an easier way to do this?

TIA...

Mike...

previous value within a group

$
0
0

Hello all

i have a report 

which display 

Group value         col1        Per %

1                         188        

2                         109        109/188 = 58%

3                          48           48/109 = 26%

I know we can do it using lead and Lag in SQL but i have complex agregates in sql so, i have to do it in ssrs report.

how can i do this in ssrs .??


Dilip Patil..

SSRS in DMZ

$
0
0
Hi everybody,

One of my clients wants to setup his SSRS Server in a DMZ which has its own Active Directory.
His SSRS reports query a SSAS cube which is located in his local network and use another AD.
So for the moment he can not query his SSAS cube since his users are authenticated with the DMZ AD.
What can he do to solve his problem ? (Not move his SSAS cube in the DMZ ;) )

Thanks

Pete

The Value expression for the query parameter...which does not exist in the Parameters collection

$
0
0

I am adding security to my reports to limit which records appear based on who is executing the report. I modified all of my stored procedures that are used in report Datasets to accept an @UserId parameter. Our application will pass that parameter to the reports. I am now adding the parameter to the .rdl files themselves. For most, this was easy. I just add a hidden parameter, map it in the Dataset parameters list, and everything works. But for a few, I get this error:

The Value expression for the query parameter '@UserId' contains an error. The expression references the parameter 'UserId', which does not exist in the Parameters collection. Letters in the names of parameters must use the correct case. (rsRuntimeErrorInExpression)

I am absolutely sure there is no case mismatch problem as the parameter name was copy and pasted everywhere it appears, it works fine in dozens of reports, and it matches even in the error message. What the problem reports seem to have in common is that they have multiple Datasets that need the parameter where at one Dataset is used to select a value for another report parameter.

For example, a report will display information about customers. It has a multi-select parameter for a list of customers. It is now filtered by the @UserId. The main Dataset stored procedure for the report takes both the @CustomerIdList and the @UserId (in case the proc will be called other than by the report).

Report Builder (or SSRS) seems to get confused by @UserId being needed for both Datasets (CustomerList and CustomerData), where CustomerDataalso also needs the result of CustomerList as a parameter. Although the error message says that @UserId isn't a parameter, it clearly is.

How can I work around this problem?

Calculate Median Value

$
0
0

I am converting a report created using Crystal Reports 10 to Reporting Services.  The report contains a list of items with dollar values.  The original report displays both the Average and Median value.  I can easily ( using avg(Field1.Value!) ) determine the average but cannot find a function to determine the median.

How can I add the Median to the report?

 

Thanks in advance,

Greg

Reporting Services HTTP Log Retention

$
0
0

All,

Just looking to see if anyone knows how to change the default deletion date of the "ReportServerService_HTTP_<timestamp>.log" under the "\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles" directory location?

By default the following link says it deletes after 14 days, but i'm looking to have a 24 hour deletion date, and another question, can we up the trace log size limitation from 32 megabytes?

Link to HTTP: https://msdn.microsoft.com/en-us/library/bb630443.aspx

Thanks,

Jamie


SQL using md to create a directory

$
0
0

Hi All,

I have the below script to create directories based on my select statement.

create table students
(
f_name varchar(100),
l_name varchar(100)
);
insert into students values ('John','Smith'),
('Sam','Mark Hughes'),
('Nick','Hanks'),
('Kim','Masiye Moyo'),
('Joe','Zwane'),
('Kyle','Khan'),
('Bess','Botha'),
('Wayne','Lucas'),
('Sue','Bester'),
('Tebogo','Katane');

select l_name from students;


DECLARE  @Results table(
ID int identity(1,1) NOT NULL,
TheOutput varchar(1000))


CREATE TABLE #Students(l_name varchar(100) ) 
INSERT INTO #Students
    Select l_name from students
   

declare
@icmd varchar(2000),
@dirname varchar(64)

declare c1 cursor for select l_name from #Students
open c1
fetch next from c1 into @dirname
While @@fetch_status <> -1
begin
select @icmd = 'md D:\Students\' + @dirname
print @icmd
insert into @Results (TheOutput)
          exec master..xp_cmdshell @icmd

fetch next from c1 into @dirname
end
close c1
deallocate c1

The result I am getting is truncating the directory names as in the below:

Please assist,

Many thanks

Regards

Zimiso

Round up in SSRS?

$
0
0

I want to round 0.356 to 1? How can i do a round up in SSRS reporting services. 

Iam using this code:

The Sum of the Price_Call here is  0,3965 ---> I want to round it to one!

= Round (     Sum(Fields!Price_Call.Value), MidpointRounding.AwayFromZero   ) --- > This is always giving me 0


Adding subreport in page footer

$
0
0

Hi,

I was asked to add a subreport in my report footer so that it appears on every page of the report. I spent some time trying to figure it out or find an answer on the web, but it appears it can not be done. If anyone knows that it can be done, can you help me please?

Can't see the "dropdown" list for a report on SSRS 2012 (native mode):

$
0
0

Here's my setup:

1) SSRS in native mode

2) 2012

3) I have "Browser, Content Manager, My Reports, Publisher, Report Builder" permissions on the folder that has the report

Here's the issue: I can't see the drop down list associated with the report that's hosted inside the folder. Here's what I mean by drop down list -- the one that lists things like: properties, subscribe, etc. In other words If i click on that dropdown arrow, I don't see the list. Thanks in advance for your help!


Paras Doshi (Blog: ParasDoshi.com | Twitter:@Paras_Doshi )

ReportService2010.FindItems with TypeName SearchCondition

$
0
0

The following 

                    SearchCondition[] sc = {new SearchCondition() {
                                                Name = "TypeName"
                                                ,Values = new string[] {"Report"}
                                                ,Condition = ConditionEnum.Equals
                                                ,ConditionSpecified = true
                                            }};
                    catalogItems = ReportService2010.FindItems("/"
                                              ,BooleanOperatorEnum.And
                                             ,new Property[] {new Property(){Name = "Recursive",Value="True"}}
                                             ,sc
                                              );

returns the following error

System.Web.Services.Protocols.SoapException: The TypeName field has a value that is not valid. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidElementException: The TypeName field has a value that is not valid.
   at Microsoft.ReportingServices.WebServer.ReportingService2010Impl.FindItems(String Folder, BooleanOperatorEnum BooleanOperator, Property[] SearchOptions, SearchCondition[] SearchConditions, CatalogItem[]& Items)
   at Microsoft.ReportingServices.WebServer.ReportingService2010.FindItems(String Folder, BooleanOperatorEnum BooleanOperator, Property[] SearchOptions, SearchCondition[] SearchConditions, CatalogItem[]& Items)

The type appears to be correct. I've tried type of "Folder" and receive the same error.

Any insight would be appreciated.

Thanks, Bruce

Viewing all 10045 articles
Browse latest View live


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