Tuesday, March 31, 2015
Dynamics NAV 2013 - How to display a related field from another table on a page
On the CAL code for the Page, use this code to display the Barcode from the Barcode Table next to the items on my current table that only has populated Item no. and a blank field emptyBarcode with no data.
We use the emptyBarcode field as a variable to store the Barcode value we find.
Once we populate the emptyBarcode in the CAL code, the value is displayed on the page in the emptyBarcode field
//-------------------------------------------------------------------
OnAfterGetRecord()
BarcodeRec.SETCURRENTKEY("BarcodeItem No.");
BarcodesRec.SETRANGE("BarcodeItem No.","Item No.");
BarcodesRec.SETRANGE("Show for Item",TRUE);
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE BEGIN
BarcodesRec.SETRANGE("Show for Item");
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE
emptyBarcode := '';
END;
//------------------------------------------------------------------------
Sample of how to cycle through records and get a sum
//-------------------------------------------------------------
SL.SETRANGE("Document No.","No.");
SL.SETRANGE("Document Type","Document Type");
IF SL.FIND('-') THEN
REPEAT
Docamt:= Docamt + SL.Amount
UNTIL SL.NEXT <= 0;
We use the emptyBarcode field as a variable to store the Barcode value we find.
Once we populate the emptyBarcode in the CAL code, the value is displayed on the page in the emptyBarcode field
//-------------------------------------------------------------------
OnAfterGetRecord()
BarcodeRec.SETCURRENTKEY("BarcodeItem No.");
BarcodesRec.SETRANGE("BarcodeItem No.","Item No.");
BarcodesRec.SETRANGE("Show for Item",TRUE);
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE BEGIN
BarcodesRec.SETRANGE("Show for Item");
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE
emptyBarcode := '';
END;
//------------------------------------------------------------------------
Sample of how to cycle through records and get a sum
//-------------------------------------------------------------
SL.SETRANGE("Document No.","No.");
SL.SETRANGE("Document Type","Document Type");
IF SL.FIND('-') THEN
REPEAT
Docamt:= Docamt + SL.Amount
UNTIL SL.NEXT <= 0;
SL.Amount = Docamt;
SL.MODIFY;
//----------------------------------------------------------------
CAL Globals:- BarcodesRec
- Datatype: Record
- Subtype (Table): Barcodes
Saturday, March 28, 2015
How to Install NAV 2015 CU1 next to NAV 2013R2
Just run the NAV 2015 CU1 installer.
ensure you use different ports for everything, and different folders for everything.
Data director will break.
Install Data Director on another machine.
Report Writer will break
Uninstall the Report Writer for SQL 2014, and reinstall Report Writer 3 for SQL 2012
ensure you use different ports for everything, and different folders for everything.
Data director will break.
Install Data Director on another machine.
Report Writer will break
Uninstall the Report Writer for SQL 2014, and reinstall Report Writer 3 for SQL 2012
Friday, March 27, 2015
Dynamics NAV - Remove all users and allow a single login - user cannot login
USE [MyDB]
GO
delete from [dbo].[User]
delete from [dbo].[Access Control]
delete from [dbo].[User Property]
delete from [dbo].[Page Data Personalization]
delete from [dbo].[User Default Style Sheet]
delete from [dbo].[User Metadata]
delete from [dbo].[User Personalization]
Restart Service
Run as administrator if necessary
Dynamics GP 2013 - SRS Reports: not implemented with a red cross out symbol
Problem:
No matter what you try, you cannot re-deploy the SSRS reports for a specific company.
It keeps showing as a red cross out.
Related Issues:
This issue may sometimes occur on databases upgraded from previous versions
Solution
https://community.dynamics.com/gp/f/32/t/102382.aspx?pi50426=2#responses
--If TWO is the company with the problem
No matter what you try, you cannot re-deploy the SSRS reports for a specific company.
It keeps showing as a red cross out.
Related Issues:
This issue may sometimes occur on databases upgraded from previous versions
Solution
https://community.dynamics.com/gp/f/32/t/102382.aspx?pi50426=2#responses
--If TWO is the company with the problem
Select * Into DYNAMICS..sydeployedreportsbak
from DYnamics..syDeployedReports
where companyid = 'TWO'
Delete DYNAMICS..syDeployedReports
where companyid = 'TWO'
Friday, March 20, 2015
Dynamics NAV 2013 - Physical Print is different from Print Preview print
Problem:
Physical prints looks stretched, or squashed, but screen prints are fine
Physical prints look like they are printing in the wrong resolution, but screen prints are fine
Physical prints look like they are printing the wrong font, but screen prints are fine
Related issues:
Printing from Terminal Server
Printing from a Remote Session
Printing from Windows XP
This may be related to the graphics drivers.
Ensure the graphics drivers for the local machine and terminal server are updated to the correct drivers, and not the standard windows drivers.
Ensure that the client machine is on the latest service pack.
If the user uses 1024x768 and remotes in to the terminal server and prints, it will print correctly.
OR
You can leave your screen resolution the way it is, and manually change the display settings on the RDP session to force the session to display in 1024x768.
Either way, the RDP will print correctly.
Solution:
https://community.dynamics.com/nav/f/34/t/102280.aspx
Physical prints looks stretched, or squashed, but screen prints are fine
Physical prints look like they are printing in the wrong resolution, but screen prints are fine
Physical prints look like they are printing the wrong font, but screen prints are fine
Related issues:
Printing from Terminal Server
Printing from a Remote Session
Printing from Windows XP
This may be related to the graphics drivers.
Ensure the graphics drivers for the local machine and terminal server are updated to the correct drivers, and not the standard windows drivers.
Ensure that the client machine is on the latest service pack.
If the user uses 1024x768 and remotes in to the terminal server and prints, it will print correctly.
OR
You can leave your screen resolution the way it is, and manually change the display settings on the RDP session to force the session to display in 1024x768.
Either way, the RDP will print correctly.
Solution:
https://community.dynamics.com/nav/f/34/t/102280.aspx
Chrome - Cannot open or download pdf file
Related Issues:
Viewing Help PDF in Reqlogic 9
Cause:
The default Chrome pdf reader plugin is defective
Solution:
Viewing Help PDF in Reqlogic 9
Cause:
The default Chrome pdf reader plugin is defective
Solution:
- Go to chrome://plugins
- Disable the default chrome pdf reader plugin
- Attempt to open your pdf
- When prompted to open the file, click on run this time.
Other Solutions:
you can attempt to download another pdf viewer, but you will still need to disable the default one.
Thursday, March 19, 2015
Dell XPSL502X -AC Power adapter type cannot be determined. Plugged in, not charging
Lots of websites tell you to replace your adapter, or your battery.
Use Throttlestop to prevent the cpu throttling
https://www.techpowerup.com/download/techpowerup-throttlestop/
Set multiplier to 25 or 26, (the machine drops it to 8 when the adapter is not detected)
Try this first, it worked for me.
https://www.youtube.com/watch?v=XcDvp2A7Fss
Use Throttlestop to prevent the cpu throttling
https://www.techpowerup.com/download/techpowerup-throttlestop/
Set multiplier to 25 or 26, (the machine drops it to 8 when the adapter is not detected)
Try this first, it worked for me.
https://www.youtube.com/watch?v=XcDvp2A7Fss
- Power off machine
- Remove battery
- Remove AC cord
- Unplug AC cord
- Leave everything off and unplugged for a couple hours to ensure all charge is discharged, and everything cools to room temperature
- Plug in AC cord to wall
- Plug Ac cord to PC
- Turn on PC
- Right click on My Computer>Properties>Device Manager>Batteries
- Uninstall all Microsoft - devices
- Shut down machine
- Unplug adapter from wall and pc
- Put the battery back in (Make sure it is cool, hot batteries will not charge)
- Plug in adapter to wall and pc
- Turn machine on
- At this point, the battery should show that it is charging
- If this works, then nothing is wrong with your hardware
- When you turn back on the machine, it will reinstall the ACPI drivers
- This may cause the PC to stop detecting the adapter again
Option2: Let everything cool and discharge (This also continues to work for me after the first method failed)
- Unplug the AC adapter from the laptop and wall
- Remove the battery from the laptop
- Hold down the power button on the laptop for 30 seconds to remove any residual charge
- Leave them all overnight to cool completely
- Put battery in laptop
- Plug adapter into laptop
- Plug adapter into wall
- Battery light should come on to indicate charging without having to turn on laptop
Tuesday, March 17, 2015
Thursday, March 12, 2015
SSRS - How to use Rownumber
=Rownumber("Purchase_Header_No_1")
Examples: Show or hide based on rownumber
=iif(Rownumber("Table1_Group1")>12, True, False)
- You must use the EXACT name of the group you are counting in enclosed in " "
- OR you must use the EXACT name of the Table in which you are using rownumber
- OR you must use the EXACT name of the report dataset
Examples: Show or hide based on rownumber
=iif(Rownumber("Table1_Group1")>12, True, False)
Dynamics NAV 2013 - Remove persistent margins on reports
- In Report Builder, go to View>Properties>Page Layout
- Set the margins and page size.
- Remove any whitespace on the right that may be causing the page to bleed into another page
- Confirm the printer will print correctly from ANY application
- Try different printer cables if you are getting different results
- Set the paper size in the print server settings on the machine hosting the printer
- Color the backgrounds of your report to see which sections are falling where
Wednesday, March 11, 2015
Dynamics NAV 2013 - How to page break at x lines - Row number, Row Count
Setup a group at the highest level that groups on the detail line numbers. Use a value that allows an acceptable number of records to fall within each grouping.
Either one of these two methods can work depending on your needs.
=Floor(Fields!Purchase_Line___Line_No__.Value / 1000000)
=Floor((rownumber("GroupName")-1) / 28)
Either one of these two methods can work depending on your needs.
- The Groupname must be the group directly above the group you are using the formula in. (The page break group should be the first group under the header you are using in the formula)
- Set the group to group on the formula below
- Save
- Remove the sorting option on the group
=Floor(Fields!Purchase_Line___Line_No__.Value / 1000000)
=Floor((rownumber("GroupName")-1) / 28)
Dynamics NAV 2013 - How to get a report to print multiple copies of itself on the first print
CopyLoop - OnPreDataItem()
NoOfLoops := 1 + ABS(NoOfCopies);
CopyText := '';
SETRANGE(Number,1,NoOfLoops);
OutputNo := 1;
CopyLoop - OnAfterGetRecord()
IF Number > 1 THEN BEGIN
CopyText := Text000;
OutputNo += 1;
END;
CurrReport.PAGENO := 1;
Group on the [Output] field
Tuesday, March 10, 2015
Dynamics NAV 2013 - Exporting to excel exports ALL records regardless of filter or exports NO records to Excel
Related Issues:
- Exports to Excel take extremely long
- Exports have no data
- You do not get the option to open or save the document, and it automatically opens
- Data that is exported does not correspond to what you were trying to export
Solution:
- Install Office 2010 or higher
- Uninstall NAV
- Reinstall NAV Client using Run as Administrator
Thursday, March 5, 2015
Dynamics NAV 2013 R2 and LS Retail - POS Data Flow and Setup
- Head Office
- Create Store
- Create Terminal
- Set replication info (connection string to connect to terminal)
- Test connection
- Assign Hardware Profile
- Create NAV User
- Create Retail User, Assign NAV User
- Assign Retail User to Store and Terminal
- Create Job to Send data (Uses NAS for Scheduling)
- Send Preload
- Loads POS configuration
- Loads Hardware profile
- Create Job to set functionality profile to DDPUSH (Sets Data Director to push transactions back to Head Office)
- Terminal
- Do not configure NAS
- Setup POS Interface Design
- Style Profile
- change fonts, colors, etc.
Subscribe to:
Posts (Atom)