Pass datasource to RDP

Hi,

The requirement is:

A form has multiple records, let us assume 15 records, the user might select one, many or all records and hit the print button.

The report should only display the current selected records only.

To achieve this I tried to pass the datasource to RDP using a parm method in contract, which did not work.

Tried to make use of the Marshaller but the report displays empty page.

Does anyone have any approach I could take to achieve the requirement?

Hi,

First create a new table to pass the currently selected records from the form . Then use simple query based SSRS report to show the records from the new table.

Thanks,

V.Vinothkumar

Please tell us with which piece you have a problem. For example, if you don’t know how to get records selected in a form, we don’t have to talk about reports at all. If you know it, explaining it to you would be a waste of time. Also don’t forget to use search, we’ve discussed it several times.

I am able to select the marked records and put them in a temporary table. That is done in one of the methods of the controller class.

I tried the search as well, but did not find anything fitting the requirement. I found a workaround which suggests converting the selected record ids into a consolidated string. I can use that but needed a little cleaner solution.

I was able to display records using marshaller classes in the past with a form having a temporary table as datasource.

Here, the only difference is that the datasource table is regular.

You said that you “able to select the marked records and put them in a temporary table”. So your statement “the only difference is that the datasource table is regular” is completely irrelevant, if you’ve already put the data to a temporary table.

You also said that you managed to do it before, but you again forgot to explain your current problem. I can’t anything for you until you explain it.

If it is so difficult to understand, I will simplify.

  1. I have a form with regular table.

  2. I have to display a report with selected records.

  3. I created a temporary table to use in the report.

  4. I am able to select the marked records from the datasource and insert them in the temporary table. This is done in the controller class.

  5. I used Marshaller framework to pass the records to the RDP class. The debug shows that the table gets populated.

In the first post I have mentioned

I was able to display records using marshaller classes in the past with a form having a temporary table as datasource.

Which means, there is another form in AOT in Dynamics Ax 2012 R3 CU8 with similar approach executing report absolutely fine. The only difference between OLD and the form I am working on right now is that the OLD form has a temporary table in datasource and the form I am working on right now has a regular table in datasource

Debug your code see if you failed to implement the marshaller correctly (and you don’t get data from it) or it works all right your bug is in displaying data on the report.

“the report displays empty page” can be caused by infinite number of things and we can’t do the bug isolation for you, since we don’t have access to your code.

What datasource is used by some form is completely irrelevant, if your report doesn’t work with it at all (because you already “select the marked records from the datasource and insert them in the temporary table”).

That you managed to write something successfully before doesn’t mean that you don’t have a bug in your current solution.