Showing posts with label friends. Show all posts
Showing posts with label friends. Show all posts

Sunday, March 25, 2012

Customising toolbar in the browser of RS HTML viewer

Dear friends,

please help me by commenting on my query.

Query::

I want to know how to customise the tool bar in RS HTML viewer, we can hide or show the toolbar using rc:toolbar= false/true, But i want to customise the tool bar.

ie, There is a combo for export formats to export the displaying reports. I want to customise that combo. I can clear the items by removing the extension element in the config of RS, but i want to do it in run time .

ie, My different reports should show different export formats simulteniously

You can customize the individual items on the toolbar with the information below:

http://blogs.msdn.com/bimusings/archive/2005/07/08/436887.aspx

However, there is no way to dynamically customize the rendering extensions that can be used at runtime (or on a per-report basis). You essentially enable or disable each rendering extension in the config files, and based on this work, certain formats show or don't show in the combo-box.

If you *must* have this functionality, I'd suggest that you turn off the toolbar completely and create your own version of the HTML toolbar which handles paging, zooming, etc. via URL Access (There is a sample of this in SSRS 2000). If you go this route, YOU can choose what rendering extensions to show the user in your own combo-box...However this will take a fair amount of work.

|||

As u said i checked the path

C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\styles

the Styles folder doesn't exist. my version is RS 2000 enterprise Edition.

i searched for .css files in my installation folder i only got one major css ie ,reportingservices.css in

Reportmanager\styles

|||

It's very helpful and good article.

but can we make the changes in main "htmlviewer.css" and we got the reflected changes in all the reportserver reports.so by doing this we don't have to make another copy of css file and give "rc:Stylesheet=cssfilename".

i have also second question is there any way by which we can pass "rc:Stylesheet=cssfilename" URL to parent report to child report(by drilling down-jump to report) method.

thanks in advance.

|||

i didnt see any provision for adding url parameters in child reports. but we shall try one thing .

In your parent u add a parametr in some name "stylesheet" , and pass the value . this we can do . and while making the chil report u can assign parametrs or that , so create a parameter in the name "rc:Stylesheet" and select the value . the value is the parent parame value

ie , "rc:Stylesheet = stylesheet "

hope u will inform me regarding this

|||

Hai it's good idea, thanks ..

i did one try and it's working.

i had add "rc:Stylesheet=cssfilename" in my parent report, now when i am drilling down to child report

"rc:Stylesheet=cssfilename" parameter will automatcally carried forward to next report(child report).so there is no problem

for passing "rc:Stylesheet=cssfilename" one report to another report.

but i try your solution in different case, because i have also problem while passing "rs:clearsession=true" to other report.

Thanks,
Sanket.

|||

Hi .

I had made the changes in respective CSS file for hiding print icon in report toolbar and deployed report in local reporting

service machine (LAN) and our onsite machine.

but the problem i am facing is when i am accessing my local reporting server machine at that time print icon is not

visible.so it's as per my requirement. but when i am accessing our onsite machine reporting server at that time i seen print

icon and it's only seen in my PC, my other team members doesn't seen that print icon both on local reporting service machine

and onsite reporting service machine.

can anyone help me out in this issue, because it's very urgent ..

Thanks,
Sanket.

Customising toolbar in the browser of RS HTML viewer

Dear friends,

please help me by commenting on my query.

Query::

I want to know how to customise the tool bar in RS HTML viewer, we can hide or show the toolbar using rc:toolbar= false/true, But i want to customise the tool bar.

ie, There is a combo for export formats to export the displaying reports. I want to customise that combo. I can clear the items by removing the extension element in the config of RS, but i want to do it in run time .

ie, My different reports should show different export formats simulteniously

You can customize the individual items on the toolbar with the information below:

http://blogs.msdn.com/bimusings/archive/2005/07/08/436887.aspx

However, there is no way to dynamically customize the rendering extensions that can be used at runtime (or on a per-report basis). You essentially enable or disable each rendering extension in the config files, and based on this work, certain formats show or don't show in the combo-box.

If you *must* have this functionality, I'd suggest that you turn off the toolbar completely and create your own version of the HTML toolbar which handles paging, zooming, etc. via URL Access (There is a sample of this in SSRS 2000). If you go this route, YOU can choose what rendering extensions to show the user in your own combo-box...However this will take a fair amount of work.

|||

As u said i checked the path

C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\styles

the Styles folder doesn't exist. my version is RS 2000 enterprise Edition.

i searched for .css files in my installation folder i only got one major css ie ,reportingservices.css in

Reportmanager\styles

|||

It's very helpful and good article.

but can we make the changes in main "htmlviewer.css" and we got the reflected changes in all the reportserver reports.so by doing this we don't have to make another copy of css file and give "rc:Stylesheet=cssfilename".

