Variable value passed to report is not being printed

catiamatos1991
Member Posts: 158
So I'm trying to display my variable value in my report. But it prints in the message "Numerario" but in the report is not showing anything..
OnPostReport()
PaymentMethodCode:=CustLedgEntry1."Payment Method Code";
PaymentMethod.GET(PaymentMethodCode);
PaymentMethodDescription:=PaymentMethod.Description;
MESSAGE('%1',PaymentMethodDescription);

My var PaymentMethodDescription have the option "Include in dataset to true"
OnPostReport()
PaymentMethodCode:=CustLedgEntry1."Payment Method Code";
PaymentMethod.GET(PaymentMethodCode);
PaymentMethodDescription:=PaymentMethod.Description;
MESSAGE('%1',PaymentMethodDescription);

My var PaymentMethodDescription have the option "Include in dataset to true"
0
Answers
-
Hey there,
1.) Please check if the value you want to display is actually in your dataset, because it probably isn't (-> check via ctrl+alt+f1)
2.) OnPostReport is too late to populate your variable. This is most likely the error you made. The message works because it is executed at the very end. Construction of the Dataset passed to your layout happens before then.
3.) For anything regarding RDLC - or other 3-Tier stuff please post in the correct forum the next time.
regards, wisaAustrian NAV/BC Dev0 -
But in the AfterGetRecord() the message is empty. Is there a way to fill the variable in other place and then print the report?0
-
you can do it pretty much wherever you want, but not in OnPostReport as long as the place where you fill your variable matches its place in the dataset.Austrian NAV/BC Dev0
-
I think I defined the global variable PaymentMethodDescription and then assign the value in the code, to show in the report in the right way or am I missing anything?0
-
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
This discussion has been closed.
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions