web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

journal number not passed to the report parameter

(0) ShareShare
ReportReport
Posted on by 95

I've create 2 ssrs reports one for puch and one for sales to print the voucher from

LedgerTransVoucher form

so i create a buttom in in the form with cliced method

void clicked()

{

MenuFunction SSRS_MyReport;

   Args Args;

   str journalid ="";

      Switch (GeneralJournalEntry.JournalCategory)

    {

     case  LedgerTransType::Purch:

     SSRS_MyReport = new MenuFunction(menuItemOutputStr(ForVendByDPPrintGenJoural),MenuItemType::Output);

     break;

     case LedgerTransType::Sales :

     SSRS_MyReport = new MenuFunction(menuItemOutputStr(ForCustByDPPrintGenJoural),MenuItemType::Output);

     break;

     default :

     break;

    }

   Args = new Args();

   journalid = "Dataset1_journalNumbar=" +GeneralJournalEntry.JournalNumber;  

   // Assign parameters to report

   Args.parm(journalid);

   // Run the report

   SSRS_MyReport.run(Args);

     super();

}

but the journal number not passed to the report parameter

is this good idea or there is preferable one and why the journal number not passed to the report parameter

i have to copy it and pest in the report

thanks

I have the same question (0)
  • George_D365 Profile Picture
    Microsoft Employee on at

    Hi amr abdelaziz,

    Are you getting any kind of error with this code or is it just that the journal number is not passed to the report parameter as you would expect it to?

  • amr abdelaziz Profile Picture
    95 on at

    Hi George Baluta

    just that the journal number is not passed to the report parameter

  • Martin Dráb Profile Picture
    239,519 Most Valuable Professional on at

    Your code is passing a parameter to a report controller, but if the report controller doesn't contain any logic to take this value and pass it to the contract object used by your report, nothing will happen. You could do it in preRunModifyContract(), for example.

    By the way, your 'default' case looks wrong to me - it would end up with a runtime exception, because SSRS_MyReport will be null and you're try to call a method (run()) on it.

    And please use Insert > Insert Code (in the rich formatting view) to paste source code. It makes code easier to read; e.g. because it preserves code indentation.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 660

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 655 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 557

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans