Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

report showing multiple rows rather than one row

Posted on by 35

hi all..2043.Capture1.JPG

52432.Capture.JPG

DP CLASS
[SRSReportParameterAttribute(classStr(InventQuarantineAnnouncmentContract))]

class InventQuarantineAnnouncmentDP Extends SRSReportDataProviderBase
{
     date fromDate, toDate;

    InventQuarantineAnnouncmentContract contract;

    InventQuarantineAnnouncement               inventQuarantineAnnouncementTmp;




}

 [SRSReportDataSetAttribute(tableStr(InventQuarantineAnnouncement))]
public InventQuarantineAnnouncement getInventQuarantineAnnouncement()
{
    select * from inventQuarantineAnnouncementTmp;
    return inventQuarantineAnnouncementTmp;
}

public void populateTmpTable(date _fromDate, date _toDate)
{
    InventQuarantineOrder   inventQuarantineOrder;

    //CompanyInfo companyInfo = CompanyInfo::find();

    select * from inventQuarantineOrder
    where (inventQuarantineOrder.QuarantineDate >= _fromDate)
    &&    (inventQuarantineOrder.QuarantineDate <= _toDate);
    inventQuarantineAnnouncementTmp.clear();
    inventQuarantineAnnouncementTmp.ItemId = inventQuarantineOrder.ItemId;
    inventQuarantineAnnouncementTmp.Name = inventQuarantineOrder.Name;
    inventQuarantineAnnouncementTmp.QuarantineId = inventQuarantineOrder.QuarantineId;
    inventQuarantineAnnouncementTmp.QuarantineDate = inventQuarantineOrder.QuarantineDate;
    inventQuarantineAnnouncementTmp.Qty = inventQuarantineOrder.Qty;
   // inventQuarantineAnnouncementTmp.Status = inventQuarantineOrder.Status;

    //inventQuarantineAnnouncementTmp.CompanyLogo = CompanyImage::findByRecord(companyInfo).Image;

    inventQuarantineAnnouncementTmp.insert();


}

public void processReport()
{
   contract = this.parmDataContract() ;

   fromDate = contract.parmfromDate();
   ToDate   = contract.parmtoDate();

   this.populateTmpTable(fromDate, toDate);


}
i have a one row in a table of invent quarantine and when i display a report it shows multiple rows rather than one ..where is the problem?

  • suhailbinshuaib Profile Picture
    suhailbinshuaib 35 on at
    RE: report showing multiple rows rather than one row

    done.

  • Jeson Profile Picture
    Jeson 120 on at
    RE: report showing multiple rows rather than one row

    Your welcome. Please mark it as answered so that it can help other

  • suhailbinshuaib Profile Picture
    suhailbinshuaib 35 on at
    RE: report showing multiple rows rather than one row

    Thank You..the problem was i forgot make the table as a temp table

    thank u for your help

  • Verified answer
    Jeson Profile Picture
    Jeson 120 on at
    RE: report showing multiple rows rather than one row
    [quote user="suhailbinshuaib"]

    hi all..2043.Capture1.JPG

    52432.Capture.JPG

    Fullscreen
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    InventQuarantineAnnouncmentContract contract;
    InventQuarantineAnnouncement inventQuarantineAnnouncementTmp;
    }
    [SRSReportDataSetAttribute(tableStr(InventQuarantineAnnouncement))]
    public InventQuarantineAnnouncement getInventQuarantineAnnouncement()
    {
    select * from inventQuarantineAnnouncementTmp;
    return inventQuarantineAnnouncementTmp;
    }
    public void populateTmpTable(date _fromDate, date _toDate)
    {
    InventQuarantineOrder inventQuarantineOrder;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    i have a one row in a table of invent quarantine and when i display a report it shows multiple rows rather than one ..where is the problem?

    [/quote]

    Check the temporary table if it is set to temporary or regular.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans