Datagrid not retaining viewstate on postback

May 24th, 2007 by kwanl

I haven't done much DataGrid programming in the past but it's used quite a bit at my new job. I thought I was pretty proficient at ASP.Net 1.1 but I was having some trouble getting the DataGrid viewstate to work. The problem was when you have AutoGenerateColumns set to false you have to do a little bit of extra work for the viewstate to load, you need to set up the columns on each page load.

http://www.velocityreviews.com/forums/t111954-net-datagrid-contents-lost-on-postback.html

Datagrid not retaining viewstate on postback

May 24th, 2007 by kwanl

I haven't done much DataGrid programming in the past but it's used quite a bit at my new job. I thought I was pretty proficient at ASP.Net 1.1 but I was having some trouble getting the DataGrid viewstate to work. The problem was when you have AutoGenerateColumns set to false you have to do a little bit of extra work for the viewstate to load, you need to set up the columns on each page load.

http://www.velocityreviews.com/forums/t111954-net-datagrid-contents-lost-on-postback.html

Writing a Rendering Extension for Reporting Services 2005

May 3rd, 2007 by kwanl

One glaring omission from the out-of-the-box SSRS 2005 output formats is plain text ASCII. I know there is a CSV option available but CSV is primarily used for data-interchange. My goal was to create a custom rendering extension to output reporting services reports as attractive as possible in plain text ASCII.

Conceptually, the process is simple, you provide a class that implements the Microsoft.ReportingServices.ReportRendering.IRenderingExtension interface and add an entry to the rsreportserver.config file for your assembly.

 

Implementing IRenderingExtension

The IRenderingExtension interface is really straight-forward and there are only a few methods you have to implement with Render and RenderStream being the most important (and challenging).

Modifying rsreportserver.config 

The rsreportserver.config file controls various settings for the Report Server including which extensions are available. To add a rendering extension, you add a new Extension element under the Extensions/Render element.

For example, this adds an extension for a rendering extension name SimpleRenderer.Class1 in the assembly SimpleRenderer.dll. 

 <Extension Name="Kwan" Type="SimpleRenderer.Class1,SimpleRenderer" Visible="true" /> 

In addition to modifying the configuration file you need to make sure your assembly is fully trusted. This is because the classes in Microsoft.ReportingServices.ReportRendering only support fully trusted callers. There are several ways to do this but the preferred method is to update the policy file to give your specific assembly full trust.

 

Add the following to your rssrvpolicy.config (specifying the public key blob for your assembly):

                            <CodeGroup
                                    class="UnionCodeGroup"
                                    version="1"
                                    PermissionSetName="FullTrust"
                                    Name="SimpleRenderer_Strong_Name"
                                    Description="This code group grants SimpleRenderer code full trust. ">
                                <IMembershipCondition
                                        class="StrongNameMembershipCondition"
                                        version="1"
                                        PublicKeyBlob="…"
                                />
                            </CodeGroup>
 

Writing a Rendering Extension for Reporting Services 2005

May 3rd, 2007 by kwanl

One glaring omission from the out-of-the-box SSRS 2005 output formats is plain text ASCII. I know there is a CSV option available but CSV is primarily used for data-interchange. My goal was to create a custom rendering extension to output reporting services reports as attractive as possible in plain text ASCII.

Conceptually, the process is simple, you provide a class that implements the Microsoft.ReportingServices.ReportRendering.IRenderingExtension interface and add an entry to the rsreportserver.config file for your assembly.

 

Implementing IRenderingExtension

The IRenderingExtension interface is really straight-forward and there are only a few methods you have to implement with Render and RenderStream being the most important (and challenging).

Modifying rsreportserver.config 

The rsreportserver.config file controls various settings for the Report Server including which extensions are available. To add a rendering extension, you add a new Extension element under the Extensions/Render element.

For example, this adds an extension for a rendering extension name SimpleRenderer.Class1 in the assembly SimpleRenderer.dll. 

 <Extension Name="Kwan" Type="SimpleRenderer.Class1,SimpleRenderer" Visible="true" /> 

