This is a migrated thread and some comments may be shown as answers.

Dynamic URL When PDF is Generated

1 Answer 91 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
PJ Rodriguez
Top achievements
Rank 1
PJ Rodriguez asked on 23 Mar 2012, 06:36 PM
I have a report that is slated to contain a URL when the report is generated. This works perfect without a hitch, however, I want the URL to generated only if there is an actual need for it. I'll illustrate the what I need based on the table below:

DescriptionField            FileNameField    
Description 1                filename1.doc
Description 2                NULL
Description 3                filename2.doc
Description 4                NULL

Based on the data above, I'd like to generate a report that would have a field that allows for clicking on a link if the filenamefield is populated. If the filenamefield is null, a URL should not be generated and therefore the generated PDF should not contain it. For example, if I generate the report above, what I want to look like is below:

Description 1 (URL embedded)
Description 2
Description 3 (URL embedded)
Description 4

I would assume that this can be accomplished from codebehind.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 28 Mar 2012, 03:26 PM
Hi PJ Rodriguez,

We already have implemented similar scenario in our CrossTab demo report. A drill-through action is generated only for items that have value. In this demo report we use the IIF() Function to check whether the fields is not null and if it isn't we specify the report to drill-through. The same can be implemented for a Hyperlink Action.

Greetings,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
PJ Rodriguez
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or