Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The ReportViewer class lets the user preview a report.
public ref class ReportViewer : Dynamics::AX::Application::ReportOutput
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
[Microsoft.Dynamics.BusinessPlatform.SharedTypes.InternalUseOnly]
public class ReportViewer : Dynamics.AX.Application.ReportOutput
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
[<Microsoft.Dynamics.BusinessPlatform.SharedTypes.InternalUseOnly>]
type ReportViewer = class
inherit ReportOutput
ReportViewer objects can exist only on the client, because a report preview can occur only on a client.
The following code will print the job descriptions and the page numbers of jobs that are inserted in the printArchive on the current date, and it will show page 1 in the report viewer.
static void aaaReportOutputExample(args a)
{
PrintJobHeader printJobHeader;
PrintJobPages printJobPages;
int myrecId;
reportViewer reportViewer;
while select printJobHeader where printJobHeader.CreatedDate >=
str2datetime("01/01/2011 12:00:00 am",123)
{
myrecId = printJobHeader.recId;
print printJobHeader.jobDescription;
while select printJobPages
where printJobPages.pagesHeaderRecId == myRecId
print printJobPages.PageNo;
reportViewer = new reportViewer(printJobHeader);
reportViewer.showPage(1);
}
}