Getting all the records in a Grid to report

Hi all,

Hope all of you are doing well.

I have a small problem, I want get all the records in a form grid (irrespective of selected ones) to a report and the report should print all the records available in the form grid.

Anyone can give me the X++ code which will loop all the records available in the form grid.

Hi Arjun,

Create a query and drag datasource which is associated to form and drag all the fields in design of report ,it will show you all the data .

Check how many tables in that form and how they are related ,and same relation will be required in query.

Hi Rajkumar,

If user do the filtering at the form then will report shows the correct records? and the form data source is a temporary table is there any issue?

HI Rajkumar,

I’m having the same issue. I’m using FormDataSource to fetch the records. Can I fetch all the records from the form using FormDataSource ?

To Raghavendra and Arjun.

The solution provided by Rajkumar is absolutely correct but if more than one table is indulged for the operation,then perform inner join (normally required )on both the data sources which according to me will provide you the results . .

You can get the query definition (including user-defined filters) by calling FormDataSource.queryRun().query(). Just build nd run a new QueryRun instance based on this query.