Estoy teniendo dos problemas con las plantillas de Word. El primero es que al generarse las plantillas desde evolution pierden el formato, Estoy utilizando el formato docx y el texto del arvhivo que cargo al sistema está por ejemplo justificado, si doy clic en el archivo en la pantalla de configuracion de plantillas y descargo el archivo me lo baja con el formato correcto, pero al generarse el reporte desde el portal pierde el justificado y tambien inserta muchos espacios entre parrafos que no están en la plantilla original. El otro problema, estoy utilizando procedimientos almacenados para estos reportes, al configurar las variables de entorno que deberían leerse de Evolution como el CODCIA o el SESSIONID en su valor por defecto les coloco por ejemplo $$CODCIA$$ y lo especifico como no visible. Al hacer esto el sistema devuelve el siguiente error: (Si los campos los configuro de igual manera pero los dejo visibles en la configuracion, el sistema genera el reporte, sin embargo esto no sería lo correcto.) Aseinfo.Infrastructure.Base.Exceptions.WordDocumentGenerationException: Hubo un error al generar el documento de Word. Favor verificar ---> System.FormatException: Failed to convert parameter value from a String to a Int32. ---> System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) --- End of inner exception stack trace --- at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) at System.Data.SqlClient.SqlParameter.GetCoercedValue() at System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc) at System.Data.SqlClient.SqlCommand.SetUpRPCParameters(_SqlRPC rpc, Int32 startCount, Boolean inSchema, SqlParameterCollection parameters) at System.Data.SqlClient.SqlCommand.BuildRPC(Boolean inSchema, SqlParameterCollection parameters, _SqlRPC& rpc) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(IDbCommand command, DataSet dataSet, String[] tableNames) at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames) at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command) at Aseinfo.Infrastructure.Services.WordTemplateService.GetWordTemplateData(WordTemplate template, IEnvironmentVariables variables, IDictionary |
El error mencionado sobre el envío de variables invisibles a las plantillas de Word con datos extraídos de procedimientos almacenados ya fue corregido en la versión 1.7.1 |
¿Podrías mandarme un link al documento de word que estás subiendo y de ser posible los scripts de configuración del template y el SP para poder reproducirlo? En el FAQ del QA podes ver el vínculo del SkyDrive de Evolution para como subir y compartir archivos que expliquen mejor una pregunta. https://qa.aseinfo.net/osqa/faq/