Page 1 of 1

StiViewer scroll to panel

Posted: Tue Apr 28, 2015 8:07 am
by paleise
Hi,
showing a report on WindowsForm in a StiViewer Control. When first show the report I want scroll to a specific panel or control on it. It can be on the first page but on the second or third page too. If it is on the first page I want, that the panel is in the visible area.
Is it possible?
I tried this.stiViewerControl1.ScrollToComponent(this.stiViewerControl1.FindComponentByTag("XX")) but i doesn't work.

Peter

Re: StiViewer scroll to panel

Posted: Wed Apr 29, 2015 5:56 am
by HighAley
Hello.

This code should work. This is our code that works:

Code: Select all

viewer.ScrollToComponent(viewer.FindComponentByTag("test"));
Please, send us a sample project of your issue for analysis.

Thank you.

Re: StiViewer scroll to panel

Posted: Wed Apr 29, 2015 6:06 am
by paleise
Hello.

Thanks for the answer.
Perhaps I set the "Tag" wrong. Where do you set the Tag "test"? In the Designer Code?

this.Panel2.Tag = "Test"

Or...?

Peter

Re: StiViewer scroll to panel

Posted: Wed Apr 29, 2015 7:10 am
by HighAley
Hello.

You could use next code before compilation:

Code: Select all

var comp = report.GetComponentByName("Text2");
comp.Tag.Value = "test";
After compilation you should hande the GetTag event.

Where do you set the Tag value?

Thank you.