Search found 30 matches

by tayar
Tue Jul 02, 2019 3:29 pm
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi,

Would it be possible to get an example of a function as described in a message above?

Thanks
by tayar
Wed Jun 19, 2019 7:12 am
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi,

But, as explained, I can not use this variable in the report. I need it in a function.

Let's say I register a variable StiVariable("MyCustomVariable", "MyValue")

Can you please provide an example of a function which simply returns the value of this variable.

Thanks
by tayar
Tue Jun 18, 2019 4:03 pm
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

HI,

Thanks. This is valuable. And now last thing. How do I get the value of this variable within a function which is registered using

Code: Select all

StiFunctions.AddFunction
Can you please give me an example?

Thanks
Vitaly
by tayar
Mon Jun 17, 2019 11:44 am
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi,
HighAley wrote: Mon Jun 17, 2019 11:40 am You could create the variable with your code and it will not be visible to the users.
I think this what I am missing. Can you please provide an example of this?

Thanks
by tayar
Mon Jun 17, 2019 7:28 am
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi, That's exactly the point. I am creating a function which is called during the rendering. But the functionality of this function has nothing to do with a Culture. It needs to read a setup of the tenant which executes the report. And this is my problem - I don't know how to get the tenant info whi...
by tayar
Thu Jun 13, 2019 12:15 pm
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi, What it has to do with a culture? Let's give a names to the A / B / C from the previous example as FirstName/MiddleName/LastName/Title. There is a setup defined in a tenant how it has to be formated. e.g `Title FirstName LastName`, or `Title LastName, FirstName`. Report retrieves this value as s...
by tayar
Fri Jun 07, 2019 10:27 am
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi, let's take a particular use case. 1. I have a 4 values which am retrieving in the report (Let's say A / B / C / D). They can come from different sources - DB / Business Objects / Report parameters 2. I have a certain setup in a tenant which defines formatting definition I need to create a functi...
by tayar
Wed May 29, 2019 2:06 pm
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi, Let me repeat it again. I do not want to have any variable. I need to know in which context the report is executed without need to user copy dummy parameter for the call of every function. Below I copy the description provided before. let me try to explain step by step. * We have a multi-tenant ...
by tayar
Fri May 24, 2019 3:40 pm
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi, You could pass a value of the variable as a parameter of this function. yes, this how we do it now :) . However this is only a workaround because it requires user to pass some funny variable which does not have direct connection with real functionality. Even worse, in some case it might be reall...
by tayar
Tue May 21, 2019 3:29 pm
Forum: Stimulsoft Reports.NET
Topic: Using user context data(from HttpContext) in the custom functions
Replies: 41
Views: 12705

Re: Using user context data(from HttpContext) in the custom functions

Hi, Can you please provide a simple example how do I access the this Variable1 in the function which I register as StiFunctions.AddFunction("Category", "LookupCode", "LookupCode", "..", typeof(int), typeof(object), "...", new Type[] { typeof(object) ...