Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 63
Registered: ‎02-22-2016

Extending Telerik Report Designer works in Telerik but not in SmartClient (FormReport)

[ Edited ]

Hi,

 

My target is to achieve dynamic height of TextBox based on Fields.FORM... value.

 

So for test purpose I tried to create a simple custom function greet() in telerik report using This Documentation. It worked in telerik application, but not working through SmartClient Application reporting

 

Further Details

Following above doc,

  1. I have created a MyAssembly.dll
  2. Placed it in <telerikDesigner.exe-folder>/
  3. Specified dll in Config - telerikdesigner.exe.config
  4. Specified My TextBox value to "=MyAssembly.MyClass.greet('John')"

Now in telerik application [Preview], the function gives output.

 

But when the SmartClient tries to output the report. It Says

[An error has occurred while processing TextBox 'tb_dyn_notes_val':
The expression contains object 'MyAssembly' that is not defined in the current
context.]

 

I tried placing the dll in <SmartClient Installl Dir>/Workflows/bin too. How can I resolve this.

 

MyClass.cs,Telerik.ReportDesigner.exe.config files:

 

 

namespace MyAssembly
{
    public class MyClass
    {
        public static string Greet(string name)
        {
            return string.Format("Hello, {0}", name);
        }
    }
...
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      
      <probing privatePath="Workflows; Workflows\bin"/>
      
      <dependentAssembly>
        <!-- Required for interoperability with older versions of Telerik Reporting -->
        <assemblyIdentity name="Telerik.Reporting" culture="neutral" publicKeyToken="a9d7983dfcc261be"/>
        <bindingRedirect oldVersion="0.0.0.0-7.0.13.426" newVersion="7.0.13.426"/>
      </dependentAssembly>
    </assemblyBinding>
....
....
	<Telerik.Reporting>
		<AssemblyReferences>
			<add name="MyAssembly" version="1.0.0.0" culture="neutral" publicKeyToken="null" />
		</AssemblyReferences>
	</Telerik.Reporting>
....