You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The INCLUDE header includes a file inside a report. This is useful for multiple reports that share common report code.
Example:
-- This is the included file (cars/includes/includes.sql)-- VARIABLE: limit, Max ResultsSET @product_category ='cars';
{{#limit}}SET @limit= {{limit}};
{{/limit}}
{{^limit}}
SET @limit=100;
{{/limit}}
-- This is the main report (cars/list_of_products.sql)-- INCLUDE: includes/includes.sqlSELECT*FROM Products WHERE ProductCategory = @product_category LIMIT @limit;
The include path is relative to the current report. The file extension is optional and will default to the file extension of the current report. All headers in the included report will be parsed and added to the existing headers of the current report. It is possible to have nested includes, but the include path is always relative to the current report.
The included report contents will be inserted at the beginning of the current report contents. If more than one INCLUDE header is present, the included report contents will be inserted in the order they appear in the headers.
The text was updated successfully, but these errors were encountered:
INCLUDE now works for the report content. I have to rethink including report headers due to some complications.
If an included report has a NAME header, we probably don't want to override the main report's NAME.
An included report can have "OPTION: noreport", which makes sense since you don't want to render the included report. However, you can't set this on the main report, or that would break things.
It would still be useful for VARIABLE, VALUE, CHART, and a few other headers. I need to think of some way to only include certain headers.
The INCLUDE header includes a file inside a report. This is useful for multiple reports that share common report code.
Example:
The include path is relative to the current report. The file extension is optional and will default to the file extension of the current report. All headers in the included report will be parsed and added to the existing headers of the current report. It is possible to have nested includes, but the include path is always relative to the current report.
The included report contents will be inserted at the beginning of the current report contents. If more than one INCLUDE header is present, the included report contents will be inserted in the order they appear in the headers.
The text was updated successfully, but these errors were encountered: