Free Support Forum - aspose.com

Export to docx adding page breaks for table groups

This report has a number of groupings and when exporting to DOCX it is attempting to keep the groups together i.e if it does not fit on the same page it starts on the next page. I have checked the “Keep together” settings in the report designer and they are set to false.


When exporting to ASPOSE DOC the results are correct though.

Can you suggest a work around ?

I am using the flow layout config for aspose and need to keep it like that as I need to flexibility to edit the output.

Update:

Removing
OnEachPage

makes the docx export the same as the doc export. However if you add headers to the table they do not repeat correctly on each page (for both doc and docx). They appear mid way. (Both doc and docx). Having the OnEachPage config seems to have the headers correctly repeated on the page.

Hi Neil,

Thanks for your query. It will be really
appreciable if you please share the data source of RDL using
AdventureWorks for investigation purposes. Please export the Docx file
from shared RDL file by using Aspose.Words for SSRS and share that Docx
file with us.

I appreciate your cooperation in advance for this.

Hi,


I have attached a datasource already (just not adventureworks) and the RDL ?

Have you been able to reproduce the issue ?

I have attempted to reproduce with Adeventure works. The docx output shows that aspose always adds a page break after the details row.


Attached are MS Word DOC and Aspose DOCX versions to compare

Hi Neil,

Thanks for sharing the information. It would be great if you please share AdventureWorks database which you have used to reproduce this issue. You may share the database tables schema along with data in the form of SQL script. We will investigate this issue at our side and will update you about this issue.

It can be downloaded from here:


http://msftdbprodsamples.codeplex.com/releases/view/59211

The data file.

That ok ?

Hi Neil,

Yes, you can use the “AdventureWorks2008R2 Data File” shared at above mentioned link.

You may share the database tables schema
along with data in the form of SQL script.

Hi,


I based my example on that database. I was asking if you can download it rather than myself scripting it out? Scripting it is over 500MB where the download for you is 200MB.

Hi Neil,

Please share the SQL table’s script along with relationship. I will insert data into tables for testing this issue.

It will not allow me to upload it. Giving me a max size issue.


Why are you not able to download it from the URL ?

Hi Neil,

Are you talking about following URL? I can download AdventureWorks database form following URL. You may use MS Access AdventureWorks database with your RDL file and share with us.

Why are you not able to download it from the URL ?
http://msftdbprodsamples.codeplex.com/releases/view/59211


If you do not want to use AdventureWorks database, Please send me the script of tables used in your RDL file like as follow. I will insert data manually in tables.

CREATE TABLE [dbo].[tsesttable](
[PK] [int] IDENTITY(1,1) NOT NULL,
other columns


You have used the store procedures in your RDL file (POC_Test±+Copy.rdl), please share this store procedure as well so that I can execute your RDL at my side.

EXEC clientrpt.usp_ReportStyle @ReportStyleId

Hi Tahir,


I think there is a misunderstanding. I uploaded another RDL AW.rdl. That points to the Adventure works database that you can download from http://msftdbprodsamples.codeplex.com/releases/view/59211

I did what you asked ?

If you download that database you can run AW.rdl against the database

Hi Neil,

The shared URL has many sample database. Please see the attached image file. The first database sample has following URL, I selected it in attached image file.

http://msftdbprodsamples.codeplex.com/downloads/get/198008

Hi Tahir,


That is the correct one. - The first one on the list.

Have you had success with reproducing the issue ?

Hi Neil,

Please accept my apologies for late response.

I have downloaded the AdventureWorks2008R2 database. I have not the same version of SQL Server 2008 R2 at which AdventureWorks2008R2_Data backup was taken. So I am unable to restore this database. I will setup the same SQL Server version and will update you asap.

Can you please share which SQL Server version you are using?

Hi Neil,

I have restored the database and have generated the same output documents (doc and docx) mentioned at following forum link.

http://www.aspose.com/community/forums/permalink/399167/400277/showthread.aspx#400277

I can see the output doc and docx are different. It would be great if you please explain some more detail about your issue. Do you want to add page break after each group? We are really keen to help you but need some more information from your side.

SQL Server 2008 R2

The problem is that DOCX appears to put a break page if the whole group will not fit on the same page. as if “keep together” is set to true. I would expect groups to be able to flow over a page unless I specify “keep together” or something similar


Hi Neil,

Thanks for sharing the details. I have worked with shared RDL file and have found that this is not an issue with Aspose.Words for SSRS.

The problem is that DOCX appears to put a break page if the whole group will not fit on the same page
If you generate Doc/PDF file, not by using Aspose.Words SSRS, the whole group will not be fitted on the same page. Hope this answers your query. Please let us know if you have any more queries.