【7.0.2】合并表头问题
使用的数据源
{
"itemList": [
"项目1",
"项目2",
"项目3",
"项目4"
],
"itemValueList": [
[
"公司1",
"公司1项目1",
"公司1项目2",
"公司1项目3",
"公司1项目4",
"公司1合计1"
],
[
"公司2",
"公司2项目1",
"公司2项目2",
"公司2项目3",
"公司2项目4",
"公司2合计2"
],
[
"公司3",
"公司3项目1",
"公司3项目2",
"公司3项目3",
"公司3项目4",
"公司3合计3"
]
]
}
使用的模板
实际结果
GrapeCity.Documents.Word.InvalidTemplateStructureException: Value template tag "{{ds}}" has no parent collection.
at bek.b(LinkedListNode`1 A_0, LinkedList`1 A_1, TemplateCopyModeEnum A_2)
at bek.f(bds A_0)
at beu.wa(Text A_0, bd4 A_1)
at a7o.a(PersistentRange A_0, ValueTuple`3 A_1, a A_2, FindReplaceOptions A_3)
at a7o.a(RangeBase A_0, String A_1, String A_2, FindReplaceOptions A_3)
at bel.a(bez A_0, Boolean A_1, CultureInfo A_2, Boolean A_3)
at bel.a(Action A_0, Boolean A_1, CultureInfo A_2)
at GrapeCity.Documents.Word.Templates.DataTemplate.Process(CultureInfo cultureInfo)
at GcWordDemo.Controllers.GcWordController.GenWord(GenWordModel model) in /Users/lixiao/workspace/ey/code/demo/GcWordDemo/Controllers/GcWordController.cs:line 130
at lambda_method2(Closure, Object, Object[])
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
预期结果
我看到另一个帖子也是相同的需求,统一在另一个帖子中回复沟通吧
https://gcdn.grapecity.com.cn/forum.php?mod=viewthread&tid=202540
页:
[1]