Question about check box

Sina
Member Posts: 33
Hi everyone.
I created a check boc in a form. When this check box is true a special section in a report should be printed.
Is this possible? Because, I created a check box "Print-KB" on the form. In the table Customer I created a variable "Print-KB" (boolean) and in the report I created a variable Cust with table relation to Customer, but it doesn't work.
Did I forgot something?
Thanks.
I created a check boc in a form. When this check box is true a special section in a report should be printed.
Is this possible? Because, I created a check box "Print-KB" on the form. In the table Customer I created a variable "Print-KB" (boolean) and in the report I created a variable Cust with table relation to Customer, but it doesn't work.
Did I forgot something?
Thanks.
Sina
0
Comments
-
Search the help / forum for SHOWOUTPUT command...0
-
In the Section you can type following:
CurrReport.Showoutput(YourBoolField)
if the "Print KB" is a own DataItem in your Report Design you can write in your DataItem of "Print KB"
following:CurrReport.break;
RegardsDo you make it right, it works too!0 -
I wrote the following code in the OnPreSection:
IF (Cust."Print-KB" = TRUE)
THEN BEGIN
....
END
ELSE CurrReport.SHOWOUTPUT(FALSE);
But I think the value of the check box is not in connection with my report, because the section is not printed when I set the check box to true.Sina0 -
Do if Customer.Field using your report DataItem Name or get the Customer in the Cust variable and then use cust. Probably the cust variable is empty...0
-
I don't exactly know what you mean. But I created a MESSAGE with the Value of the check box and it shows "no" even when it is checked. How to realize that it works :?:Sina0
-
Your code is based on the Cust variable. Is cust a variable or a dataitem? when you reach the section, have you done something like cust.GET(Custome."No.") in order to set Cust to the current customer...? Post the code of your report here so we can check it and help you more...0
-
Cust is only a record variable in the globals. I haven't something like cust.GET(Custome."No.") . The code above is all that I wrote, with some calculations inbetween.Sina0
-
Which report are you using? If the report has a DataItem based on customer then it loops through the customers... Can you tell us what dataitems the report has? Also the the Variable Print KB you created is it a variable on the form only? It needs to be a field on the table...0
-
I use report 1017190 = BSS Cash Reg. Receipt Inv. which has the following dataitems:
Sales Header <Sales Header>
Integer CopyLoop
Integer HeaderData
Integer PageLoop
Integer DimensionLoop1
Sales Line <Sales Line>
Doc. Customer Ext. Texts CustExtTextHeader
Integer RoundLoop
Integer DiscountBuffer
Integer BAHLine1
Integer BAHLine2
Integer DimensionLoop2
Integer VATCounter
Integer Total
Integer Total2
Doc. Customer Ext. Texts CustExtTextFooter
Integer AdvertiseTextSina0 -
Which section have you used?0
-
Sry I mean 1017180 Sales - QuoteSina0
-
RoundLoop,BodySina0
-
If this section is indented under the Sales Header then do the following on the same section:
Cust.CLEAR; IF Cust.GET("Sales Header"."Sell-to Customer No.") THEN CurrReport.SHOWOUTPUT(Cust."Print-KB") END ELSE CurrReport.SHOWOUTPUT(FALSE);
0 -
Thank you, now it works!! \:D/Sina0
-
You're welcome. If you can, add [Solved] in your topic...0
-
If your problem was solved, do not forget to mark the initial post as "Solved" by setting appropriate property when editing the initial post... ;-)0
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