i have also second question is there any way by which we can pass "rc:Stylesheet=cssfilename" URL to parent report to child report(by drilling down-jump to report) method.

thanks in advance.

|||

i didnt see any provision for adding url parameters in child reports. but we shall try one thing .

In your parent u add a parametr in some name "stylesheet" , and pass the value . this we can do . and while making the chil report u can assign parametrs or that , so create a parameter in the name "rc:Stylesheet" and select the value . the value is the parent parame value

ie , "rc:Stylesheet = stylesheet "

hope u will inform me regarding this

|||

Hai it's good idea, thanks ..

i did one try and it's working.

i had add "rc:Stylesheet=cssfilename" in my parent report, now when i am drilling down to child report

"rc:Stylesheet=cssfilename" parameter will automatcally carried forward to next report(child report).so there is no problem

for passing "rc:Stylesheet=cssfilename" one report to another report.

but i try your solution in different case, because i have also problem while passing "rs:clearsession=true" to other report.

Thanks,
Sanket.

|||

Hi .

I had made the changes in respective CSS file for hiding print icon in report toolbar and deployed report in local reporting

service machine (LAN) and our onsite machine.

but the problem i am facing is when i am accessing my local reporting server machine at that time print icon is not

visible.so it's as per my requirement. but when i am accessing our onsite machine reporting server at that time i seen print

icon and it's only seen in my PC, my other team members doesn't seen that print icon both on local reporting service machine

and onsite reporting service machine.

can anyone help me out in this issue, because it's very urgent ..

Thanks,
Sanket.

Tuesday, March 20, 2012

Custom Sql Exceptions through the CLR

Friends,

First off, congrats and thank you to everyone at Microsoft for all of the hard work they have put into Sql Server 2005 and .NET 2.0 - it is simply amazing technology.

On that note, I was wondering if it was possible to create my own custom exceptions that I can throw in my stored procedures and then catch in my application code?

For example, say I wanted to create a Custom Sql Exception called "DuplicateEmailInSqlDatabaseTableException" and then, within a stored procedure where data is being attempted to be inserted, I could check for a duplicate email record and then throw the exception. At that point, I would like to be able to catch that exception in my C# data layer and work from there.

Is this possible? I feel like it could be but am unsure where to start.

Shaun C McDonnell

Is there anyone out there? ;)|||You can definitely throw a custom exception. The problem however is that this will then propagate through from CLR -> SQL -> Client. When the exception leaves the CLR inside SQL Server it goes through the SQL layer. SQL sees that this is now an unhandled exception and wraps a 6522 error ("A .NET Framework error occurred during execution error around your exception ...") around your exception. So when the client receives the exception it is no longer your custom exception, but a SqlException.

You would have thought that your exception would be part of the SqlError collection as a specific error object, but it's not. You have to, in the Message property, look for your Exception class name together with the error message and retrieve it from there as a string.

Niels|||

We are considering optionally tunneling (serialize exception on the server & deserialize on the client) SqlClr exceptions to managed clients for future versions of SqlServer.

We are also looking into the possibility of exposing managed exceptions to TSQL (IE. @.@.ClrException) as UDT to allow TSQL inspection.

Beysim.

Custom Sql Exceptions through the CLR

Friends,

First off, congrats and thank you to everyone at Microsoft for all of the hard work they have put into Sql Server 2005 and .NET 2.0 - it is simply amazing technology.

On that note, I was wondering if it was possible to create my own custom exceptions that I can throw in my stored procedures and then catch in my application code?

For example, say I wanted to create a Custom Sql Exception called "DuplicateEmailInSqlDatabaseTableException" and then, within a stored procedure where data is being attempted to be inserted, I could check for a duplicate email record and then throw the exception. At that point, I would like to be able to catch that exception in my C# data layer and work from there.

Is this possible? I feel like it could be but am unsure where to start.

Shaun C McDonnell

Is there anyone out there? ;)|||You can definitely throw a custom exception. The problem however is that this will then propagate through from CLR -> SQL -> Client. When the exception leaves the CLR inside SQL Server it goes through the SQL layer. SQL sees that this is now an unhandled exception and wraps a 6522 error ("A .NET Framework error occurred during execution error around your exception ...") around your exception. So when the client receives the exception it is no longer your custom exception, but a SqlException.

You would have thought that your exception would be part of the SqlError collection as a specific error object, but it's not. You have to, in the Message property, look for your Exception class name together with the error message and retrieve it from there as a string.

Niels|||

We are considering optionally tunneling (serialize exception on the server & deserialize on the client) SqlClr exceptions to managed clients for future versions of SqlServer.

We are also looking into the possibility of exposing managed exceptions to TSQL (IE. @.@.ClrException) as UDT to allow TSQL inspection.

Beysim.