Public Functions and Calculated Columns

Stimulsoft Reports.NET discussion
Post Reply
ben.w
Posts: 18
Joined: Tue Jul 30, 2019 5:43 pm

Public Functions and Calculated Columns

Post by ben.w »

We have some reports that utilize several calculated columns. These columns call a Public Function that is defined in the Code tab, which then calls another Public Function. Both of these Public Functions are not fully defined in the code tab - they reference the assembly code for the full definition. We are seeing where text components in the report, while calling the Public Function, are not utilizing that function.

Example:
Text component is calculating the linear length of materials. The column that has the data is in either millimeters or inches. The function (A) being called converts the linear length to either meters or feet based upon a second function (B) of what format the user is utilizing. In our scenario, if the code tab uses assembly code to define function A and B, the conversion fails with no error message. If we then change the code tab to define the function for A only, the text component works.

We've made sure that the function for A is both alphabetically after B and also farther down in the code tab.

Any thoughts on this? Thank you!
Ben
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Public Functions and Calculated Columns

Post by HighAley »

Hello, Ben.

You could save the report as a class (can take it from the Code tab) and debug it in Visual Studio.
Or you could send us a sample project with all necessary assemblies.
We need to reproduce the issue on our side to help you.

Thank you.
ben.w
Posts: 18
Joined: Tue Jul 30, 2019 5:43 pm

Re: Public Functions and Calculated Columns

Post by ben.w »

We will take a look at it in VS. Exporting the project with all the assemblies would be problematic since we use VB for our software and it is closely tied together.

However, I believe that we will be updating our functions to not call another function, as to avoid the dependencies.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Public Functions and Calculated Columns

Post by HighAley »

Hello.

Where you able to solve the issue?
Please, let us know if you still needs our help.

Thank you.
ben.w
Posts: 18
Joined: Tue Jul 30, 2019 5:43 pm

Re: Public Functions and Calculated Columns

Post by ben.w »

We are moving forward with not using functions that are dependent upon other functions, in order to avoid this issue.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Public Functions and Calculated Columns

Post by HighAley »

Hello.

OK.
Let us know if you need any additional help.

Thank you.
Post Reply