Friday, May 6, 2011

Deploying reports

1. Build the solution and save it to AOD.
    Note: if you have version control in Ax they make sure that the report library is checked out to you   otherwise you will not be able to save it to AOD.

2. Make sure that the SQL server reporting services are running.

3. Compile the solution or just refresh the library and right click on the report library and choose deploy option.

4. By default your library will be selected for deployment. Click Next.

5. On successful deployment no error messages will be there.

6. Go to report manager and open your report design file.

If all has went well then you will be able to view your report.

Monday, May 2, 2011

Errors in SSRS:

You can come across various errors like:
1. Error while saving to AOD. ( Report library not checked out to you)
2. Changes do not reflect after deployment. ( Clean solution and rebuild and save to AOD)
3. Field does not exist in the data set. ( Data set being referred by the design is old refresh it )
4. Table returned from the data set is invalid. ( Occurs when the table returned from the business logic is incorrect usually happens when Execute.staticclassmethod has been used in business logic)
5. Error while executing the data set. ( CLR data table is not proper)

Error message will start like this:
Deployment failed unexpectedly with the message:
( Error Details )

Error: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
Solution: Restart SQL Server Reporting Services and/or Report Server.

Error: System.Web.Services.Protocols.SoapException: The Hidden expression for the text box ‘textbox15’ has ascope parameter that is not valid for an aggregate function.  The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the
name of a data set.
Solution: locate the text box in whichever design it exists and fix the error. This errors occurs when you are missing the data set or its reference from you solution.

Error: System.Web.Services.Protocols.SoapException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC30137] Error saving temporary Win32 resource file 'C:\Users\axadmin\AppData\Local\Temp\vbcF484.tmp': The process cannot access the file because it is being used by another process. ’.
Solution: Restart SQL Server Reporting Services

Wednesday, April 27, 2011

Creating a Basic Report

1.Create a new Ax dynmics project in Visual Studio.
2.When you open the solution by default there will be a moxl file added to your solution.
Rename this report.moxl file to appropriate name.
3.Open the moxl file right click on Dataset node and add a new dataset.
4.Add a precision design in the Design node.
( Its better to add a design before adding the datset. As if your dataset has parameters
then there are chances that when you switch/open  the design for preview it will show you a
5.Create a query in the AOT .
6.Link the dataset to the query.
(If the fields in the dataset have not been populated then refresh the dataset.)
7.Right click the precision design you added and select edit design, then Drag and drop a
table data region in the design.
8.Open the dataset pane and drag-drop fields in the details row.
9.Save all and preview your design.

This should show all the records returned from the query.

When you will be developing reports you can use inbuilt functions in textboxes of your design.
You can find examples of functions here .