Adding customized fields, function and constants to SSRS

Question Status

Eitan Mizrahi asked a question on 4 Sep 2013 2:30 AM


I am using SSRS for Dynamics AX 2012.

I need to add customization to SSRS report.

I think that this is because SSRS is built especially for AX 2012 (i.e. the SalesInvoiceReport).

I need to add, i.e variable on report.

I open the report designer + right click outside the design area + properties + variable. put variable "myABC", value = "ABC"

add an expression on textbox field:


and get the error:

Value is invalid, and the name of the value.

Simmiliar message as I create a code (I am doing code.myFunction() in expression).

MyFunction may look like this (on code section):

Public Function MyFunction() As String
  Return "ABCD"
End Function

1. How can I call function from SSRS, when report is initialized?
2. The above code should be in VB. Can I do that on C# (VS 2010)?

Thanks :)
venkatesh vadlamani responded on 4 Sep 2013 4:34 AM

you can call custom business logic in ssrs report .

This can be a  .Net Business logic code by adding a data method in the report (which is not advisable )

or put in the DP class of the report itself and return.

Please add a data method in the report . This will actually create a public partial class which can be called from the report design



Eitan Mizrahi responded on 8 Sep 2013 2:54 AM

I want to call some real Windows APIs from SSRS.

That's the major reason.

First, I need to know how to call any function, and put it in the "Report.init" (or whatever - function that starts at the beginning of the report run).

I didn't understand what is wrong at the code as I described first on this thread.

Thanks :)

Prisy responded on 26 Sep 2013 8:47 AM


Can you resolve the problem?

Now I need to use the functions of RServices, but I can't :(