#includeSection

Uploaded report templates and discussions about reports.

Moderators: sarawut_w, Moderators

Re: #includeSection

Postby sarawut_w » Tue Mar 26, 2019 1:39 am

Hello,

Thank you for your log and report files.
The log file does not have any content about $file.create() function.
We tried to generate the report by using the "Hospira_Report_Template_v33.docx", it could include the "s" section from "HospiraDoc_Template_Needs_Table.docx".

So, we need more information on #includeSection directive.
Please replace the existing magicreport again with this below file:
magicreport.jar

This jar file would get more information for #includeSection directive calling.
Please clear the log file, reproduce the issue, and send it to us again.

Best regards,
Sarawut
You do not have the required permissions to view the files attached to this post.
sarawut_w
No Magic
No Magic
 
Posts: 335
Posts Rating:23
Joined: Thu Jun 23, 2011 12:47 am

Re: #includeSection

Postby skarthik.687@gmail.com » Wed Mar 27, 2019 4:12 am

Hello,

The issue around FileCreate() method is resolved.

Now the concern is around the includeSection and the template file "HospiraDoc_Template_Needs_Table".

For some reason the client is not pulling the section from the template file.

Im enclosing my log file, the generated report for your concern.

The template uses the file (Hospira_Report_Template_v33) which calls the 2nd template (HospiraDoc_Template_Needs_Table). While calling this 2nd file, it provides the output im enclosing in this response.

- Karthik
You do not have the required permissions to view the files attached to this post.
skarthik.687@gmail.com
Forum Beginner
Forum Beginner
 
Posts: 29
Posts Rating:1
Joined: Fri Sep 30, 2016 4:55 am

Re: #includeSection

Postby sarawut_w » Thu Mar 28, 2019 2:46 am

Hello,

Thank you for your log file.
After investigating the log file, the report engine found "HospiraDoc_Template_Needs_Table.docx" template.
If it does not find the template, the error would be logged in the log file.

Here is a log for calling #includeSection directive.
Code: Select all
[#includeSection] Try to include from file: HospiraDoc_Template_Needs_Table.docx section: s //There is a calling of #includeSection directive
[FileUtils] Find template file by template name: HospiraDoc_Template_Needs_Table.docx //Report engine seek for the specified template
Find template from locations
Found template (1): C:\Users\60009423\AppData\Local\.magicdraw\19.0\data\reports\Trace Matrix - Alter Build\HospiraDoc_Template_Needs_Table.docx in location C:\Users\60009423\AppData\Local\.magicdraw\19.0\data\reports\Trace Matrix - Alter Build //Found it!!!


If it cannot find the section, the warning message would be:
Code: Select all
WARN  REPORTS - No section found : s



We would like to know whether the content in the "HospiraDoc_Template_Needs_Table.docx" template was not printed or not.
Please try to edit the "HospiraDoc_Template_Needs_Table.docx" template, at the last line.
From:
Code: Select all
## Start code here
#set($maindoclevel = $level)
#printNeeds($d)
## End code here


To:
Code: Select all
Start HospiraDoc_Template_Needs_Table code here
#set($maindoclevel = $level)
Print : $d
#printNeeds($d)
End HospiraDoc_Template_Needs_Table code here

The message text would be printed if the section is found.

Best regards,
Sarawut
sarawut_w
No Magic
No Magic
 
Posts: 335
Posts Rating:23
Joined: Thu Jun 23, 2011 12:47 am

Re: #includeSection

Postby skarthik.687@gmail.com » Thu Mar 28, 2019 7:35 am

Hello,

I got this output after updating the template file with the recommendation.

Code: Select all
#includeSection("HospiraDoc_Template_Needs_Table.docx", s)

#includeSection("HospiraDoc_Template_Needs_Table.docx", s)


It simply prints these lines in the generated report. I replaced the code which calls the Needs tempate with something new and simple, like a Hello World print, and that didnt work out either...

- Karthik
skarthik.687@gmail.com
Forum Beginner
Forum Beginner
 
Posts: 29
Posts Rating:1
Joined: Fri Sep 30, 2016 4:55 am

Re: #includeSection

Postby sarawut_w » Thu Mar 28, 2019 10:31 pm

Hello,

Please replace your templates with these files:
HospiraDoc_Template_Needs_Table.docx

Hospira_Report_Template_v33.docx


Please clear your log file, generate the report again, then send us the log file.

Best regards,
Sarawut
You do not have the required permissions to view the files attached to this post.
sarawut_w
No Magic
No Magic
 
Posts: 335
Posts Rating:23
Joined: Thu Jun 23, 2011 12:47 am

Re: #includeSection

Postby skarthik.687@gmail.com » Mon Apr 01, 2019 6:51 am

Hello,

Attaching the log and the generated output. Please check.

- Karthik
You do not have the required permissions to view the files attached to this post.
skarthik.687@gmail.com
Forum Beginner
Forum Beginner
 
Posts: 29
Posts Rating:1
Joined: Fri Sep 30, 2016 4:55 am

Re: #includeSection

Postby sarawut_w » Tue Apr 02, 2019 12:43 am

Hello,

Thank you for the log file.
We fixed the issue in this jar file.
Please try it.
magicreport.jar


Best regards,
Sarawut
You do not have the required permissions to view the files attached to this post.
sarawut_w
No Magic
No Magic
 
Posts: 335
Posts Rating:23
Joined: Thu Jun 23, 2011 12:47 am

Re: #includeSection

Postby skarthik.687@gmail.com » Tue Apr 02, 2019 2:00 am

Sweet... It finally works...

So what did you guys fix really?? Just curious.. :)

- Karthik
skarthik.687@gmail.com
Forum Beginner
Forum Beginner
 
Posts: 29
Posts Rating:1
Joined: Fri Sep 30, 2016 4:55 am

Re: #includeSection

Postby sarawut_w » Tue Apr 02, 2019 3:01 am

Hello,

It was a internal bug in the parser, it broke the statement at wrong point.

Best regards,
Sarawut
sarawut_w
No Magic
No Magic
 
Posts: 335
Posts Rating:23
Joined: Thu Jun 23, 2011 12:47 am

Previous

Return to Report Engine

Who is online

Users browsing this forum: No registered users and 0 guests