Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics RMS (Archived)

Custom HQ "PO" Report - "Copy as Table" function

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

We currently have a customised report running on HQ that gives us a detailed breakdown of all PO's across our stores. The breakdown shows us both the PO Date and the PO Required Date and is in format dd/mm/yyyy. However when the report values are exported into excel using the "Copy as Table" function, both the PO date and PO required date outputs show on occasion as a date&time output in excel i.e.  dd/mm/yyyy hr:mm. Is there anyway we can restrict the RMS report values to only output to excel in dd/mm/yyyy format?

Both entries for the PO Date & PO Required Date are shown below:

Begin Column
   FieldName = "PurchaseOrder.DateCreated"
   DrillDownFieldName = ""
   DrillDownReportName = ""
   StoreIDFieldName = ""
   Title = "PO Date"
   VBDataType = vbDate
   Formula = ""
   ColHidden = False
   ColNotDisplayable = False
   FilterDisabled = False
   ColWidth = 990
   GroupMethod = groupmethodNone
   ColFormat =
   ColAlignment = flexAlignLeftCenter
End Column

Begin Column
   FieldName = "PurchaseOrder.RequiredDate"
   DrillDownFieldName = ""
   DrillDownReportName = ""
   StoreIDFieldName = ""
   Title = "Req'd Date"
   VBDataType = vbDate
   Formula = ""
   ColHidden = False
   ColNotDisplayable = False
   FilterDisabled = False
   ColWidth = 1050
   GroupMethod = groupmethodNone
   ColFormat = ""
   ColAlignment = flexAlignLeftCenter
End Column

Regards

Bruce Straughan

*This post is locked for comments

  • Suggested answer
    Antonijo Todorovik Profile Picture
    Antonijo Todorovik 4,025 on at
    RE: Custom HQ "PO" Report - "Copy as Table" function

    Hi again Bruce.

    Great and thanks for sharing this with the forum. As I saed, I wasn't sure of the formula, as it depends on the SQL version...

    Best regards, A.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom HQ "PO" Report - "Copy as Table" function

    Hi A,

    Thank you for your reply,

    I tried your three examples but unfortunately none of them worked for me, this maybe because we are currenty still using SQL 2005. I did manage to achieve what I needed though by using the script below.

    "convert(varchar, PurchaseOrder.DateCreated, 103)"

    Regards

    Bruce

  • Antonijo Todorovik Profile Picture
    Antonijo Todorovik 4,025 on at
    RE: Custom HQ "PO" Report - "Copy as Table" function

    Hi Bruce.

    Try adding a convert tSQL function in the FORMULA field. Depending of the SQL Server version you use, the Formula can be:

    - Formula = "CONVERT(date, PurchaseOrder.RequiredDate)"

    - Formula = "DATEADD(dd, 0, DATEDIFF(dd, 0, PurchaseOrder.RequiredDate))"

    - Formula = "CAST(PurchaseOrder.RequiredDate AS date)

    etc...

    Google out a tSQL conversion possibilitites and try with them.

    Don't have time to test this, just trying to give you some ideas...

    Kind regards, A.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans