StiViewer scroll to panel

Stimulsoft Reports.NET discussion
Post Reply
paleise
Posts: 3
Joined: Tue Apr 28, 2015 7:56 am

StiViewer scroll to panel

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiViewer scroll to panel

Post 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.
paleise
Posts: 3
Joined: Tue Apr 28, 2015 7:56 am

Re: StiViewer scroll to panel

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiViewer scroll to panel

Post 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.
Post Reply