Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

SRSS reports

(0) ShareShare
ReportReport
Posted on by

Hi,

I have SRSS report that when I print the first time a text box or a field should display original but when you print again the reports text box or a field should display copy. I suppose the criteria to determine that should be  Documentnumber.Is it possible to do that in SRSS?.

RomRyan

*This post is locked for comments

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: SRSS reports

    As mentioned my previous suggestion ,please follow the same logic and update the printed flag in your script for the particular document number only.

    Example:

    UPDATE CUSTOM_TABLE SET PRINTED= 1 WHERE PRINTED = 0 AND DOCNMBR= @DOCNMBR(Your input parameter for the doc number)

    SELECT
    A.DOCNMBR,
    CASE WHEN B.PRINTED = 0 THEN 'ORIGINAL'
    WHEN B.PRINTED = 1 THEN 'DUPLICATE'
    END Print_Status
    FROM TRANSACTIONS A
    LEFT JOIN CUSTOM_TABLE B A.DOCNMBR = B.DOCNMBR
    WHERE A.DOCNMBR= @DOCNMBR

    Note: Join your custom table to the query and set printed = 0 original, 1 =duplicate. The use the print status field in your report.

    Hope this helps!!!

  • Romryan Profile Picture
    Romryan on at
    RE: SRSS reports

    Soma,

    On my reports I have document number for inventory transfer.I select the document e.g. tr0001 and then print.The next time I pick this number,my report should display "Printed".

    Since this field is varying always,how will I achieve my expectation.How will I keep this field in the parameter?

    RomRyan.

  • Verified answer
    soma Profile Picture
    soma 24,410 on at
    RE: SRSS reports

    Yes. You also do the same in SSRS as well.

    In your query you can verify and update the printed flag 0 or 1. (based on this you can print Original & Copy on the report).

    For example:

    My report I have added the below query to ssrs report.

    SELECT * FROM ACCOUNTS WHERE ACTNMBR = @ACTNUM

    Now, I am going to add printed validation as below

    UPDATE ACCOUNTS SET PRINTED= 1 WHERE PRINTED = 0 AND  ACTNMBR = @ACTNUM

    SELECT * FROM ACCOUNTS WHERE ACTNMBR = @ACTNUM

     

    Then this report will print based on the printed flag. You can also do the same in your report as well.

    Note: After deployed your report to client make sure the printed flag is set to zero.

    Hope this helps!!!

  • Romryan Profile Picture
    Romryan on at
    RE: SRSS reports

    Soma,

    Thanks for your response.Is there a way I can achieve this only on reporting services without involving GP.

    RomRyan

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: SRSS reports

    I think you can do by easily in GP report writer by storing printed flag(0 and 1) in any custom table. While first time printing the document you can updated the flag 1 then based on the flag you can print the report "Original or Copy".

    In SSRS also you can do the same. But, you need to print this SSRS report within GP by adding a button to any GP windows.

    While first time clicking the button you can updated the flag 1 then based on the flag you can print the report "Original or Copy".

    Hope this helps!!!

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans