| **Navigation:**  »No topics above this level«====== SetCrystalQueryPreview ============ SetCrystalQueryPrint ====== | {{btn_prev_d.gif}}[[coming future.htm|{{btn_home_n.gif|Return to chapter overview}}]]{{btn_next_d.gif}} | | || The **SetCrystalQueryPreview **and SetCrystalQueryPrint templates both accomplish the exact same task. They set the SQL Query that wiil be sent to the SQL data source. The difference between these two templates is that **SetCrystalQueryPreview **is used in conjunction with the **PreviewCrystalReport **template and **SetCrystalQueryPrint **is used in conjunction with the **PrintCrystalReport **template. These templates call the Crystal8.Query method. For more information on these methods refer to the //ABC Library Reference, Crystal8 class.// **Requirements** These templates require the **PreviewCrystalReport **or the **PrintCrystalReport **template respectively. **Populating the Template** 1. From an embed point,** **p**ress **the **Insert** button and select either the **SetCrystalQueryPreview **or **SetCrystalQueryPrint **template. **Template Prompts** These templates provides the following prompts: **Query Variable** Specify a valid variable that holds the SQL Query to send to the SQL data source. This may be a STRING, CSTRING, PSTRING, or MEMO data type. The variable may be a local, module, or global variable. You may also use a file field.  This variable is required.