Components should be linked

Stimulsoft Reports.NET discussion
Post Reply
ufessel
Posts: 14
Joined: Thu Jun 16, 2016 12:59 pm

Components should be linked

Post by ufessel »

Hello,

how can I set the <linked>-Option to all Componets in a quick way ?

Sometimes, when I open a report in the designer, some components are shifted a lot.
When I reopend it, all componets find her correct position.

I work on a Windows10/64-bit with i7, 2 kernel, 4 logical processors,
stimulsoft-version: 2020.5.2

Thanks and regards
Uwe
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: Components should be linked

Post by Lech Kulikowski »

Hello,

You can use the following code:

Code: Select all

foreach(var reportComponent in report.GetComponents())
{
    ((StiComponent)reportComponent).Linked = true;
}
Thank you.
ufessel
Posts: 14
Joined: Thu Jun 16, 2016 12:59 pm

Re: Components should be linked

Post by ufessel »

Hello,

and how can I integrate it in the DesignerSaveDialog ?

string file = "abc.mrt";
StiReport report = new Stimulsoft.Report.StiRepüort();
report.Load(file);
report.Design();

Thanks
Uwe
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: Components should be linked

Post by Lech Kulikowski »

Hello,

You can use the following code:

Code: Select all

string file = "abc.mrt";
StiReport report = new Stimulsoft.Report.StiRepüort();
report.Load(file);
foreach(var reportComponent in report.GetComponents())
{
    ((StiComponent)reportComponent).Linked = true;
}
report.Design();
Thank you.
Post Reply