By using this site you agree to the use of cookies for analytics and personalized content.
I agree Learn More
The technical articles cover a range of survey topics related to various features of Stimulsoft Reports. Interesting and useful tips, hints, how-tos, code snippets etc.

Viewing reports in NET. StiWebViewer. Part 2

Share this post

Submit to FacebookSubmit to FacebookSubmit to TwitterSubmit to TwitterSubmit to GoogleSubmit to GoogleSubmit to LinkedInSubmit to LinkedInSubmit to VKSubmit to VK
When working with StiWebViewer, remember the principle of the component works. To display a report, StiWebViewer exports it to the HTML format, where the resulting HTML text is displayed in the StiWebViewer, specially designed to display the report. Since Stimulsoft Reports stores all the objects separately, then, when converting the report into the HTML format, the margins of some objects may overlap, resulting in incorrect displaying of the report in the browser. Therefore, it is not desirable to overlap one object to another. Examples of overlapping:


To avoid such a situation it is necessary to use the grid to generate reports that helps you position objects of the report and get the correct displaying a report in the browser.

Let's talk about the graphic objects in the report, but to be more exact to use them. Stimulsoft Reports has a huge set of graphical objects for displaying information and its appearance in the report. On your choice, there are various graphical objects such as images, diagrams, primitives (the Shape component), bar-codes, RTF texts, and the CheckBox component.

Also, be aware that:
Vertical Line, Horizontal Line, Rectangle components do not belong to graphic objects. All vector images (WMF, EMF, EMF +) are not supported in HTML, so they will be converted to raster images (in the pixel format).

All these components are displayed as images. Since the HTML format does not allow transferring images in its body, then the report generator uses the page cache or session cache to store the images and, when lots of graphic objects in the report, server memory is taken. With the ServerTimeOut property one can set the cache time for objects in the page cache of the session cache.

If the image you want to display is static and can be saved on the server, then it is recommended to use the ImagerUrl property of the Image component to display an image. When using this property, the report generator does not produce saving image in cache or session cache and inserts a link to the image. Thus in the page cache or session cache nothing is saved that keeps server memory.

The StiWebViewer component is able to output reports in two modes: with caching and without it. If caching is not used, it is necessary to refresh the page each time when obtaining data for the report and the report re-build. When using caching, the rendered report is stored in cache on the server. Updating the page, the previously rendered report is loaded from cache and its rebuilding it is not required. It should be taken into consideration that each report is stored in the memory cache on the server and when having a large number of requests for reports this may bring to difficulties in work. Therefore, it is necessary to choose between two options - either minor memory requirements, but major in performance, or minor requirements in performance, but major in memory. Caching also should not be used if it is necessary to have a report with actual data after each update. Controlling the caching can be done using the following properties: RenderMode, CacheMode and ServerTimeOut.

It should be considered that if you need to obtain an exact copy of a report from a browser, it is necessary to use caching; otherwise the report that appears in the current moment will not be output, but the one that will be rendered using the latest data when you refresh the page.
TwitterFacebookRSSLinked inYoutubeStimulsoft BlogViberWhatsAppSkypeTelegram