error no template found

configuration:
sqlserver 2008 r2 * iis 7
print as pdf don’t works

“error no template found”

with mysql + iis7 all works fine

Hi zaghinos,

You need to create a PDF template in the “PDF Templates” module.

Thanks,

Will.

i have created the template but with sqlserver db dosen’t work.

see the sugarcrm.log
(bb is sqlserver2008 r2 en)

11/25/13 03:28:06 [208][1][FATAL] Query Failed: SELECT schedulers.* , LTRIM(RTRIM(ISNULL(jt0.first_name,’’)+N’ ‘+ISNULL(jt0.last_name,’’))) created_by_name , jt0.created_by created_by_name_owner , N’Users’ created_by_name_mod , LTRIM(RTRIM(ISNULL(jt1.first_name,’’)+N’ ‘+ISNULL(jt1.last_name,’’))) modified_by_name , jt1.created_by modified_by_name_owner , N’Users’ modified_by_name_mod FROM schedulers LEFT JOIN users jt0 ON jt0.id=schedulers.created_by AND jt0.deleted=0
AND jt0.deleted=0 LEFT JOIN users jt1 ON schedulers.modified_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 where (job = “function::pollMonitoredInboxesCustomAOP”) AND schedulers.deleted=0::: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name ‘function::pollMonitoredInboxesCustomAOP’.
11/25/13 03:28:06 [208][1][FATAL] Query Failed: SELECT schedulers.* , LTRIM(RTRIM(ISNULL(jt0.first_name,’’)+N’ ‘+ISNULL(jt0.last_name,’’))) created_by_name , jt0.created_by created_by_name_owner , N’Users’ created_by_name_mod , LTRIM(RTRIM(ISNULL(jt1.first_name,’’)+N’ ‘+ISNULL(jt1.last_name,’’))) modified_by_name , jt1.created_by modified_by_name_owner , N’Users’ modified_by_name_mod FROM schedulers LEFT JOIN users jt0 ON jt0.id=schedulers.created_by AND jt0.deleted=0
AND jt0.deleted=0 LEFT JOIN users jt1 ON schedulers.modified_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 where (job = “function::pollMonitoredInboxes”) AND schedulers.deleted=0::: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name ‘function::pollMonitoredInboxes’.
11/25/13 04:05:37 [208][1][FATAL] Query Failed:SELECT id, name FROM aos_pdf_templates WHERE deleted=‘0’ AND type=N’AOS_Quotes’ AND active::: [Microsoft][SQL Server Native Client 10.0][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near ‘active’.
11/25/13 04:06:14 [208][1][FATAL] Query Failed:SELECT id, name FROM aos_pdf_templates WHERE deleted=‘0’ AND type=N’AOS_Quotes’ AND active::: [Microsoft][SQL Server Native Client 10.0][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near ‘active’.
11/25/13 04:06:38 [208][1][FATAL] Query Failed:SELECT id, name FROM aos_pdf_templates WHERE deleted=‘0’ AND type=N’AOS_Quotes’ AND active::: [Microsoft][SQL Server Native Client 10.0][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near ‘active’.
11/25/13 04:07:53 [208][1][FATAL] Executing repair query: Query Failed:CREATE TABLE aor_fields (id varchar(36) NOT NULL ,name nvarchar(255) NULL ,date_entered datetime NULL ,date_modified datetime NULL ,modified_user_id varchar(36) NULL ,created_by varchar(36) NULL ,description nvarchar(max) NULL ,deleted bit DEFAULT ‘0’ NULL ,aor_report_id varchar(36) NULL ,field_order int NULL ,module_path nvarchar(max) NULL ,field nvarchar(100) NULL ,display bit NULL ,link bit NULL ,label nvarchar(255) NULL ,function nvarchar(100) NULL ,sort_by nvarchar(100) NULL ,sort_order nvarchar(100) NULL ,group_by nvarchar(100) NULL ,group_order nvarchar(100) NULL )::: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword ‘function’.
11/25/13 05:22:27 [208][1][FATAL] Query Failed:SELECT id, name FROM aos_pdf_templates WHERE deleted=‘0’ AND type=N’AOS_Quotes’ AND active::: [Microsoft][SQL Server Native Client 10.0][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near ‘active’.
11/25/13 05:22:33 [208][1][FATAL] Query Failed:SELECT id, name FROM aos_pdf_templates WHERE deleted=‘0’ AND type=N’AOS_Quotes’ AND active::: [Microsoft][SQL Server Native Client 10.0][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near ‘active’.
11/25/13 05:23:17 [208][1][FATAL] Query Failed:SELECT id, name FROM aos_pdf_templates WHERE deleted=‘0’ AND type=N’AOS_Quotes’ AND active::: [Microsoft][SQL Server Native Client 10.0][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near ‘active’.

see the attached file

Hi there,

It seems the file is missing. Please try uploading a .jpg.

Thanks,

Will.

i think the error is in the query
/* Table : aor_fields /
/
MISSING TABLE: aor_fields */
CREATE TABLE aor_fields (id varchar(36) NOT NULL ,name nvarchar(255) NULL ,date_entered datetime NULL ,date_modified datetime NULL ,modified_user_id varchar(36) NULL ,created_by varchar(36) NULL ,[color=#ff0000]description[/color] nvarchar(max) NULL ,deleted bit DEFAULT ‘0’ NULL ,aor_report_id varchar(36) NULL ,field_order int NULL ,module_path nvarchar(max) NULL ,field nvarchar(100) NULL ,display bit NULL ,link bit NULL ,label nvarchar(255) NULL ,[color=#ff0000]function[/color] nvarchar(100) NULL ,sort_by nvarchar(100) NULL ,sort_order nvarchar(100) NULL ,group_by nvarchar(100) NULL ,group_order nvarchar(100) NULL );

you need to change in

/* Table : aor_fields /
/
MISSING TABLE: aor_fields */
CREATE TABLE aor_fields (id varchar(36) NOT NULL ,name nvarchar(255) NULL ,date_entered datetime NULL ,date_modified datetime NULL ,modified_user_id varchar(36) NULL ,created_by varchar(36) NULL ,[color=#ff0000][description][/color] nvarchar(max) NULL ,deleted bit DEFAULT ‘0’ NULL ,aor_report_id varchar(36) NULL ,field_order int NULL ,module_path nvarchar(max) NULL ,field nvarchar(100) NULL ,display bit NULL ,link bit NULL ,label nvarchar(255) NULL ,[color=#ff0000][function][/color] nvarchar(100) NULL ,sort_by nvarchar(100) NULL ,sort_order nvarchar(100) NULL ,group_by nvarchar(100) NULL ,group_order nvarchar(100) NULL );

Hi there,

This has been highlighted by other user previously. It is a problem with SQLServer and the keyword “function” already being reserved.

Thanks,

Will.