Free Support Forum - aspose.com

Suppression

hi
Can any body reply me that in how many ways we can suppress a sub report.
Currently i am using a separate stored procedure for a sub report. But there is a problem in this way, that is when it returns multiple records, i am unable to print sections in my desired order. For example if i have three sections as
1
2
3
in template. In resulted report if section 1 is repeated two time then i need the order (suppose in some case)
1
2
1
3
but i am getting the order
1
1
2
3
because this is the order in template, so any section that comes more than once, is repeated consecativily.

I wanna know different ways to suppress a subreport to set the sections order as required

Hi

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

Thanks for your inquiry. I suppose, you would like to populate report with parent-child relationships. There is no direct way to populate nested regions using Aspsoe.Words. It is possible, however, to generate the above reports by performing mail merge several times and building up a resulting document from several documents or fragments. The Product Catalog and Sales Invoice samples in the demo project supplied with Aspose.Words demonstrate the suggested techniques.

http://www.aspose.com/demos/file-format-components/aspose.words/csharp/general/product-catalog.aspx

Hope this helps.

Best regards.

Thanks Alexey,
But this problem is little bit different. I cant use mail merge fields, because i have not only text but other objects also to display, that i cant send from database. I think to handle this issue, there should be some logic that suppress a row of a table…or tableStart, tableEnd merge fields should work across the section.


Hi

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

Thank you for additional information. Could you please attach your templates and provide me your code for testing? I will investigate your issue and provide you more information. Also, if will be great if you attach current output and desired output.

Best regards.

Thanks alexey,
I am attaching a simplified sample template, because the orignal remplate is too big and the whole the application is not possible to send you. But i wll try to explain it completely. There is no confusion in the application, and also its not the problem of application.

What I Require
The blue text area in the template is the ‘Details’ portion of the template. I use a stored procedure to fetch data from database and generate this document in pdf and word formats. I have a saparate stored procedure for this ‘Details’ say ‘DetailsSP’. When ‘DetailsSP’ returns more than one record say three, then this ‘Details’ portion of the template should be repeated three times.BUT each time, most of the secitons of this Details portion are suppressed(There is another logic to do this, and its details will divert us from the actual problem). Now for first record, only the section F(Bookmarked) appears. When the Details portion repeats itself for second record, section A appears. And for the final record section C appears.
Now the generated document (pdf & word)becomes like
-------------
OrignalSection1
OrignalSection2
DetailsF
DetailsA
DetailsC
OrignalSection3
OrignalSection4
------------
This is the senario that i required.
But I am unable to get this senario
Problem
As I said that i used a saparate stored procedure for this Details portion data, i used merge fields of <TableStart:Table6> and <TableEnd:Table6>. Now i cant use these merge fields accross the section. Because due to implementation of suppression logic, i devided the blue text area (Details) into different sections. Now (case1) if I place the <TableStart:Table6> merge field at the start of first section and <TableEnd:Table6> at the end of last section of Details portion, then it doesn’t work. (case 2) If I use <TableStart:Table6> and <TableEnd:Table6>merge fields individually for each section then Section A will always be displayed before section C and Section F (Remember other section are suppressed), and section C will always be displayed befor section F.
What I get
case1: Generated documents don’t contain the Details portion
case1:
output file
---------------
OrignalSection1

OrignalSection2

DetailsA

DetailsC
DetailsF
OrignalSection3

OrignalSection4
--------------
<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:0in; mso-para-margin-left:25.95pt; mso-para-margin-bottom:.0001pt; text-align:justify; text-indent:-24.5pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

Suggestion

The <TableStart:Table6> and <TableEnd:Table6> merge fields should work accross the sections.
There should be some way of suppression to a perticular portion within a section.(as we insert breaks to make different sections in word template)

Dear Alexey, i tried fully to explain the senario, if you further have any question then reply please

Regards
Liaqat Ali



Hi

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

Thank you for additional information. Unfortunately, it is still no clear for me how you fill your template with data. Please attach template document (without any data), output document and expected output. Also, please try creating sample code, which will demonstrate the problem. I will try to reproduce the issue on my side and try to help you to resolve it.

Best regards.

The issues you have found earlier (filed as 39) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(40)