Report Viewer for MVC

5 posts, 1 answers
  1. t
    t avatar
    11 posts
    Member since:
    Jan 2015

    Posted 15 Jan 2015 Link to this post

    The Telerik provided example for the report viewer style is below.
    <style>
    #reportViewer1 {
    position: absolute;
    left: 5px;
    right: 5px;
    top: 120px;
    bottom: 5px;
    overflow: hidden;
    font-family: Verdana, Arial;
    }
    </style>

    The question is, how can the report viewer use relative pathing? No matter how the style is changed, the report will disappear if not exactly as above.
  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 20 Jan 2015 Link to this post

    Hi,

    The HTML5 Report Viewer and its content are rendered as HTML in browsers based on the Design Considerations for HTML Rendering article. The content is contained in a DIV element with the ID of the viewer, which element can be styled with standard CSS rules as in our example. To position the DIV relatively, change the position property and provide proper width and height for the element.

    Let us know if you have any further questions.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. t
    t avatar
    11 posts
    Member since:
    Jan 2015

    Posted 20 Jan 2015 in reply to Stef Link to this post

    The standard rules for a DIV tag are not working, changing from absolute to relative and the entire report disappears. Therefore Telerik is doing something non standard and greatly appreciate your help on how to make it relative. A code snippet would be great.
  4. t
    t avatar
    11 posts
    Member since:
    Jan 2015

    Posted 20 Jan 2015 in reply to Stef Link to this post

    Standard CSS rules are not working. When changing from absolute to relative the report disappears, this should not happen. Therefore Telerik is doing something unique when rendering. It would be greatly appreciated if a code snippet could be provided making it relative. Read through all your documentation and code not find anything.
  5. Answer
    Stef
    Admin
    Stef avatar
    3610 posts

    Posted 20 Jan 2015 Link to this post

    Hi,

    Please4 test the following CSS in your project:
    <style>
    #reportViewer1 {
    position: relative;
    width:800px;
    height:800px;
    }
    </style>

    Note that if you use percents to set the width and height, the DIV element will be sized according to the container elements.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top