{"id":3927,"date":"2025-11-13T19:18:42","date_gmt":"2025-11-13T19:18:42","guid":{"rendered":"https:\/\/stoneedge.com\/kb\/?post_type=ht_kb&#038;p=3927"},"modified":"2025-12-22T15:20:40","modified_gmt":"2025-12-22T15:20:40","slug":"sql-data-reports","status":"publish","type":"ht_kb","link":"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/","title":{"rendered":"SQL Data Reports"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h1>SQL Data Reports \u2013 Creating, Editing, and Running Custom SQL Reports<\/h1>\n<ul>\n<li><strong>SQL Data Reports<\/strong> lets you build your own custom reports using SQL, save them for reuse, and export the results directly to <strong>Excel<\/strong> or <strong>CSV<\/strong><\/li>\n<li>Features:<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Save <strong>named reports<\/strong> with reusable SQL.<\/li>\n<li>Export results to <strong>Excel<\/strong> or <strong>CSV<\/strong>.<\/li>\n<li>Use <code>{placeholders}<\/code> to <strong>prompt users at run time<\/strong> for SKUs, dates, ranges, and more.<\/li>\n<li>Build queries visually, then refine and store them in the form.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Overview of the SQL Data Reports Screen<\/h2>\n<p>The SQL Data Reports form has three main areas:<\/p>\n<ol>\n<li><strong>Report Name list (left)<\/strong>\n<ul>\n<li>Lists all saved reports (e.g., <em>Coupon Redemptions by Coupon Code<\/em>, <em>Purchase Order History by SKU<\/em>).<\/li>\n<li>Click a name to select a report.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Preview SQL box (right)<\/strong>\n<ul>\n<li>Shows the SQL statement associated with the selected report.<\/li>\n<li>You can edit this SQL when you are in edit mode (after clicking <strong>Save SQL<\/strong> or <strong>Add New<\/strong>).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Buttons (bottom)<\/strong>\n<ul>\n<li><strong>Open in Excel<\/strong> \u2013 runs the selected report and exports the results to an <code>.xlsx<\/code> file.<\/li>\n<li><strong>Open CSV<\/strong> \u2013 runs the selected report and exports the results to a <code>.csv<\/code> file.<\/li>\n<li><strong>Delete<\/strong> \u2013 deletes the selected report definition.<\/li>\n<li><strong>Save SQL<\/strong> \u2013 saves changes you\u2019ve made to the SQL for the selected report.<\/li>\n<li><strong>Add New<\/strong> \u2013 creates a brand-new report definition.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3931\" src=\"https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports.png\" alt=\"\" width=\"874\" height=\"706\" srcset=\"https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports.png 874w, https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports-300x242.png 300w, https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports-768x620.png 768w, https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports-50x40.png 50w, https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports-60x48.png 60w, https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports-100x81.png 100w\" sizes=\"(max-width: 874px) 100vw, 874px\" \/><\/p>\n<h2>How Reports Are Stored<\/h2>\n<p>Each report is stored in a table (typically named <strong>SQLReports<\/strong>) with at least:<\/p>\n<ul>\n<li><strong>ID<\/strong> \u2013 Numeric primary key used internally.<\/li>\n<li><strong>ReportName<\/strong> \u2013 Friendly name that appears in the <em>Report Name<\/em> list.<\/li>\n<li><strong>SQLStatement<\/strong> \u2013 The actual SQL text that will be run when the report is executed.<\/li>\n<\/ul>\n<p>You don\u2019t need to interact with this table directly\u2014everything is managed through the SQL Data Reports form\u2014but it\u2019s useful to know what\u2019s happening behind the scenes.<\/p>\n<h2>Running an Existing Report<\/h2>\n<h3>Selecting a Report<\/h3>\n<ol>\n<li>Open the <strong>SQL Data Reports<\/strong> screen.<\/li>\n<li>Click a name in the <strong>Report Name<\/strong> list (left).\n<ul>\n<li>The corresponding SQL appears in the <strong>Preview SQL<\/strong> box (right).<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>If <strong>no report<\/strong> is selected and you click <em>Open in Excel<\/em> or <em>Open CSV<\/em>, you\u2019ll see a message asking you to select a report first.<\/p>\n<h3>Running to Excel (Open in Excel)<\/h3>\n<ol>\n<li>With a report selected, click <strong>Open in Excel<\/strong>.<\/li>\n<li>The system:\n<ul>\n<li>Retrieves the saved SQL.<\/li>\n<li>Processes any dynamic prompts (<code>{\u2026}<\/code>) in the SQL (see Section 6).<\/li>\n<li>Ensures the query is a <strong>SELECT<\/strong>, <strong>TRANSFORM<\/strong> (crosstab), or <strong>PARAMETERS<\/strong> query.<br \/>\n<blockquote><p>Action queries like <code>UPDATE<\/code>, <code>DELETE<\/code>, <code>INSERT<\/code> are <em>not<\/em> allowed for safety.<\/p><\/blockquote>\n<\/li>\n<li>Creates a temporary query (<code>z_TempExport<\/code>) from your SQL.<\/li>\n<li>Exports the results to an Excel file in your <strong>Documents<\/strong> folder.\n<ul>\n<li>File name format:<br \/>\n<code>ReportName_YYYYMMDD_HHNNSS.xlsx<\/code><br \/>\n(for example: <code>Purchase Order History by SKU_20251113_142305.xlsx<\/code>)<\/li>\n<\/ul>\n<\/li>\n<li>Opens the generated Excel file automatically.<\/li>\n<\/ul>\n<\/li>\n<li>After the export, the temporary query is deleted to keep the database clean.<\/li>\n<\/ol>\n<h3>Running to CSV (Open CSV)<\/h3>\n<p>The <strong>Open CSV<\/strong> button works similarly:<\/p>\n<ol>\n<li>Click <strong>Open CSV<\/strong> with a report selected.<\/li>\n<li>The system:\n<ul>\n<li>Runs the same SQL and dynamic prompt logic.<\/li>\n<li>Exports the results to a <strong>CSV file<\/strong> in your <strong>Documents<\/strong> folder.<\/li>\n<li>Opens the CSV file in your default program (often Excel).<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>File name format:<br \/>\n<code>ReportName_YYYYMMDD_HHNNSS.csv<\/code><\/p>\n<p>Use CSV if:<\/p>\n<ul>\n<li>You want a simple, plain-text export.<\/li>\n<li>You plan to import the data into another system.<\/li>\n<\/ul>\n<h2>Creating a New SQL Data Report<\/h2>\n<h3>Starting a New Report<\/h3>\n<ol>\n<li>Click the <strong>Add New<\/strong> button.<\/li>\n<li>You\u2019ll see an <strong>Input Box<\/strong> asking for the report name (for example: <code>Sales by State Last Month<\/code>).<\/li>\n<li>Enter a clear, descriptive name and click <strong>OK<\/strong>.<\/li>\n<\/ol>\n<p>Behind the scenes:<\/p>\n<ul>\n<li>A new record is created in <code>SQLReports<\/code>.<\/li>\n<li>The form refreshes, selects the new report, and places the cursor in the <strong>Preview SQL<\/strong> box so you can start typing your SQL.<\/li>\n<\/ul>\n<h3>Entering the SQL<\/h3>\n<p>In the <strong>Preview SQL<\/strong> box:<\/p>\n<ol>\n<li>Type or paste your query.<\/li>\n<li>Make sure the statement is one of:\n<ul>\n<li><code>SELECT \u2026<\/code><\/li>\n<li><code>TRANSFORM \u2026<\/code> (for crosstab queries)<\/li>\n<li><code>PARAMETERS \u2026<\/code> followed by <code>SELECT \u2026<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Examples:<\/p>\n<p><strong>Simple SELECT:<\/strong><\/p>\n<pre><code class=\"language-sql\">SELECT OrderNumber, OrderDate, GrandTotal\r\nFROM Orders\r\nORDER BY OrderDate DESC;\r\n<\/code><\/pre>\n<p><strong>Crosstab by Month and State:<\/strong><\/p>\n<pre><code class=\"language-sql\">TRANSFORM Sum(Orders.GrandTotal) AS SumOfGrandTotal\r\nSELECT Orders.ShipState\r\nFROM Orders\r\nGROUP BY Orders.ShipState\r\nPIVOT Format([OrderDate], \"yyyy-mm\");\r\n<\/code><\/pre>\n<h3>Saving the Report<\/h3>\n<ol>\n<li>After entering or editing the SQL, click <strong>Save SQL<\/strong>.<\/li>\n<li>The SQL text is saved into the <code>SQLReports<\/code> table for the currently selected report.<\/li>\n<li>You can now use <strong>Open in Excel<\/strong> or <strong>Open CSV<\/strong> to run it.<\/li>\n<\/ol>\n<p>If there are syntax errors in your SQL, you\u2019ll receive an error message when the query is created or when the export runs. Use that message to adjust your SQL, then click <strong>Save SQL<\/strong> again.<\/p>\n<h2>Edit or Delete Existing Reports<\/h2>\n<h3>Edit a Report<\/h3>\n<ol>\n<li>Select the report in the <strong>Report Name<\/strong> list.<\/li>\n<li>The existing SQL appears in the <strong>Preview SQL<\/strong> box.<\/li>\n<li>Make your changes directly in the <strong>Preview SQL<\/strong> box.<\/li>\n<li>Click <strong>Save SQL<\/strong>.<\/li>\n<\/ol>\n<p>Your changes will be saved under the same report name (the <strong>ReportName<\/strong> field does <em>not<\/em> change unless you edit it via the table or a separate maintenance screen).<\/p>\n<p>Tip: If you want to create a <strong>variation<\/strong> of a report (e.g., same structure but with different filters), you can:<\/p>\n<ol>\n<li>Select an existing report.<\/li>\n<li>Copy the SQL from the preview box.<\/li>\n<li>Click <strong>Add New<\/strong>, name the new report.<\/li>\n<li>Paste and adjust the copied SQL.<\/li>\n<li>Click <strong>Save SQL<\/strong>.<\/li>\n<\/ol>\n<h3>Delete a Report<\/h3>\n<ol>\n<li>Select the report in the <strong>Report Name<\/strong> list.<\/li>\n<li>Click <strong>Delete<\/strong>.<\/li>\n<li>Confirm the deletion when prompted.<\/li>\n<\/ol>\n<p>This removes the report definition from the <code>SQLReports<\/code> table. It does <strong>not<\/strong> delete any database tables or data\u2014only the report definition.<\/p>\n<h2>Using Dynamic Prompts with <code>{placeholders}<\/code><\/h2>\n<p>One of the most powerful features of SQL Data Reports is the ability to prompt the user for values when the report runs.<\/p>\n<h3>How It Works<\/h3>\n<ul>\n<li>Anything typed inside <strong>curly braces<\/strong> <code>{ }<\/code> in the SQL is treated as a <strong>placeholder<\/strong>.<\/li>\n<li>When you run the report (Excel or CSV), the system:\n<ol>\n<li>Scans the SQL text for <code>{\u2026}<\/code>.<\/li>\n<li>For each placeholder, shows an <strong>InputBox<\/strong>.\n<ul>\n<li>The text inside the braces is used as both the <strong>Prompt<\/strong> and the <strong>Title<\/strong> of the box.<\/li>\n<\/ul>\n<\/li>\n<li>Whatever the user types is substituted into the SQL in place of <code>{\u2026}<\/code> (the braces are removed).<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>If the user cancels or leaves the value empty, they are asked whether they want to cancel the entire report run.<\/p>\n<blockquote><p>\u26a0\ufe0f <strong>Important:<\/strong> The system does <strong>not<\/strong> automatically add quotes or <code>#<\/code> signs around the entered value. You must include those in your SQL around the <code>{\u2026}<\/code> placeholder if your field type requires them.<\/p><\/blockquote>\n<h3>Example \u2013 Text Input (like SKU)<\/h3>\n<p>Stored SQL:<\/p>\n<pre><code class=\"language-sql\">SELECT POHistory.PONumber,\r\n       POHistory.Quantity,\r\n       POHistory.Cost,\r\n       POHistory.LocalSKU,\r\n       POHistory.Date,\r\n       POHistory.TimeStamp\r\nFROM POHistory\r\nWHERE POHistory.LocalSKU = \"{Enter SKU}\"\r\nORDER BY POHistory.Date DESC;\r\n<\/code><\/pre>\n<p>When you run the report:<\/p>\n<ol>\n<li>You see an InputBox with the prompt\/title: <strong>Enter SKU<\/strong>.<\/li>\n<li>You type: <code>ABC123<\/code>.<\/li>\n<li>The final SQL sent to the database becomes:<\/li>\n<\/ol>\n<pre><code class=\"language-sql\">WHERE POHistory.LocalSKU = \"ABC123\"\r\n<\/code><\/pre>\n<h3>Example \u2013 Date Input<\/h3>\n<p>Stored SQL:<\/p>\n<pre><code class=\"language-sql\">SELECT *\r\nFROM Orders\r\nWHERE OrderDate = #{Enter an Order Date}#;\r\n<\/code><\/pre>\n<p>At run time:<\/p>\n<ol>\n<li>InputBox prompt\/title: <strong>Enter an Order Date<\/strong>.<\/li>\n<li>You type: <code>11\/13\/2025<\/code>.<\/li>\n<li>Final SQL:<\/li>\n<\/ol>\n<pre><code class=\"language-sql\">WHERE OrderDate = #11\/13\/2025#;\r\n<\/code><\/pre>\n<p>Here the <code>#<\/code> signs are outside the <code>{}<\/code> so they remain in the final query and correctly mark the value as a date literal.<\/p>\n<h3>Example \u2013 Date Range<\/h3>\n<p>Stored SQL:<\/p>\n<pre><code class=\"language-sql\">SELECT *\r\nFROM Orders\r\nWHERE OrderDate BETWEEN #{Start Date}# AND #{End Date}#\r\nORDER BY OrderDate;\r\n<\/code><\/pre>\n<p>Running the report:<\/p>\n<ol>\n<li>Prompt 1: <strong>Start Date<\/strong><\/li>\n<li>Prompt 2: <strong>End Date<\/strong><\/li>\n<\/ol>\n<p>If you enter <code>11\/01\/2025<\/code> and <code>11\/30\/2025<\/code>, the final SQL becomes:<\/p>\n<pre><code class=\"language-sql\">WHERE OrderDate BETWEEN #11\/01\/2025# AND #11\/30\/2025#\r\n<\/code><\/pre>\n<h3>Example \u2013 Numeric Input<\/h3>\n<p>For numeric values, don\u2019t put quotes or <code>#<\/code> around the placeholder:<\/p>\n<pre><code class=\"language-sql\">SELECT *\r\nFROM Orders\r\nWHERE GrandTotal &gt;= {Minimum Total}\r\nORDER BY GrandTotal DESC;\r\n<\/code><\/pre>\n<p>If you enter <code>100<\/code>, the final SQL is:<\/p>\n<pre><code class=\"language-sql\">WHERE GrandTotal &gt;= 100\r\n<\/code><\/pre>\n<h2>Tips for Writing SQL for Data Reports<\/h2>\n<h3>Start with the Access Query Designer<\/h3>\n<p>If you\u2019re not comfortable writing SQL from scratch:<\/p>\n<ol>\n<li>Open the Access <strong>Query Design<\/strong> window.<\/li>\n<li>Build your query using the visual designer.<\/li>\n<li>Switch to <strong>SQL View<\/strong>.<\/li>\n<li>Copy the SQL into the <strong>Preview SQL<\/strong> box in the SQL Data Reports form.<\/li>\n<li>Add any <code>{placeholders}<\/code> as needed.<\/li>\n<li>Click <strong>Save SQL<\/strong>.<\/li>\n<\/ol>\n<p>This gives you the best of both worlds: a visual builder plus reusable, dynamic reports.<\/p>\n<h3>Keep Queries Readable<\/h3>\n<ul>\n<li>Use line breaks and indentation:\n<pre><code class=\"language-sql\">SELECT OrderNumber,\r\n       OrderDate,\r\n       ShipState,\r\n       GrandTotal\r\nFROM Orders\r\nWHERE OrderDate &gt;= #{Start Date}#\r\n  AND OrderDate &lt;  #{End Date}#\r\nORDER BY OrderDate DESC;\r\n<\/code><\/pre>\n<\/li>\n<li>End with a <code>;<\/code> (semicolon) if you like\u2014it\u2019s optional but neat.<\/li>\n<\/ul>\n<h3>Use Aliases for Friendlier Column Names<\/h3>\n<p>Excel will show the field names exactly as you define them. Use aliases for readability:<\/p>\n<pre><code class=\"language-sql\">SELECT OrderNumber      AS [Order #],\r\n       OrderDate        AS [Order Date],\r\n       ShipState        AS [Ship State],\r\n       GrandTotal       AS [Total Amount]\r\nFROM Orders;\r\n<\/code><\/pre>\n<h3>Be Careful with Filtering Logic<\/h3>\n<ul>\n<li>Use parentheses to control the logic of <code>AND<\/code>\/<code>OR<\/code>:\n<pre><code class=\"language-sql\">WHERE ShipState IN (\"PA\",\"NJ\",\"DE\")\r\n  AND OrderDate &gt;= #{Start Date}#\r\n<\/code><\/pre>\n<p>vs<\/p>\n<pre><code class=\"language-sql\">WHERE ShipState IN (\"PA\",\"NJ\",\"DE\")\r\n  AND (OrderDate BETWEEN #{Start Date}# AND #{End Date}#)\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>Limit the Result Size When Testing<\/h3>\n<p>When designing new reports, start small:<\/p>\n<pre><code class=\"language-sql\">SELECT TOP 100 *\r\nFROM Orders\r\nORDER BY OrderDate DESC;\r\n<\/code><\/pre>\n<p>Once you\u2019re confident the query is correct, remove the <code>TOP 100<\/code> to run against the full data set.<\/p>\n<h3>Only Use Safe Query Types<\/h3>\n<p>The system intentionally restricts you to:<\/p>\n<ul>\n<li><code>SELECT<\/code><\/li>\n<li><code>TRANSFORM<\/code><\/li>\n<li><code>PARAMETERS<\/code> (with a following <code>SELECT<\/code>)<\/li>\n<\/ul>\n<p>This prevents accidental updates or deletions. If your query starts with <code>UPDATE<\/code>, <code>DELETE<\/code>, or any other action statement, it will be blocked with a message like:<\/p>\n<blockquote><p>\u201cThis SQL must be a SELECT or TRANSFORM (crosstab) query to export.\u201d<\/p><\/blockquote>\n<h2>Troubleshooting &amp; FAQs<\/h2>\n<h3>\u201cPlease select a report name first.\u201d<\/h3>\n<p>You clicked <strong>Open in Excel<\/strong>, <strong>Open CSV<\/strong>, <strong>Save SQL<\/strong>, or <strong>Delete<\/strong> without a report selected.<br \/>\n\u2192 Click one of the report names in the left list first.<\/p>\n<h3>\u201cNo SQLStatement found for the selected report.\u201d<\/h3>\n<p>The report record exists but has an empty SQL field.<\/p>\n<ul>\n<li>Click <strong>Save SQL<\/strong> after entering valid SQL, or<\/li>\n<li>Edit the report in the <code>SQLReports<\/code> table, or<\/li>\n<li>Delete the report and create a new one.<\/li>\n<\/ul>\n<h3>\u201cThis SQL must be a SELECT or TRANSFORM (crosstab) query to export.\u201d<\/h3>\n<p>The first word of your SQL is not <code>SELECT<\/code>, <code>TRANSFORM<\/code>, or <code>PARAMETERS<\/code>.<\/p>\n<ul>\n<li>Open the query in the <strong>Preview SQL<\/strong> box and adjust it so it starts with one of these keywords.<\/li>\n<\/ul>\n<h3>\u201cError XXX: \u2026\u201d when running or exporting<\/h3>\n<p>Access detected a problem with your query. Common causes:<\/p>\n<ul>\n<li>Table or field names misspelled.<\/li>\n<li>Missing quotes or <code>#<\/code> around date\/string literals.<\/li>\n<li>Incorrect use of <code>{placeholders}<\/code> (for example, forgot to add quotes around string placeholders).<\/li>\n<\/ul>\n<p>Double-check your SQL and test it in Query Design \u2192 SQL View if needed.<\/p>\n<h3>The prompt appears, but the query returns no results.<\/h3>\n<p>The SQL ran, but your filter values might be too strict or not match any data. Try:<\/p>\n<ul>\n<li>Broadening your date range.<\/li>\n<li>Checking for typos in SKUs or IDs.<\/li>\n<li>Removing some filters to confirm the base query works.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; SQL Data Reports \u2013 Creating, Editing, and Running Custom SQL Reports SQL Data Reports lets you build your own custom reports using SQL, save them for reuse, and export the results directly to Excel or CSV Features: Save named reports with reusable SQL. Export results to Excel or CSV&#8230;.<\/p>\n","protected":false},"author":2,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[20],"ht-kb-tag":[159,158,160],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Data Reports - Stone Edge Order Manager<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Data Reports - Stone Edge Order Manager\" \/>\n<meta property=\"og:description\" content=\"&nbsp; SQL Data Reports \u2013 Creating, Editing, and Running Custom SQL Reports SQL Data Reports lets you build your own custom reports using SQL, save them for reuse, and export the results directly to Excel or CSV Features: Save named reports with reusable SQL. Export results to Excel or CSV....\" \/>\n<meta property=\"og:url\" content=\"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/\" \/>\n<meta property=\"og:site_name\" content=\"Stone Edge Order Manager\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-22T15:20:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/\",\"url\":\"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/\",\"name\":\"SQL Data Reports - Stone Edge Order Manager\",\"isPartOf\":{\"@id\":\"https:\/\/stoneedge.com\/kb\/#website\"},\"datePublished\":\"2025-11-13T19:18:42+00:00\",\"dateModified\":\"2025-12-22T15:20:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/stoneedge.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Data Reports\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/stoneedge.com\/kb\/#website\",\"url\":\"https:\/\/stoneedge.com\/kb\/\",\"name\":\"Stone Edge Order Manager\",\"description\":\"Documentation for the Stone Edge Order Manager\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/stoneedge.com\/kb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Data Reports - Stone Edge Order Manager","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/","og_locale":"en_US","og_type":"article","og_title":"SQL Data Reports - Stone Edge Order Manager","og_description":"&nbsp; SQL Data Reports \u2013 Creating, Editing, and Running Custom SQL Reports SQL Data Reports lets you build your own custom reports using SQL, save them for reuse, and export the results directly to Excel or CSV Features: Save named reports with reusable SQL. Export results to Excel or CSV....","og_url":"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/","og_site_name":"Stone Edge Order Manager","article_modified_time":"2025-12-22T15:20:40+00:00","og_image":[{"url":"https:\/\/stoneedge.com\/kb\/wp-content\/uploads\/2025\/11\/SQLDataReports.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/","url":"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/","name":"SQL Data Reports - Stone Edge Order Manager","isPartOf":{"@id":"https:\/\/stoneedge.com\/kb\/#website"},"datePublished":"2025-11-13T19:18:42+00:00","dateModified":"2025-12-22T15:20:40+00:00","breadcrumb":{"@id":"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/stoneedge.com\/kb\/articles\/sql-data-reports\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/stoneedge.com\/kb\/"},{"@type":"ListItem","position":2,"name":"SQL Data Reports"}]},{"@type":"WebSite","@id":"https:\/\/stoneedge.com\/kb\/#website","url":"https:\/\/stoneedge.com\/kb\/","name":"Stone Edge Order Manager","description":"Documentation for the Stone Edge Order Manager","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/stoneedge.com\/kb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/ht-kb\/3927"}],"collection":[{"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/comments?post=3927"}],"version-history":[{"count":7,"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/ht-kb\/3927\/revisions"}],"predecessor-version":[{"id":3964,"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/ht-kb\/3927\/revisions\/3964"}],"wp:attachment":[{"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/media?parent=3927"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=3927"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/stoneedge.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=3927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}