Ask a questionAsk a question
 

AnswerCrystalreportviewer vertical scroll

  • Saturday, October 31, 2009 4:23 AMNerdAlert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a crystalreportviewer on a windows form page.  It displays a report as it should.  For some reason the vertical scroll bar does not operate as it should.  I can click on the vertical scroll bar control and move it down, but it does not move the report down fluidly...instead it will only scroll down when I release the vertical bar and the data will jump to that position.  My mouse wheel does not work either.  I have tried clicking on the viewer to make sure it has focus.  When I hover over the buttons at the top (like print, export etc..) they change states.  It just seems like something needs to be turned on when the report viewer is loaded.

    I am using VS2008 professional, CR basic (the one that comes with VS) version 10.5.37 SP1

Answers

  • Friday, November 06, 2009 9:00 AMHarry ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

    1. No. You might need to focus the report then use mouse wheel to scroll it.

    (If you want to achieve the task ,  I'd suggest you use mouse_event to simulate mouse click to the report.

    Here is a thread about how to do it:
    http://www.gamedev.net/community/forums/topic.asp?topic_id=321029)

    2. It works smoothly on my machine , I'd suggest you run the application on other machines . The problem may caused by bad installation or virus.

    Harry


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked As Answer byNerdAlert Saturday, November 07, 2009 12:06 AM
    •  

All Replies

  • Tuesday, November 03, 2009 6:08 AMHarry ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    It's strange the scrollbar does not work smoothly. Have you tried to create a new project to see if the problem persists?
    If so, it might be caused by bad installation , please try to uninstall and reinstall VS .

    For the question relating to the focus problem , I do not think there is something to be turned on to allow mouse wheel to work. I'd suspect the effect on these buttons might be mouse enter and leave event handler.
    If you want to achieve the task ,  I'd suggest you use mouse_event to simulate mouse click to the report.

    Here is a thread about how to do it:
    http://www.gamedev.net/community/forums/topic.asp?topic_id=321029

    Harry

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Wednesday, November 04, 2009 7:33 AMNerdAlert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks for the reply :)

    I've been playing around with it a bit more and found if I click inside the report (which is inside the crystalreportviewer) I can then use the mouse scroll wheel, but it is still very choppy.  It seems that I have to give focus to the report inside of the viewer.  I was under the assumption that the report viewer handled all of the controls and scrollbars.

    As far as the choppy scroll...It seems like as I'm scrolling the report it is loading it repeatedly to change the view with every 'tick' of the mouse wheel.

    I did create a new project and the viewer acts the same.  I will try the reload in the near future.
  • Thursday, November 05, 2009 5:40 AMNerdAlert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    OK....for the record....I tested this out on my laptop (Loaded with the same VS version and CR version) and it does the exact same thing.  I made a simple version of it to show what I am doing, so maybe someone can help me out if I am missing a step.  As previously mentioned all data loads into the report correctly and (seemingly) displays correctly in the crystalreportviewer. 

    Here are the steps I followed:
    1.  create a windows forms project.  (form1 is automatically created)
    2.  create a dataset from a database
    3.  add a crystal report viewer to Form1
    4.  Create a crystal report (using a table from dataset)
    5.  enter the following code to Form1:

    Public Class Form1

     

        Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

            CrystalReport11.SetDataSource(Me.DataSet11)

     

        End Sub

     

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            'TODO: This line of code loads data into the 'DataSet11.Resources' table. You can move, or remove it, as needed.

            Me.ResourcesTableAdapter.Fill(Me.DataSet11.Resources)

            CrystalReportViewer1.RefreshReport()

        End Sub

    End Class


    6.  Compile and run

    Any help would be fantastic   
  • Friday, November 06, 2009 3:19 AMHarry ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I do not find the problem.
    Could you please try to test a project here:
    http://cid-219dc49fbdfffbd1.skydrive.live.com/self.aspx/Public/WindowsFormsApplication1.rar

    For the scroll question :
     There is a group tree on the left part of crystal report viewer, so the focus may be on that part , so we scroll do not work on the right part.

    Harry
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Friday, November 06, 2009 6:04 AMNerdAlert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks for the reply...again :)

    I downloaded the test project and the Crystalreportviewer acts the same as my projects.  I disabled my group tree and it didn't change anything except the box on the left is gone.

    Let me try a different approach.  I will ask some questions and maybe I will understand what is going on, depending on the answers.

    1.  When a form with a crystalreportviewer (containing a report) is first opened should I be able to scroll up and down with my mouse wheel ,without having to click anywhere in the report or on the form first?  -- right now I can only use the mouse wheel by clicking in the report.

    2.  When I click in the report and start to scroll up and down it acts like it is re-loading the report in the crystareportviewer (the report blanks for a second and then re-draws itself at the point that the scroll bar was moved to)...is this how it performs for others (you)?

    I feel like I'm beating a dead horse, but it is hard for me to believe that this is the normal behavior of the crystal report viewer.

  • Friday, November 06, 2009 9:00 AMHarry ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

    1. No. You might need to focus the report then use mouse wheel to scroll it.

    (If you want to achieve the task ,  I'd suggest you use mouse_event to simulate mouse click to the report.

    Here is a thread about how to do it:
    http://www.gamedev.net/community/forums/topic.asp?topic_id=321029)

    2. It works smoothly on my machine , I'd suggest you run the application on other machines . The problem may caused by bad installation or virus.

    Harry


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked As Answer byNerdAlert Saturday, November 07, 2009 12:06 AM
    •  
  • Saturday, November 07, 2009 12:05 AMNerdAlert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks for the help Harry. :)

    I'm going to go ahead and call this solved....I guess I just had higher expectations for Crystal Repoorts.  I certainly have my work cut out to try to make it behave like I envision it should (pretty much like access).  A pity... I created such beautiful reports only to be mucked up by the viewer.
  • Monday, November 09, 2009 1:49 AMHarry ZhuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    Have you tried to run it on other machines?
    I do think the viewer works well lile access , maybe other problem affect the performance.

    Harry
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Monday, November 09, 2009 7:00 AMNerdAlert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hey,

    Yes, I tried it in a different computer and it seems like it does the same thing.

    I dunno, maybe I'm just splitting hairs.  I haven't seen any other posts about this and no one else is coming forward, so I think it's just me.

    I really do appreciate the help though. :)