Disabling Export Formats

Apr 2, 2008



I'm currently using SQL Server 2000 and SSRS 2000 with the latest Service Packs.


I need to disable Excel Exports for a single report.

I've found a way to disable Exporting Formats but it disables for ALL REPORTS on the server.
This involves changing the rsreportserver.config file.
http://blogs.digineer.com/blogs/jasons/archive/2006/05/10/93.aspx


Another site mentions a way to disable Exporting Formats for a single Report.
http://mikemason.ca/2007/04/30/



Code Snippetusing System.Reflection;
using Microsoft.Reporting.WebForms;
using Microsoft.SqlServer.ReportingServices2005.Execution;

namespace MyProject
{
public class ServerReportDecorator
{
private readonly ServerReport serverReport;

public ServerReportDecorator(ReportViewer reportViewer)
{
this.serverReport = reportViewer.ServerReport;
}

public ServerReportDecorator(ServerReport serverReport)
{
this.serverReport = serverReport;
}

public void DisableUnwantedExportFormats()
{
foreach(RenderingExtension extension in serverReport.ListRenderingExtensions())
{
if(extension.Name == "XML" || extension.Name == "IMAGE"
|| extension.Name == "MHTML")
ReflectivelySetVisibilityFalse(extension);
}
}

private void ReflectivelySetVisibilityFalse(RenderingExtension extension)
{
FieldInfo info = extension.GetType().GetField("m_serverExtension",
BindingFlags.NonPublic
| BindingFlags.Instance);
if (info != null)
{
Extension rsExtension = info.GetValue(extension) as Extension;
if(rsExtension != null)
{
rsExtension.Visible = false;
}
}
}
}
}



I'm looking for further clarification of this process.
1. Where I can download the Microsoft.SqlServer.ReportingServices2000 dll?
2. Does anyone have a project example of the process? How/When to actually use the code quoted?

View 2 Replies


ADVERTISEMENT

Disabling Export To Excel Sheets In MS SQL Reports 2005

May 26, 2007

Hello All,



Can i disable export to Excel sheet in ms sql server 2005 reporting services.



This is due to security reasons as the client doesnt want the reports to be send via mail.



Can someone provide the solution on how to disable export to excel



Thanks

Pritam Shetty

View 3 Replies View Related

Controlling Export Formats Based On User Role

Apr 26, 2007

I'm using Reporting Services 2000 and I have a situation where I need to specify the file formats available to export. I know I can change the RSReportServer.config file to change these at a global level, but what I really need is to be able to configure these differently for different user groups. For example:



group 1 - has all available export formats available

group 2 - only has the ability to export to excel

group 3 - has no option to export to any format.



Is there a way for this to be done? If so, can anybody give me any pointers on how it can be done?



Any help given will be most appreciated!!

View 3 Replies View Related

Trigger - Disabling

May 18, 2001

I need to disable a trigger for a week w/o droping it. Is there a way in sql ?

Thanks and nice week-end.

Ivan

View 2 Replies View Related

Date Formats...UK

Oct 9, 2001

My SQL 7.0 database is set to show UK format date ranges. But when opening a table and adding criteria to the grid pane I having to put the US format date to retrive correct results...

Is this correct. I am wanting to be aboe to enter UK format in the criteria

Thanks...Scott

View 2 Replies View Related

Date Formats In SQL 7

Jan 23, 2001

Hi,

I am creating a VB application that will run on a NT machine with Regional Settings as UK English and dd/mm/yyyy settings. When I try to input these values into SQL 7.0 ( default database setting mdy and us_english with Regional Settings as UK dd/mm/yyyy) , I get the error -" The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value " .
Can I change my databse to always be dmy format. It seems to be active for a connection , can it be configured somewhere .

Any help will be greatly appreciated !

Regards

Anand

View 3 Replies View Related

Job Is Disabling Every Night

Apr 12, 2002

Please help if you can! I have setup a job that runs every day on an hourly basis. Every morning I find that it's been disabled. The funny thing is is that the schedule is disabled, but the job is not (you see 'Enabled' in the jobs list in EM, but when you view the schedules tab, it's disabled.) Also, it runs a several times before becoming disabled.

TIA,

Colleen

View 2 Replies View Related

Disabling Replication

Jan 9, 2003

I have a server that was being used for logshipping and had
replication set up at some point as well. One of the databases got out
of sync in the logshipping process so I removed logshipping and was
going to reinitialize the database and set up the logshipping again.
The database is in read only mode and when I try to take it out of
read only I get the following message:

Error 5063: Database 'XXXXXXXX' is in warm standby. A warm stanby
database is read-only. ALTER DATABASE statment failed. sp_dboption
command failed.

I have tried to disable replication on the server but get the
following error message:

SQL Server Enterprise Manager could not disable 'SRVXXXX' as a
publisher.
Error 3906: Could not run BEGIN TRANSACTION in database 'XXXXXXX'
because the database is read only.

So my problem is that I can't take the database out of read-only mode
because of replication and I can't disable replication because the
database is in read-only mode.

Has anyone come across this before and how should I resolve it? I
tried dropping the database as well and that didn't work either.

Any ideas or help would be greatly appreciated.

Thanks in advance,

Brad

View 1 Replies View Related

Disabling The Trigger

Mar 25, 2003

Hi,

I have a update trigger on a table. Can I disable this trigger for duration of a job which updates this table.

Thanks in advance ...j

View 1 Replies View Related

Disabling Triggers

Feb 15, 2001

Is there a way to disable a trigger when performing a transaction besides dropping and recreating the trigger? I am trying to perform an insert on a table, and this keeps firing a trigger that I want to disable.

Any help is appreciated.

View 3 Replies View Related

Changing Formats

Apr 25, 2007

Hey guys,
I have a file that has date formatted like so: 2006-11-16 20:12:00
I would like the dateformat to be like mm/dd/yyy hh:mm

The file is being pulled into a varchar field..... as 2006-11-16 20:12:00
when I do a conversion i can only get it to mon 11,2006


any suggestions

View 1 Replies View Related

Disabling Distribution DB

May 28, 2008

I have accidentally registered an existing database as a distribution database, which made it a system database.
the data itself is safe and sound, but I want to undo the whole thing.

How can I do this?

View 1 Replies View Related

Disabling Job Using VBScript

Jun 6, 2008

I have an SQL job that runs a .vbs script. It has the following code:

Cmd2.ActiveConnection = Conn2
Cmd2.CommandText = "USE msdb EXEC sp_update_job @job_name = 'Email Download',@enabled = 0"
Cmd2.CommandType = 1
Cmd2.Execute()

It's not disabling the job. If I execute in Query Analyzer, it works. I'm thinking it might be a permissions issue. Any suggestions?

TIA

View 10 Replies View Related

Date Formats

Dec 4, 2006

I read this and got confused...I use PHP and got this:$sql = "delete from blabla where startdate< =to_date('2000.05.05','YYYY-MM-DD')";$result=odbc_exec($conn, $sql);Result: Warning: odbc_exec() [function.odbc-exec]: SQL error:[Microsoft][ODBC SQL Server Driver][SQL Server]'to_date' is not arecognized function name.to_date should work?At the other end i'd like to read out startdate as a date var or formatit as I need.... (dd.mm.yyyy). Convert makes me confused... helpplease?S

View 3 Replies View Related

Q. About Binary Formats.

Jul 20, 2005

Is it true that binary and varbinary has a max-kapacity at 8000 bytes? Imjyst unsure how to read the dokumentation and want to be completely sure.And image is only one to use for data aobve that size?Thx in regards for clearing things out for meReagardsAnders

View 1 Replies View Related

Disabling Primary Key

Jul 20, 2005

Hii have a table with primary key defined on col1 and col2. now i want tohave col3 also included in primary key. when i alter the table it givesme error for duplicate rows. there is an option for 'with nocheck' butit only works with check or foreign key constraint. is there any optionin sql server like in oracle 'no validate' which doesnt validate theexisting data and force the data validation from new records.thanxFarid*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 5 Replies View Related

SSRS Formats

May 1, 2008

Hi,

I have two beginner questions:
1. How should I set up report layout/printing format so it would fit to the page?
2. Is there a way to change the color of every other row in the table? Can I highlight the rows based on some kind of a condition?
Thank you.

View 4 Replies View Related

Time Formats

Mar 7, 2007

OK - totally new to this game but here goes ...

I want to put together a database to record times achieved by swimmers in competition. The database itself is simple but I don't know what format to use to store the time achieved. Times can vary, for example 35.27 (SS.00), 1.12.63 (MM.SS.00). Oh, and by the way I want to rank the output but haven't even begun to think about that yet!

View 3 Replies View Related

Disabling All Logins

Dec 4, 2007

Hi all,


1) Can anybody provide me the script for DISABLING all the jobs in the server and vice versa (i.e.) for enabling also.


2) Script for DISABLING LOGINS and script for ENABLING all Logins.

Its Sql Server 2005


Thanks... Any Help Greatly appreciated.

View 6 Replies View Related

Queue Not Disabling

Oct 11, 2006

HI There

My activated proc is rolling back the transaction and putting the message abck on the queue infinately ?

Normally it disabled the queue after a few rollbacks, i can see in the sql log that it just keeps rolling back and re-activating thousands of times.

It only stops when i disable activation on the queue.

WHy is the queue not disabling ?

Thanx

View 3 Replies View Related

SQE Vs. SQL 2005 .mdf Formats?

Sep 4, 2006

Hi,

My ISP says that the file format for SQE .mdf files is different than a regular sql2005 .mdf file. So, what I am told to do is backup my SQE file, and send it to them to restore into a SQL2005 format.

Does that make sense? Or should I simply be able to upload a .mdf file to their SQL2005 server without backing it up for them to restore?

Thanks,

-JS

View 6 Replies View Related

Disabling The TransactionLog

Sep 20, 2006

I have an SSIS task that transforms 70 million rows of data nightly.

The data is dumped and imported fresh every day.

Obviously I don't want my production Transaction Log getting cluttered up with 70 million rows of transaction logs daily.

Is there any way to avoid logging to the transaction log with an SSIS task?

View 5 Replies View Related

Different Datetime Formats

Sep 25, 2006

Hello..

I have a problem with DateTime...In my local sql server I use "mm.dd.yyyy" format and i work fine with the database. But that crashed in my clients sql server. Their sql server wants "dd.mm.yyyy" format. Ofcourse I can use parameterized queries and solve the problem but I write the program on WinCE5.0 and I use the RDA method to access the SQL Server.In RDA,I have no chance to use parameterized queries as I know.

How can I solve the problem and what causes this problem? A setting in sql server or something else?What causes this difference..?

I wish I could explained my problem..

Thanks in advance.

View 4 Replies View Related

Calculations And Formats In SRS

Nov 2, 2007



Hi--

I am relatively new to SQL Reporting Services and have a couple basic questions (I think they are basic).

First, lets say that I have the following fields in the body of my report: Sales, Cost, Profit, and Percent Profit. Percent Profit is a calculated field of profit/sales.

Then, I have a grouping by customer, with a footer with the sum of sales, sum of cost, sum of profit. And I also want percent profit, but I do not want a sum or average of percent profit. Instead I want percent profit calculated as sum of profit/sum of sales. I cannot seem to get this to work with a calculated field. I must have the syntax wrong (as I was just taking sum(fields!profit.value)/sum(fields!sales.value)*100.

Also, I understand the format of #,# can be used to print a blank instead of zero. But this format also suppresses any decimals. So if I have a field that needs two decimals when there is a value, but need it to be blank when 0.00 is returned, what is the appropriate format?

Any help that can be provided would be much appreciated. As books are great, but sometimes do not explain everything. Thanks!
-Christina

View 8 Replies View Related

Time Formats

Mar 7, 2007



OK - totally new to this game but here goes ...

I want to put together a database to record times achieved by swimmers in competition. The database itself is simple but I don't know what format to use to store the time achieved. Times can vary, for example 35.27 (SS.00), 1.12.63 (MM.SS.00). Oh, and by the way I want to rank the output but haven't even begun to think about that yet!

View 5 Replies View Related

Constraint Disabling

Dec 20, 2006

Hi,

Is there any way to disable/enable constraints on the table?

Command "ALTER TABLE table_name {CHECK|NOCHECK} CONSTRAINT ALL" produces error.

View 8 Replies View Related

Disabling Foreign Key Constraints

Dec 22, 2000

I want to disable foreign key constraints en mass. Is there a way to do this?

I know that I can go into each table and navigate to the Relationship tab of Properties and uncheck the "Enforce relationship for INSERTs and UPDATEs" box, but I'd much prefer to automate this process with a query since there are 160+ tables and probably 200+ relationships to disable.

I figure that sysconstraints my be the ticket, but I will keep experimenting until I get the right solution. In the meantime, any insight to steer me in the right direction is appreciated.

View 1 Replies View Related

Converting Date Formats

Apr 10, 2000

Hi,

I need to convert the output of a query

From:
Sep 13 1999 12:00AM

To:

1999-09-13 00:00:00.000

I need it to be in 7.0 format)

Thanks.

View 1 Replies View Related

Disabling Publication Using SQL DMO. URGENT!!!!!!!!

Oct 29, 1999

Hi,
I'm using DMO (SQLOLE65.dll) to programmatically replicate selected publications. The Publication object supports a property called Enabled, which can be set to FALSE. I'm setting the enabled property to TRUE for those publications that need be replicated, and make the others FALSE. Still, all publications get replicated. [I give DoAlter to commit the changes i made.]
Any solution,Please mail me ASAP to venkateswaranb@synectics.soft.net

Thanks,
Venkat

View 2 Replies View Related

Good Ol` Date Formats And BCP

Oct 26, 1998

Hey all,
I`m trying to BCP in some data from a csv file. It has dates formatted like d/mm/yy and when run BCP it errors. Of course...SQL language is set to English(United States) so it wants it in mm/dd/yy. But from what I`ve read in the archive, from Sharon at least, is that only in BCP will it use the NT date setting which for me is English(Australian) or d/mm/yy. So I`m thinking, `that`s ok` my data`s dates like d/mm/yy and nt dates like d/mm/yy it`ll bcp in fine - but no.

What can I do? I cant change my sql setting and I cant change the way I dump my dates to the csv! Suggestions......

TY
Simon

View 2 Replies View Related

Disabling FOREIGN KEY Constraint...

Jan 11, 2007

sql 2000, northwind databse

code in sql analyzer:


Code:


ALTER TABLE categories NOCHECK CONSTRAINT ALL
TRUNCATE TABLE categories
ALTER TABLE categories CHECK CONSTRAINT ALL



but still i am getting the error:

Quote: Server: Msg 4712, Level 16, State 1, Line 2
Cannot truncate table 'categories' because it is being referenced by a FOREIGN KEY constraint.

what i need to do is write a query that just cleans all the tables of all data.

View 4 Replies View Related

Disabling Named Pipes

Jul 23, 2005

In the process of doing some routine monitoring/clean-up we'vediscovered that several (many?) users are apparently set to access ourSQL Server 2000 database instances via the Named Pipes protocol. Inreadings and recommendations we've decided that our WAN would be bestserved if we use the less "chatty" TCP/IP.As such we've also decided to try to enforce this decision to useTCP/IP exclusively using the domain login script used by all of ourend-users.Question: does anyone know what registry entries are created/used toindicate that TCP/IP is enabled and is the default protocol for SQLServer 2000? Our environment is: XP Pro SP2 and SQL Server 2000(typically SP3).TIAGlenn - newbie DBA

View 5 Replies View Related

Conversion Between Date Formats

Jul 23, 2005

Hi. I have a DB in which we store dates in yyyy/mm/dd. However when wewant to display this date via a web frontend, it needs to be indd/mm/yyyy. I've declared a function (shown below) which convertsbetween these date formats and returns a varchar(20). This works finehowever now I need to have the ability to sort on this date field inthe frontend. This requires my function to return a datetime in therequired format. Can this be done?DECLARE @InputDate nvarchar(20)DECLARE @OutputDate nvarchar(20)DECLARE @Day nvarchar(2)DECLARE @Month nvarchar(2)DECLARE @Year nvarchar(4)DECLARE @Time nvarchar(12)SET @InputDate = '2005/03/01 14:30:00'SET @Day = cast(datepart(day,@InputDate) as nvarchar(2))SET @Month = cast(datepart(month,@InputDate) as nvarchar(2))SET @Year = cast(datepart(year,@InputDate) as nvarchar(4))SET @Time = substring(cast(@InputDate as nvarchar(23)),12,12)SET @OutputDate = replicate('0',2-len(@Day)) + @Day + '/' +replicate('0',2-len(@Month)) + @Month + '/' +@Year + ' ' + @TimeSELECT @OutputDate AS OutputDateThxVilen

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved