How to suppress copying a component?

Stimulsoft Reports.NET discussion
Post Reply
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

How to suppress copying a component?

Post by munich »

Hello,

I would like to prevent the user from copying a certain component of a report in designer (via clipboard). How can this be done?

I use the designer calling StiReport.Design().

Thanks for any help.

Yours
munich
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to suppress copying a component?

Post by Edward »

Hi

Unfortunately that is not possible.

Thank you.
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

How to suppress copying a component?

Post by munich »

Dear Edward,

what a pity. I will try to find the copies and remove them when the user saves the report.

I thank you.

Yours
munich
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to suppress copying a component?

Post by Jan »

Hello,

Please check next prerelease build (25 Jan). New static events will be available:

Code: Select all

StiOptions.Engine.GlobalEvents.AllowCutOperation
StiOptions.Engine.GlobalEvents.AllowCopyOperation
StiOptions.Engine.GlobalEvents.AllowPasteOperation
Example of using:

Code: Select all

StiOptions.Engine.GlobalEvents.AllowCutOperation += delegate(object sender, Stimulsoft.Report.Events.StiAllowClipboardOperationEventArgs e)
            {
                if (e.Components.Count > 0 && e.Components[0] is StiText)
                    e.Allow = false;
            };
Thank you.
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

How to suppress copying a component?

Post by munich »

Dear Jan,

that sounds great! I'm really looking forward to the next prerelease build.

I thank you very much.

Yours
munich
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to suppress copying a component?

Post by Jan »

Hello,

Glad to help you.

Thank you.
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

How to suppress copying a component?

Post by munich »

Dear Jan,

I just installed and checked prerelease from 25th January. The events AllowCopyOperation and AllowCutOperation are working fine. I thank you very much for that!

But the Event StiOptions.Engine.GlobalEvents.AllowPasteOperation is not fired. Neither I use Ctrl+V nor I use the according item in the ribbon bar of the designer.

What am I doing wrong?

Yours
munich
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to suppress copying a component?

Post by Edward »

Hi

The problem will be fixed in the next prerelease build.

Thank you.
Post Reply