In addition to modifying the configuration file you need to make sure your assembly is fully trusted. This is because the classes in Microsoft.ReportingServices.ReportRendering only support fully trusted callers. There are several ways to do this but the preferred method is to update the policy file to give your specific assembly full trust.

 

Add the following to your rssrvpolicy.config (specifying the public key blob for your assembly):

                            <CodeGroup
                                    class="UnionCodeGroup"
                                    version="1"
                                    PermissionSetName="FullTrust"
                                    Name="SimpleRenderer_Strong_Name"
                                    Description="This code group grants SimpleRenderer code full trust. ">
                                <IMembershipCondition
                                        class="StrongNameMembershipCondition"
                                        version="1"
                                        PublicKeyBlob="…"
                                />
                            </CodeGroup>
 

Web Part Maintenance Page

April 9th, 2007 by kwanl

An old tip that's still very useful. When you have a web part that's causing you problems and you can't even get to the web part page try using the Web Part Maintenance Page.

To access the Web Part Maintenance Page  you just suffix your web part page's address with "?contents=1".

Web Part Maintenance Page

April 9th, 2007 by kwanl

An old tip that's still very useful. When you have a web part that's causing you problems and you can't even get to the web part page try using the Web Part Maintenance Page.

To access the Web Part Maintenance Page  you just suffix your web part page's address with "?contents=1".

Changes to the SSRS web services with Integrated Mode

March 28th, 2007 by kwanl

When you configure your Report Server to use Integrated Mode there will be some changes in the web services.

There is a new SOAP endpoint, ReportService2006.asmx, that replaces ReportService2005.asmx. In integrated mode all calls to ReportService2005 will result in an "operation not supported" exception.

The ReportExecution2005.asmx end point will still work in both integrated and native modes. However, because he reports are stored in SharePoint, the report server paths are no longer used.

A set of SharePoint proxy end points have also been added for working with a report server in Integrated mode. Using these endpoints, SharePoint will handle the authentication between the SharePoint server and the report server.

The ReportServiceAuthentication proxy endpoint is used for authentication with a report server when an application is using Forms Authentication.

Features Supported by Reporting Services in SharePoint Integrated Mode

Using SOAP API In a SharePoint Application

*Update*

So far, I have found that the biggest change in the endpoints is that the ReportPath for web methods that expect one is now a SharePoint path. Other than this I haven't had to make any changes in my web service calls.

Changes to the SSRS web services with Integrated Mode

March 28th, 2007 by kwanl

When you configure your Report Server to use Integrated Mode there will be some changes in the web services.

There is a new SOAP endpoint, ReportService2006.asmx, that replaces ReportService2005.asmx. In integrated mode all calls to ReportService2005 will result in an "operation not supported" exception.

The ReportExecution2005.asmx end point will still work in both integrated and native modes. However, because he reports are stored in SharePoint, the report server paths are no longer used.

A set of SharePoint proxy end points have also been added for working with a report server in Integrated mode. Using these endpoints, SharePoint will handle the authentication between the SharePoint server and the report server.

The ReportServiceAuthentication proxy endpoint is used for authentication with a report server when an application is using Forms Authentication.

Features Supported by Reporting Services in SharePoint Integrated Mode

Using SOAP API In a SharePoint Application

*Update*

So far, I have found that the biggest change in the endpoints is that the ReportPath for web methods that expect one is now a SharePoint path. Other than this I haven't had to make any changes in my web service calls.

ASP.Net v1.1 and v2.0 side by side

March 22nd, 2007 by kwanl

You can have ASP.Net web applications running different versions of the .Net framework running in IIS. The restriction is that a single  process can not load both v1.1 and v2.0, that is, within an application pool all the web applications must use the same .Net framework version.

To change the target ASP.Net version of a web application, right click on the web application's folder in IIS and select properties, ASP.Net tab.

ASP.Net v1.1 and v2.0 side by side

March 22nd, 2007 by kwanl

You can have ASP.Net web applications running different versions of the .Net framework running in IIS. The restriction is that a single  process can not load both v1.1 and v2.0, that is, within an application pool all the web applications must use the same .Net framework version.

To change the target ASP.Net version of a web application, right click on the web application's folder in IIS and select properties, ASP.Net tab.