Showing posts with label RDL. Show all posts
Showing posts with label RDL. Show all posts

Saturday, April 18, 2015

RenderFormat.IsInteractive and RenderFormat.Name

Sometimes reports require branding not to be printed when exported to Excel. Since SQL Server 2008 R2 and above this can be done using the RenderFormat.IsInteractive property.

Globals!RenderFormat.IsInteractive will return true when viewing the report in preview mode or using ReportManager tool and will return false for the export formats.

It will really good to set the property if you want to

  • Use complex formatting and interactivity for on-screen display, but optimize for Excel export and post-processing with a more data oriented view.
  • Print: add/omit text disclaimers, logos, background images, etc.
  • PDF/Excel/Word: dynamically disable hyperlinks when report is exported
  • TIFF/Print: define a particular color chart palette for all rendering formats, but use an optimized grayscale palette when using TIFF for fax, or printing
  • If in your particular situation you have to make decisions based on the actual type of rendering format, you have to write your expression using the exact, case-sensitive name of the rendering extension as registered in RSReportServer.config / RSReportDesigner.config using the property Globals!RenderFormat.Name.

    Reporting Services built-in rendering extension names include: "WORD", "EXCEL", "PDF", "MHTML", "IMAGE" (includes TIFF, Print). Note that interactive viewing in preview or report manager uses the "RPL" renderer.

    Technorati Tags: ,

    Tuesday, February 08, 2011

    The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded.

    You may get the above error when trying to view a RDLC report using with the VS 2005 or VS 2008 viewer controls with 2008 schema.

    When using local mode, you are using the same report processing engine that was shipped with SQL Server 2005. This engine does not understand the new report definition schema and attempting to load a report created with one of the new SQL Server 2008 authoring tools will result in this error.

    Open the RDLC in VS2010 and use the v10 of the report viewer control to run the report.

    RDL and RDLC

    RDL - RDL stands for Report Definition Language

    RDLC - Report Definition Language Client-side processing

    RDL files are created by the SQL Server 2008 version of Report Designer. RDLC files are created by the Visual Studio 2008 version of Report Designer.

    RDL and RDLC formats have the same XML schema. However, in RDLC files, some values (such as query text) are allowed to be empty, which means that they are not immediately ready to be published to a Report Server. The missing values can be entered by opening the RDLC file using the SQL Server 2008 version of Report Designer. (You have to rename .rdlc to .rdl first.)