Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7622051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:21:17+00:00 2026-05-31T04:21:17+00:00

My project is ASP.Net WebForms on 4.0 framework, using the ReportViewer 10, local RDLC

  • 0

My project is ASP.Net WebForms on 4.0 framework, using the ReportViewer 10, local RDLC reports rendered using Local processing mode.

My problem is that many of the expressions in my report are not evaluating. For example, I have a textbox in the footer of the report with the simple expression of =Globals!PageNumber – but when the report runs, i just get #Error in that field. I get a similar #Error just doing a ToString on one of my fields – =Fields!MyBooleanField.Value.ToString().

Also in my footer, =DateTime.Now DOES work, while =Globals!ExecutionTime does NOT work.

This makes no sense to me – it’s as if I’m missing a reference or something. I have references in my project to both Microsoft.ReportViewer.Common (v10) and Microsoft.ReportViewer.WebForms (v10).

Anyone have any suggestions as to what I’m missing, or how I can get this resolved?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:21:19+00:00Added an answer on May 31, 2026 at 4:21 am

    I’ve seen three options:

    Option 1: Elevate sandbox permissions

    Expressions are compiled into a separate assembly and run in a sandbox with fewer permissions. Use this to increase the permissions given to the sandbox. There is probably a smaller permission set you can grant, we just haven’t spent the time to figure this out. This will mean the report and any assemblies it references will have elevated permissions. This solution is working for us (MVC 3, .Net 4, VS2010, Microsoft.Reporting v10) though we haven’t deployed to production yet.

    localReport.SetBasePermissionsForSandboxAppDomain(
        AppDomain.CurrentDomain.PermissionSet.Copy());
    

    Option 2: Build on .Net 3.5 Framework

    Compile your project under .Net 3.5

    Option 3: legacyCasModel

    Add this to your web.config:

    <system.web>
      <trust legacyCasModel="true" level="Full"/>
    </system.web>
    

    This prevents you from using dynamic variables (in some or all cases?). In particular, Asp.Net MVC 3 cannot be used because the ViewBag is dynamic.

    More information

    http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/be1a6149-a120-4e66-96f8-63f5c4d43c87

    http://blogs.msdn.com/b/brianhartman/archive/2010/02/18/expression-evaluation-in-local-mode.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing asp.net webforms project that uses Microsoft's Enterprise DAAB for the
My project is in Asp.Net Webforms using C#. On one of my web pages,
I'm starting a new web project using ASP.NET Webforms + EF4. I'm trying to
I'm having a problem with request validation in ASP.NET webforms that I am fairly
Currently I'm working on Web project that is built using ASP.NET Web Forms. We
I am using ASP.Net / WebForms / Entity Model / Framework 3.5 Here is
I'm using Callback, on a asp.net webforms project. When clicked button, it is working
I have a hybrid ASP.NET WebForms/MVC project. In my Master Page, I have a
When I add a new form to an ASP.NET project (WebForms), and then View
I'm just starting my first project in ASP.NET MVC. In my webforms experience, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.