Conversion of list to string in d365FO in X++

I would like to understand the process of converting these List into strings within a Data Provider (DP) class to generate an SSRS Report. Could you please provide guidance. I am performing a multiselect operation on the CustAccount and custgroup fields so I have used them as List.

The process depends on what you want to achieve. But most likely, you’ll iterate the list, do something with each value and add them to a string, probably with a value separator.

If you need more details from us, you’ll first have to tell us more about your requirements.

1 Like

I need to create an SSRS report that filters data based on customer account, customer group, and a date range. I want to allow users to select multiple customer accounts and then generate a report that displays transactions for the selected customer accounts and groups. The report should include fields such as transaction type, transaction amount, account transaction, and report transaction.

The problem I’m facing is that I’ve used lists for customer accounts and customer groups, but the report isn’t displaying any data. How can I convert these lists into strings within my Data Provider (DP) class so that the report can generate data correctly?

Why don’t you simply use a query where users can add filters for customer account? This is the usual way, it’s easier than what you’re trying to implement and it’s more powerful (e.g. users can use wildcards and joins to select customer accounts according to some criteria).

1 Like

okay can you give me snippet of code to know how that works.

RDP classes uses a query in this way are decorated with SRSReportQueryAttribute, therefore you can easily find examples by yourself. Find this class in Application Explorer (you can simply put the class name to the search box), right-click it and choose Find All References.

For example, AssetAcquisitionDP uses this attribute: SRSReportQueryAttribute(queryStr(AssetAcquisition)). It means that the base query to use is called AssetAcquisition.

If you then look into processReport(), you’ll see that the current query is obtained by calling this.parmQuery().

1 Like

yes I did that but then In the front end no data is getting displayed.

I’m sorry, but I can’t identify your bug just at looking at an empty report, without any information about your implementation.

Use the debugger to find out whether your query returns some data or something fails later. If your query doesn’t return anything, there is no printing a report, because it can’t succeed.

If you need more help with debugging, please create a new thread, because it’s a different topic than Conversion of list to string.

1 Like