Hello everybody,
I try to insert a Table to the document.
In the word Template file (*.dotx) I already create an Quickparts block for the header of the table and one seperate quickparts block for the “data” rows with different docproperties for the different columns of the table.
I added the header - No Problem
If I iterate over my data I do an doc:UpdateFields() and doc:UnlinkFields() after each iteration.
I can see the correct data in my pdf but after each quickparts will be inserted an empty row. that is very strange.
-
Did only unlink fields after each iteration
-
without any update and unlink fields on the end of iteration
-
Did an update and unlink fields after each iteration
How I can work only with one quickpart (buildingblock) without getting the empty spaces after each row?
@Eniac2000 Unfortunately, it is impossible to analyze the problem using screenshots. If possible, could you please attach your template, sample data and code that will allow us to reproduce the problem? We will check the issue and provide you more information.
By the way, why don’t you use Mail Merge with Regions or LINQ Reporting Engine to fill the table with data?
Until now we filled the docproperties with a com-handle directly in the word template by opening MS Word.
We use DocProperties in more than 200 Word Templates in our company and don’t want to change each template.
Our main language for programming is Progress openedge (ABL) wich uses the Aspose lib in C#
RUN erstellen("Qickparts", "TabHeader", "").
DO ix = 1 TO 3:
DO jx = 1 TO 6:
RUN erstellen("docproperty", "prop_TabData" + string(jx), STRING(ix) + "-" + string(jx) ).
END.
RUN erstellen("Qickparts", "TabData", "").
RUN erstellen("update_fields", "",""). //Document.UpdateFields()
RUN erstellen("unlink_fields", "",""). //Document.UnlinkFields()
END.
@Eniac2000 Could you please attach your input, output and expected output documents?
have you tried to update and unlink fields just before saving the output document? Also, what is the purpose of these operations in your code? If you save the output as PDF, there is no need in these operations, since fields are updated before rendering document and only field results are exported to PDF.