This is a migrated thread and some comments may be shown as answers.

conversion to docx

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 16 Jul 2013, 03:21 PM
I do not have any page breaks on any of my sections or detail and it seems that when I convert to docx programmatically the docx has section breaks within it.  Why is this happening and how can it be prevented.  I have included the conversion code that I am using.

Telerik.Reporting.Processing.ReportProcessor TelContractrp = new Telerik.Reporting.Processing.ReportProcessor();
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
Telerik.Reporting.InstanceReportSource TelContractirs = new Telerik.Reporting.InstanceReportSource();
TelContractirs.ReportDocument = currRpt;
Telerik.Reporting.Processing.RenderingResult result = TelContractrp.RenderReport("DOCX", TelContractirs,deviceInfo);
 string dContract = DateTime.Now.ToString().Replace("/", "");
 dContract = dContract.Substring(0, 12);
 dContract = dContract.Replace(":", "");
 string fileName2 = result.DocumentName + "_" + dContract + "." + result.Extension;
 string filePath2 = System.IO.Path.Combine(saveLocation, fileName2);
 FileStream fs = new FileStream(filePath2, FileMode.Create);
 fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
 fs.Close();
 System.Diagnostics.Process p = new System.Diagnostics.Process();
 p.StartInfo.UseShellExecute = true;
 p.StartInfo.FileName = filePath2;
 p.Start();

1 Answer, 1 is accepted

Sort by
0
Unknown
Top achievements
Rank 1
answered on 19 Jul 2013, 02:15 PM
It seems that Word has its own paging mechanism - for more info check this article, the pagination section.
Tags
General Discussions
Asked by
William
Top achievements
Rank 1
Answers by
Unknown
Top achievements
Rank 1
Share this question
or