Hi there, we are evaluating the Aspose.Words product for converting RS .rdl files into .txt and have discovered that the header and footer contents are not displaying correctly. The Globals!PageNumber and Globals!TotalPages fields are not displaying at all and the contents of text boxes in the header and footer are being aligned to the left margin despite being centre aligned in the report.
I’ve searched the knowledgebase but could not find anything relating specifically to these issues in RS.
Attached are the report rendered in PDF using the native RS PDF renderer and a screenshot of the report rendered as .txt using Aspose.Words txt renderer.
The issue you’re experiencing with the header and footer contents not displaying correctly in the .TXT output from your RS .rdl files is likely due to the limitations of the Aspose.Words text renderer. Specifically, the Globals!PageNumber and Globals!TotalPages fields may not be supported in the text format, and the alignment of text boxes in headers and footers might not be preserved as expected.
Solution
To address these issues, you can try the following approaches:
Check Field Support: Ensure that the fields you are using in your report are supported by the Aspose.Words text renderer. If certain fields are not supported, consider using alternative methods to display page numbers or totals.
Adjust Text Box Alignment: If the text boxes are not aligning correctly, you may need to manually adjust their properties in the .rdl file or use a different approach to render the content in the desired format.
Use Different Output Formats: If .TXT format does not meet your needs, consider using other formats like PDF or DOCX, which may better preserve the layout and formatting of your report.
Code
Here’s a simple example of how to set up your Aspose.Words document for rendering:
Document doc = new Document("path/to/your/report.rdl");
doc.save("output.txt", SaveFormat.Text);
Make sure to replace "path/to/your/report.rdl" with the actual path to your .rdl file.
Next Steps
Review the fields used in your report to ensure they are compatible with the text format.
Test rendering the report in different formats to see if the layout issues persist.
If the problem continues, reach out to Aspose support with specific details about your .rdl file and the expected output.
Please implement these solutions and let me know if you need further assistance!
The fields not being rendered e.g. Globals!PageNumber are supported by the renderer and are mentioned in previous solutions as the correct method to display page numbers.
It’s only the text boxes in the header/footer that are being forced to align left even though they are manually centre aligned in the report.
We need the output to be in .txt so other formats are not appropriate.
Hi there, I’ve uploaded the test .rdl file as a .zip file. If there are any issues please let me know.
I cannot provide the database but the report query will work with any Oracle data source as it’s just a SELECT X FROM DUAL query. ASPOSE_WORDS_TXT_RENDERER_TEST.zip (2.3 KB)
@RichieHowes
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSRS-348
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Thanks very much.
I know there are no promises on when you’ll be able to get back to me but is there an approximate time frame to find out if it can be fixed?
@RichieHowes The issue is currently in the queue for analysis. So currently we cannot provide you any estimates. We will keep you updated and let you know once it is resolved or we have more information for you.
Hi there, I’ve done some testing and have some feedback on the update.
Good news: The page numbers are now showing and there are page breaks for each page.
Bad news: The centre aligned text boxes in the header and footer are still being left aligned. Text boxes which are left/right aligned are unaffected.
Additional remarks: The TXT file does not appear to be a facsimile of the PDF, a sample PDF report displays 29 pages whereas the TXT version of the same report displays 37, some of which are partial pages displaying random information from the report body. We are using the 2022 version of SSRS, is this compatible with Aspose.Words?
@RichieHowes TXT format is quite limited in terms of text formatting. There is no way to set text alignment except moving content using tab or whitespace characters. Current Aspose.Words behavior is intended and we do not have plans to change it right now.
Thanks Alexey, I’m not too bothered about the centre alignment as it can be mitigated in other ways, I was just highlighting it as a point of interest.
We will try some of the other built in formats and see if they can give any clues as to where changes need to be made to get the reports to appear as expected in the .TXT renderer.