Technical Support Hours

M-F 8am to 8pm (EST)

Start a conversation

Quick Report Finding Syntax Errors in Document Notes


An error will be encountered when a sales document containing improper syntax is opened. Use the Quick Report on the following page to pull all document notes in order to find syntax errors.


Quick Report:

<report name="Bad Note Finder">
<search name="Batch" column="Sales_Batch" searchOp="like" DefaultValue=""/>
<!-- <search name="Item" column="Item_Number" searchOp="like" />
<search name="Customer" column="Cust Name" searchOp="=" />
<search name="Item" column="Item Descr" searchOp="like" />
<query addWhere="false">
select Notes, * from spv3SalesDocument where CHARINDEX('SalesPad_Notes', cast(notes as varchar(max)))>0
<contextMenuItem text="-"/>
<contextMenuItem text="Find Note">
foreach (System.Data.DataRow dr in dataRow.Table.Rows) { string allNotes = dr["Notes"].ToString();
string preXml =
(allNotes.IndexOf("<SalesPad_Notes>") == -1 ? allNotes :
allNotes.Substring(0, allNotes.IndexOf("<SalesPad_Notes>"))).TrimEnd('\r','\n', ' ');
string postXml = (allNotes.IndexOf("</SalesPad_Notes>")
== -1 ? "" :
+("</SalesPad_Notes>").Length)).TrimEnd('\r', '\n', ' ');
string xml = allNotes.Substring(allNotes.IndexOf("<SalesPad_Notes>")); xml = xml.Substring(0,xml.IndexOf("</SalesPad_Notes>") + ("</SalesPad_Notes>").Length);
try {
System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); xd.LoadXml(xml);
+"\r\n\r\n" + xml);
catch (System.Exception ex)
System.Windows.Forms.MessageBox.Show(dr["Sales_Doc_Num"].ToString() +"\r\n\r\n"
+ ex.Message + "\r\n\r\n" + allNotes);

Choose files or drag and drop files
Was this article helpful?
  1. SalesPad Support

  2. Posted
  3. Updated