Report don't display any data

435 views Asked by At

I'm working on D365FO. I did create a report added a query to dataset that is based on a tmp table. Now when I try to generate the report I get just the precisiondesign. No data is shown in it. How can I fix this ? I think this is problem is somewhere outside of my code because I tried to generate a already created report and had the same problem.

[SrsReportParameterAttribute(classStr(ProductionStatusContract))]
class ProductionStatusDP extends SrsReportDataProviderBase
{
ProductionStatusTmp ProductionStatusTmp;
ProdTable prodtable;
SalesTable salestable;
InventDim inventdim;
SalesLine salesline;

public void processReport()
{
    ProductionStatusContract                    contract            = this.parmDataContract() as 
ProductionStatusContract;
    date                                        FromDate;
    date                                        ToDate;
    boolean                                     DateBetween         = false;

    if(contract.parmToDate() && contract.parmFromDate())
    {
        ToDate = contract.parmToDate();
        FromDate = contract.parmFromDate();
        DateBetween = true;
    }

    super();

    delete_from ProductionStatusTmp;
    ProductionStatusTmp.clear();

    while select prodtable where prodtable.CollectRefLevel == 0 
       join inventdim where prodtable.InventDimId == inventdim.inventDimId
        join salesline where prodtable.InventRefType == salesline.InventRefType
        && prodtable.InventRefId == salesline.SalesId
        && prodtable.InventRefTransId == salesline.InventTransId
        && prodtable.InventRefType == inventreftype::Sales

    {

        ProductionStatusTmp.clear();
        Info(strFmt("%1", prodtable.ProdId));
        ProductionStatusTmp.AcceptedDate = prodtable.CreatedDateTime;
        ProductionStatusTmp.ProdWeek = wkOfYr(prodtable.CreatedDateTime) + year(prodtable.CreatedDateTime);
        ProductionStatusTmp.ExternalNum = salesline.ExternalItemId;
        ProductionStatusTmp.Progress = ((prodtable.qtycalc * 100) / prodtable.QtySched);
        ProductionStatusTmp.Quantity = prodtable.QtyCalc;
        ProductionStatusTmp.AcceptedBy = prodtable.CreatedBy;
        ProductionStatusTmp.ProdItemId = InventDim.InventLocationId;
        ProductionStatusTmp.Ware = prodtable.Name;
        ProductionStatusTmp.ProductionStatus = prodtable.ProdStatus;
        ProductionStatusTmp.Produced = prodtable.QtySched;

        ProductionStatusTmp.insert();

    }
}

[SrsReportDataSetAttribute(tableStr(ProductionStatusTmp))]
public ProductionStatusTmp getProductionStatusTmp()
{

    select ProductionStatusTmp;
    return ProductionStatusTmp;

}
}
1

There are 1 answers

1
Jan B. Kjeldsen On

You will have to verify that your report does indeed display the data you provide.

You can do this by providing fixed static data in your data provider to see if shows up in the SSRS report preview.

See this video for an example to see how.