We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ReportItems and KeepTogether attributes not working

I have attached a project with the latest version of Aspose.Words for SSRS that contains two issues I am having.

Issue #1: When running the ReportItemsError report, (by running the Default.aspx, selecting “ReportItemsError” from the dropdown and clicking "OK), there is a Report Item in the header referencing a textbox containing a date in the body of the report. When exported to word, the report item textbox contains the last date value in the body referenced which is not expected. When using the Report Viewer’s export to PDF, it shows Report Items referencing the correct values, the report item references the date value on the current page.

Issue #2: When running the KeepTogetherError Report, the first column’s default “keeptogether” behavior does not carry over to the next column. In comparison to the Report Viewer’s export to PDF, you’ll notice the first column carried over to the second column because it maintained the default “keeptogether” behavior.

Please advise of any work arounds, or hot fixes that may help.


Hi,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. I logged your request into our defect database. you will be notified as soon as the issues are resolved.

Best regards.

Thanks, has the issue been identified and are there any quick workarounds for the time being?

Has anyone been able to look at the issue? I have not heard from any developers working on the case for almost a week and a half now. We are working on a very important project and these issues are show stoppers for us.

Hi,

Sorry for delay and thank you for your patience. I'm looking into your issue right at the moment. Please expect a response (a hotfix or another solution) shortly, I believe in 1-2 days.

Dmitry,


Thanks for your response. I’ve found two more issues if you could also please take a look while you troubleshoot my other issues.

Issue #3: I have a separate report that has a header with PrintOnFirstPage set to False. Doing this causes the footer to not display on the first page when the PrintOnFirstPage for the footer is set to True.

Issue #4: As a workaround I tried changing the visibility of the textboxes in the header to hide if they are on the first page by setting the visibility expression to =iif(Globals!PageNumber = 1, True, False). However this does not work.

Thank You,

John




Hello Dmitry, I’ve been helping out John Cirujales per discussions with Danny on these issues and I was able to reproduce the items that he described already. Many thanks for looking into a release for these guys as they have a highly visible project and customer of this product.

I was able to reproduce the issues that John reported, namely:

#1 - textboxes in page headers/footers are not referencing the ReportItems collections correctly. The SSRS Report Viewer works as designed by referencing the last ReportItem for each page. We can also use the =First(expression) to get the first ReportItem for the page. However Aspose.Words seems to be referencing some random ReportItem in the collection, or what appears to be the first item on the last page - which is not correct.

#2 - KeepTogether property on list controls are not setting the appropriate MS Word Paragraph properties “Line and Page Breaks/ Keep Lines Together = true”. Therefore the reports that they are producing do not keep large paragraphs of text to be kept together in a multi-column report. Not sure if the number of columns matters… but here aspose.words is not setting this paragraph property for the list control properties. This works in the SSRS Report Viewer to PDF.

#3 - Page Header Properties - PrintOnFirstPage = False appears to be hiding both header and footer on the first page.

#4 - Setting textbox properties for Visability = Expression for example
=IIf(Globals.PageNumber>1, False, True) does not work but it works in the SSRS Report Viewer.

#5 - Word Fields not updated during export, i.e. setting page footer to report 1 of N pages - the N (=“Page " & Globals!PageNumber &” of " & Globals!TotalPages) field for number of pages is not updated unless you manually update the field in word. Any ideas on this one - may be a function that we can call before we save the document.

I want to thank you guys for looking into these issues! If there’s any more info we can provide, I would be happy to explain or provide examples as John as done with his test project that he sent. Please say hi to Ben, Danny, Laurence and Roman and the rest of the team! I really like what you guys are doing with the SSRS offering. I’m going to present this idea to another client who may be highly interested in this!

thanks
Marty

Hi Marty,

Thank you very much for summarizing the issues and for the kind words. I'm working on these issues right at the moment and going to comment them and provide you a quick hotfix shortly.

Hi John or Marty,

Please find attached interim build. It should address the issues you have reported. If some of them still persist, just let me know.

My comments on the issues listed by Marty:

#1 - Fixed.

#2 - I'm not sure the KeepTogether property has to do with the issue. I noticed the difference from the PDF output and fixed it, now multi-column reports should look as expected when expoted to Word documents. However, there is no need to set the Word's Keep Lines Together property. Moreover, it seems like KeepTogether does not affect the PDF output at all, at least I can't see the difference. If you think I'm mssing something, please provide more details of the issue and I will be glad to fix it.

#3 - Fixed.

#4 - Fixed (notice such expression may only appear in a header or footer).

#5 - Could not reproduce. Generally, this issue is strange, because the PAGE and NUMPAGES fields never require manual update. Word updates them automatically on document open or change. Let me know how you managed to reproduce it.

Thanks and I'm looking forward to your response.

Dmitry,


Thank you for taking time to look at the issues. Issue #1 has been partially fixed, it does not display a value when the textbox that the ReportItem is referencing has a visibility set to false. It is a typical design pattern used in Reporting Services for Report Items to display values of hidden referenced fields.
I will continue to confirm other fixes, thanks again.

John

Thanks for the fast turn around Dmitry and addressing each issue one by one! I see that John replied so I’ll follow up with him on his testing. I’m sure they will be pleased with the results. Thanks again and say hi to team. Keep up the great work!
Marty

Dmitry,

After further testing, Issue #2 is still not working. You'll see in the attached project, I have reproduced another rendering issue. (Make sure KeepTogetherError is selected from the Dropdown and click "OK") That output is different from how SSRS renders the report (Using the ReportViewer control, export the report to PDF).

There are two pieces that are not rendering correctly.

Part #1 of Issue #2: Please notice that rectangles should not be split between two columns, my example shows "Press Prep and Break in CoD Conference Rm" are split between two columns. They should be kept together.

Part #2 of Issue #2: Each block of information (defined by a "row" in my code behind) should not be split between columns, hence they should stay "kept together," which is the case in the sample project attached, however, it should only push over to the next column if a single block of information's length cannot fit in the first column but is able to fit in the second column (the second column has more space since it has no title, and will allow for the block of information to be kept together).

Issue #5: 2 extra pages are being added to the word doc.

Thanks again, please keep me up to date with the progress.

John

Hi John,

Thank you for providing this information. I will get back to your issues shortly; please expect a response in a few days.

Hi Dmitry,


Just following up on our case, were you able to view the issues using the test project that was attached?

Hi,

I'm looking into your issues right at the moment.

Thanks.

Hi,

Please try out attached interim build. Let me know if it works or if there are more issues to fix. I will leave the defect open until you confirm it's fixed.

Thanks.

Dmitry,

Thanks, I will test this build out. There is still an issue with ReportItems referencing hidden textboxes though. If a textbox that a ReportItem references is hidden, then no value will display. ReportItems should show values of hidden referenced textboxes and is a typical design pattern in Reporting Services.

Is there a sample of such references in the project you have provided?

Yes, please notice the headers are not showing in the export to word, however they are showing in the export to PDF. The hidden referenced textbox is found under the properties dropdown titled DateField, and the ReportItem is in the header.

Okay; I’ll try to provide you another build in a few hours. Sorry for not fixing all of the reported issues at once.