Question Status

Verified
JFM asked a question on 17 Dec 2012 12:45 PM

Im working on a problem with SSRS (reporting tools).

I have a report in SSRS that works well since 1 or 2 years. I made a couple of updates since the first release.

Last week, I made a minor update to this report. Something that I do often (adding 2-3 lines on the report from a table where i added a couple of new fields)

But for a reason that i dont understand, i cannot get the value of my new fields.

I received this error only in the browser (in VS its fine, i see my results) :
"An error occurred during client rendering.
An error has occurred during report processing.
Query execution failed for dataset 'Data'.
Exception has been thrown by the target of an invocation.
Dynamics Record Adapter GetField failed.
Exception of type 'System.ArgumentException' was thrown."


Error occured with the GetField method. After checking closely my code in VS, everything is fine. I reuse many methods that works #1. I dont see any problem with my code. So I start to think about weird problems that can occured with the mix of AX2009, SSRS, adapter.


One of my hypothesis was that the query return too many fields that the connector cant handle. This report works with a table dedicate to this report. Data are build in a batch job each day. So my table is use only for this table, than the query is made with SELECT *. Since some fields are not used anymore, i tried specify each necessary fields in the SELECT instead of the *. Reports that throw error that my query cannot be compile and printed my query. If I copy the query and put the query directly in a job in AX, its works #1. 

2nd hypothesis was that my new fields have a too long name (maybe AX can handle this long name but the the adapter?). I renamed fields, but still get the same error.

3rd hypothesis was that maybe, somewhere, its take the wrong ax instance. So i added all my new fields in all AX instance. Same result. I dont know right now what to do. Im trying to browse the web to find some limitation of AX2009 with reporting extensions. 

I repeat what I said before, its work in VS.


Can you help me ?

Reply
Adrian Pascari A responded on 18 Dec 2012 2:29 AM

I had the same problem in Axapta 2009 with container fileds - fields with [].

To find the field that is returning the error-> modify the query in Visual Studio. Instead of 'Select *' write fileds you need one by one and check it. Run only the DataSet. Fileds in select has to be written by format <TableName>.1.<FieldName>.

Reply
JFM responded on 18 Dec 2012 5:42 AM

I think i tried 2-3 fields, I will check if at least one of my new fields works.

Whats the purpose of "1." in the format ?

I never wrote fields like that. I put normally only the field name in a AX query.

Do you did something special to correct your problem ?

Reply
Adrian Pascari A responded on 18 Dec 2012 5:59 AM

Usually I run the query from the DataMethod:

In my situation the problem was with Dimension field. I wrote it in my dinamic qury and it worked.

Reply
Verified Answer
JFM responded on 18 Dec 2012 8:50 AM

Finally I did something that I should try ealier. I restart the SSRS services.

Its now working.

So, the service was not restart after I created the new fields, SSRS didnt see the new fields. Its that normal ?

For now, im the only one working on SSRS here, so its not a problem to restart the SSRS services when needed on the development server. Could be a problem when we will be more working on SSRS at the same time.

Reply
venkatesh vadlamani responded on 18 Dec 2012 9:55 PM

This kind of error are previal in Ax 2012 SSRS also. When the returned record set has different meta data the adapter fails to recognize it . The best thing to do Delete report from Report Manager. Remove entries of the report in SysLastValues.  IF using Ax2012 delete records in SRSReportQuery table also.

Restart AOS ans Reproting service and redeploy and execute

Reply
Verified Answer
JFM responded on 18 Dec 2012 8:50 AM

Finally I did something that I should try ealier. I restart the SSRS services.

Its now working.

So, the service was not restart after I created the new fields, SSRS didnt see the new fields. Its that normal ?

For now, im the only one working on SSRS here, so its not a problem to restart the SSRS services when needed on the development server. Could be a problem when we will be more working on SSRS at the same time.

Reply