Skip to Content
author's profile photo Former Member
Former Member

"CRVS2010 Beta - viewer size issue

Hello,

I'm having an issue with the Crystal Reports viewer in a web application. I'm using visual studio 2010 with CRVS2010 Beta 2 installed. In design mode, the web form shows the report in full size as expected, but when I run the application and pull up the report, all I see is the Group Tree icon.

I've tried setting the height and width on the viewer, but it doesn't seem to have any effect. I placed a border around the viewer so I could be sure it wasn't resizing, and it wasn't.

I also have a button outside of the viewer that saves the report off as pdf, and that seems to be working just fine. The report saves with all the data and looks perfect.

I've installed both the 32 bit and 64 bit runtimes on my development machine, but it did not help. I set the application to target 32 bit only, but no help. I set IIS App Pool to Classic mode, no help.

This is an app that was converted from VS 2008 / .NET Framework 3.5 on a new development machine running VS 2010 & 4.0, so there was no previous version of CR installed.

I'm running Windows 7 Ultimate N 64bit as OS.

Here is the code for the viewer.

<CR:CrystalReportViewer ID="crvPrintPOC" runat="server" AutoDataBind="true" 
        BorderStyle="Inset" BorderWidth="2" BestFitPage="True" SeparatePages="True" 
        DisplayToolbar="True" HasPageNavigationButtons="True" 
        PrintMode="Pdf" HasCrystalLogo="True"
        ReportSourceID="CrystalReportSource1" Height="705px" Width="900px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
        <Report FileName="reports\CPRPT-201 CB_Proof_Claim.rpt">
        </Report>
</CR:CrystalReportSource>

Thank You!

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Oct 06, 2010 at 04:23 PM

    Delete the viewer off the form and re-add it. If that does not help, please send a link to a screen shot of the issue.

    Ludek

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 06, 2010 at 04:35 PM

    You need to change BestFitPage to false in order for you to set the size of the viewer. If it is true it will pick the size it believes will be best.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2010 at 06:43 PM

    Thank you for the suggestions Ludek and Adam,

    I tried deleting the viewer and adding it again, but still get the same result. You can view a screen capture at http://www.flickr.com/photos/54613233@N07/

    I also removed the property BestFitPage, but it didn't make any difference.

    Here is how the code looks now

    <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
         <Report FileName="reports\CPRPT-201 CB_Proof_Claim.rpt">
         </Report>
    </CR:CrystalReportSource>
    <CR:CrystalReportViewer ID="crvPrintPOC" runat="server" 
            AutoDataBind="true" ReportSourceID="CrystalReportSource1" />

    Edited by: dav1_1 on Oct 6, 2010 8:56 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 02:15 PM

    After 3 days of working on this, I finally have a fix that I'll pass on in case anybody else is having a similar issue.

    My original post didn't contain all the factors contributing to the issue because I didn't realize they were factors. My viewers are contained in an Ajax Control Toolkit Modal Popup Extender window, which uses an update panel, and the site uses a master page that has a placeholder for modal windows.

    To get the reports to work, I removed all the MPE / Ajax markup and placed the report directly on the page, and it showed up fine. This let me know that the viewer did work in the app, so moved the viewer back to it's correct location but without the ajax code. Again, it worked but displayed all the time. Following I added back all the ajax code a little at a time and at the end 2 of my 3 reports in this app worked perfectly in the MPE / Ajax . The third one works as well, but I had to add a do nothing button on the popup that caused a refresh before it would show the report.

    Thank you for the assistance, hope my findings help someone else.

    David

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.