cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports viewer + continuous scrolling

patrick_simons2
Participant
0 Kudos

I found this KB-article:

1455375 - How to enable continuous scrolling when using Crystal Reports viewer in a Visual Studio .N...

It states out that with Crystal Reports DHTML viewer for Web, you can address a property to allow continuous scrolling:

CrystalReportViewer1.SeparatePages = False

In the Win-Viewer (CrystalDecisions.Windows.Forms.CrystalReportViewer), this property does not exist.

@ don.williams : could you ask R&D to add this feature? maybe for SP 25 would be perfect, I actually use SP 24. Any news about SP 25?

Thanks,

Patrick

Accepted Solutions (1)

Accepted Solutions (1)

patrick_simons2
Participant
0 Kudos

I created the idea, please vote up:

https://influence.sap.com/sap/ino/#/idea/228941

Answers (6)

Answers (6)

0 Kudos

The Mouse wheel works for me to page down the current page and since you are on the viewer you can simply click the Next Page button.

If you want this enhancement done go here and get people to vote it up:

https://www.sap.com/about/customer-involvement/influence-adopt.html

As noted, in the WEB viewer it does work if you change the settings.

Add your business case as to why you need this will help them decide to add it or not...

Thanks again

Don

patrick_simons2
Participant
0 Kudos

Hi Don,

The behavior you describe above using arrow down with page down is already working fine in our ERP program.

My question was concerning the mouse wheel.

Try to re-ask R&D for the enhancement - and see what they say 🙂

If MS Word and nearly all other modern programs behave with a smooth mousewheel scroll, the CR viewer should do it also - and not only the web-viewer, also the win-viewer.

Thanks in advance,

Patrick

0 Kudos

Hi Patrick,

sorry, I got a new laptop and had to do a bunch of installing and copying and updates etc... Thanks for the reminder...

I did another quick test and it does work, the down arrow will do scrolling for the current page, if you click on the report anywhere. Once the focus is set to the page though use the Page Up and Page Down buttons on your keyboard to go from page to page.

To set focus on the page use this:

crystalReportViewer1.SetFocusOn(UIComponent.Page);

For details on using the Focus here is my list of events, may be useful.

You can also add a Focus Event and do it this way:

private void btrSetFocus_Click(object sender, EventArgs e)
{  // SP 13 only
    try
    {
        if (cbFocusType.SelectedItem.ToString() == "ToolBar")
        {
            crystalReportViewer1.InitialFocus = CrystalDecisions.Windows.Forms.UIComponent.ToolBar;
            crystalReportViewer1.InitialSectionIndex = Convert.ToInt32(btrValueObjIndex.Text);
            crystalReportViewer1.InitialObjectIndex = Convert.ToInt32(btrValueSectIndex.Text);
            crystalReportViewer1.SetFocusOn(CrystalDecisions.Windows.Forms.UIComponent.ToolBar);
        }
        if (cbFocusType.SelectedItem.ToString() == "PageAlbumTab")
        {
            crystalReportViewer1.InitialFocus = CrystalDecisions.Windows.Forms.UIComponent.PageAlbumTab;
            crystalReportViewer1.InitialSectionIndex = Convert.ToInt32(btrValueObjIndex.Text);
            crystalReportViewer1.InitialObjectIndex = Convert.ToInt32(btrValueSectIndex.Text);
            crystalReportViewer1.SetFocusOn(CrystalDecisions.Windows.Forms.UIComponent.PageAlbumTab);
        }
        if (cbFocusType.SelectedItem.ToString() == "Page")
        {
            crystalReportViewer1.InitialFocus = CrystalDecisions.Windows.Forms.UIComponent.Page;
            crystalReportViewer1.InitialSectionIndex = Convert.ToInt32(btrValueObjIndex.Text);
            crystalReportViewer1.InitialObjectIndex = Convert.ToInt32(btrValueSectIndex.Text);
            crystalReportViewer1.SetFocusOn(CrystalDecisions.Windows.Forms.UIComponent.Page);
        }
        if (cbFocusType.SelectedItem.ToString() == "PageObject")
        {
            crystalReportViewer1.InitialFocus = CrystalDecisions.Windows.Forms.UIComponent.PageObject;
            crystalReportViewer1.InitialSectionIndex = Convert.ToInt32(btrValueObjIndex.Text);
            crystalReportViewer1.InitialObjectIndex = Convert.ToInt32(btrValueSectIndex.Text);
            crystalReportViewer1.SetFocusOn(CrystalDecisions.Windows.Forms.UIComponent.PageObject);
        }
        if (cbFocusType.SelectedItem.ToString() == "GroupTree")
        {
            crystalReportViewer1.InitialFocus = CrystalDecisions.Windows.Forms.UIComponent.GroupTree;
            crystalReportViewer1.InitialSectionIndex = Convert.ToInt32(btrValueObjIndex.Text);
            crystalReportViewer1.InitialObjectIndex = Convert.ToInt32(btrValueSectIndex.Text);
            crystalReportViewer1.SetFocusOn(CrystalDecisions.Windows.Forms.UIComponent.GroupTree);
        }
        if (cbFocusType.SelectedItem.ToString() == "ParameterPanel")
        {
            crystalReportViewer1.InitialFocus = CrystalDecisions.Windows.Forms.UIComponent.ParameterPanel;
            crystalReportViewer1.InitialSectionIndex = Convert.ToInt32(btrValueObjIndex.Text);
            crystalReportViewer1.InitialObjectIndex = Convert.ToInt32(btrValueSectIndex.Text);
            crystalReportViewer1.SetFocusOn(CrystalDecisions.Windows.Forms.UIComponent.ParameterPanel);
        }
    }
    catch (Exception ex)
    {
        // no section or object index is out of range could get the section object count and limit it but doesn't throw error so no biggy....
        MessageBox.Show(ex.ToString());
    }
}

Don

patrick_simons2
Participant
0 Kudos

Hi Don,

Do you have some news?

As time changes and and across the years R&D changed internal logic, maybe nowadays it would become possible for them to add this feature....

Could you ask R&D for the enhancement?

Patrick

0 Kudos

Hi Patrick,

Ah, sorry I interpretted your request as a how to use no page breaks in the WinForm viewer and not the mouse function. Has nothing to do with no pages breaks but the scrolling from page to page.

That property is only for WEB viewers to generate the HTML code etc... not the same for mouse control.

I had this discussion with R&D a few years ago, I'll have to search and find out why/when/if/how/regression or not.

Don

0 Kudos

Hi Patrick,

The Win form Viewer is page based on the printer you select.

Open the report in CRD and select Page Setup. Set the Page length to 200 inches, that is the maximum length CRD will allow.

It will then page up to that fixed length.

I did a quick test and I did not find a way to do this in code, it is related to this property:

try
{
newOpts.PageContentWidth = 280000; // value is in Twips.
rptClientDoc.PrintOutputController.ModifyPrintOptions(newOpts);
}

But it did not work, I believe I have to clone the properties to make it change.

It's in my printer test app under the Set Printer button.

Nothing about SP 25, is there something you were looking for in SP 25?

Don

patrick_simons2
Participant
0 Kudos

Hi Don,

Even if you write that the Win form Viewer is printer dependent, I don't see what this has to do with asking R&D to add a new property "SeparatePages" for example SP 25?

The problem is in the Win Viewer that while scrolling with the mousewheel to the end of the page, the user has to click the page down button (or to press the page down button) to continue scrolling through the next page - even CRD does so:

What we would like to have, is like MS Word does it:

Patrick