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

  • SEARCH
  • Home
  • 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 8237481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:28:57+00:00 2026-06-07T19:28:57+00:00

I’ve been working on an MVC3 app and a recent requirement is that it

  • 0

I’ve been working on an MVC3 app and a recent requirement is that it has a couple of dynamically generated reports. So I added a single webbform with a reportviewer and a couple of reports (.rdlc). But when I try to set Conditional row-fills eg

=IIf(RowNumber(Nothing) Mod 2, "Blue", "Red") // Won't acctually use those colors but you get the gist

But the resulting background is still white.
I tried out the exact same webform in a true blue Webform application and from there it rendered properly. I’ve checked that my MVC project contains every reference used in my Webforms testproject and added .aspx and .rdlc to ignored routes in ‘Global.asax.cs’.

Why the Hybrid Horror?
I can not change from Clientside Reporting generation to Serverside due to Performance Reasons, nor can I use a different/remote server because the environments (yes plural) lack of bandwidth and connectivity. And I’d prefer not having to add a separate app pool just for the reportviewer (again performance issues).

EDIT1:

Global.asax

public class MvcApplication : System.Web.HttpApplication {
    public static void RegisterGlobalFilters ( GlobalFilterCollection filters ) {
        filters.Add(new HandleErrorAttribute());
    }

    public static void RegisterRoutes ( RouteCollection routes ) {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
        routes.IgnoreRoute("{resource}.rdlc/{*pathInfo}");

        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );

    }

    protected void Application_Start () {
        AreaRegistration.RegisterAllAreas();

        RegisterGlobalFilters(GlobalFilters.Filters);
        RegisterRoutes(RouteTable.Routes);
    }
}

Report.aspx
….

</rsweb:ReportViewer>
<asp:XmlDataSource ID="reportsDS" runat="server" 
        DataFile="~/Reporting/ReportSettings/Reportlist.xml" 
        XPath="Reports/Report" />
<asp:ScriptManager ID="scriptmanager" runat="server" />
....

Report.aspx.cs

// Some configuration initialization and the regular Page_Init + Page_Load assigning
// default values

protected void changeReport() {
    ReportViewer.Reset();
    ReportDataSource RDS = new ReportDataSource( /* grabbed from a combination of applicationsettings and input parameters */
    ReportViewer.LocalReport./* adding datasource and setting paths, names, etc. */
}

EDIT2:
Added the code to give better context to what I’m doing but seeing that the Code acctually works when published from a Webforms project I’m guessing that ReportViewer performs some sort of Blackmagic requests that the Global.asax isn’t particularly fond of. But despite my best firebug efforts I haven’t been able to find that brand of magic yet.

  • 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-06-07T19:28:58+00:00Added an answer on June 7, 2026 at 7:28 pm

    I managed to solve the problem by modifying the Page_Init

    protected void Page_Init( object sender, EventArgs e ) {
        ...
        ReportViewer.LocalReport.SetBasePermissionsForSandboxAppDomain(new PermissionSet(PermissionState.Unrestricted));
        ...
    }
    

    Feels like a hack, so I’ll hold of a day or two before accepting this answer

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.