Is it possible to remove hyperlink tags during Report Print?

Stimulsoft Reports.NET discussion
Post Reply
patrickBum
Posts: 2
Joined: Wed Nov 13, 2024 11:33 am

Is it possible to remove hyperlink tags during Report Print?

Post by patrickBum »

I'm working on an ASP.NET project that includes a controller endpoint extending StiNetCoreViewer for report rendering

When the report displays on the web, we have texts that are wrapped inside hyperlink tags (and also another text decoration tag that is <u>). However, we would want to remove the hyperlink tags while preserving the the state of the report.

We are using a function A that uses regex to replace the hyperlinks and text decoration tags with empty string. We are attempting to catch the StiAction.PrintReport action, then we would re update the reportTemplate with function A. Then we call StiReport.LoadFromJson(reporttemplate). For the dataset, we also apply function A to data in format of json, then bind it back to data set StiJsonToDataSetConverterV2.GetDataSet and call StiReport.RegData again. In the end, we are calling StiNetCoreViewer.GetReportResult to render the report without hyperlinks in print preview mode.However, this would cause the whole report to re render. The previous states, such as collapsing will not be reflected in the Print Preview.

So my question is that, is it possible to execute the same logic directly on StiReport object during PrintReport event? I would want to apply the same replace logic to this part of the code.

Code: Select all

                    case StiAction.PrintReport:
                        var printReport = StiNetCoreViewer.GetReportObject(requestParams);
			//Remove all <a> and <u> tags from StiReport template and dataset
                        return StiNetCoreViewer.PrintReportResult(requestParams, printReport);
To add on, we would want to do the same thing to the report on Export Report to PPF action.
Last edited by patrickBum on Thu Nov 14, 2024 3:18 pm, edited 2 times in total.
Lech Kulikowski
Posts: 7289
Joined: Tue Mar 20, 2018 5:34 am

Re: Is it possible to remove hyperlink tags during Report Print?

Post by Lech Kulikowski »

Hello,

Unfortunately, there are no such options at the moment.

The task is on our to-do list.

Thank you.
patrickBum
Posts: 2
Joined: Wed Nov 13, 2024 11:33 am

Re: Is it possible to remove hyperlink tags during Report Print?

Post by patrickBum »

Lech Kulikowski wrote: Wed Nov 13, 2024 8:37 pm Hello,

Unfortunately, there are no such options at the moment.

The task is on our to-do list.

Thank you.
Thank you for letting me now. Glad that this was brought into your attention. Please inform me once the feature is integrated into newer versions.
Lech Kulikowski
Posts: 7289
Joined: Tue Mar 20, 2018 5:34 am

Re: Is it possible to remove hyperlink tags during Report Print?

Post by Lech Kulikowski »

Hello,

Ok.
Post Reply