Clone element with multiple panels

Jump to: Board index.NET FrameworkStimulsoft Reports.Net

Stimulsoft Reports.Net discussion

Clone element with multiple panels

Post Mon Oct 02, 2017 7:52 am

Hello the Stimulsoft Team,

I'd like to use one clone including a container that match with multiple panels which are situated on another page. With a condition or an event, is it possible to change the container before rendering the report ?

I think an event is the better method, but only the first panel appears on the final report :?

:arrow: There is a sample in attachment, with his XML data source file. I used here a beforeRender envent on the data band.

Thanks in advance.
Arnaud
Attachments
data sample.xml
(49.43 KiB) Downloaded 11 times
report sample.mrt
(304.88 KiB) Downloaded 11 times
alepage
 
Posts: 39
Joined: Mon Jan 19, 2009 7:02 am
Location: France

Re: Clone element with multiple panels

Post Tue Oct 03, 2017 6:10 pm

Hello,

We couldn't run your report. In your report dictionary is empty and all relations are lost.

Thank you.
Alex K.
 
Posts: 6300
Joined: Thu Jul 29, 2010 2:37 am

Re: Clone element with multiple panels

Post Wed Oct 04, 2017 3:31 pm

Hello,

I don't understand because the xml file contains data on my post.

Here is some screenshots.

On a fist page, I use a clone in a data band in reference to a category named "ARTICLE".
Clones.png
Clones.png (61.65 KiB) Viewed 272 times


The clone is not affected to a panel a this time.

On another page, that is desabled, I place another band that referenced to the "ARTICLE" category. Then, I place on this band multiples clones whose names could be seen on the first screenshot.
There is the second one that present the second page of my report :
Panels.png
Panels.png (62.9 KiB) Viewed 272 times


With an "before rendering" event that I use with the databand of the fist page, I'm trying to change the container in function of a value returned by one of our variables.
Here is a sample of those variables present in the report dictionnary :
report_dictionnary.png
report_dictionnary.png (19.7 KiB) Viewed 272 times


I use that kind of test in the event :
Code: Select all
if(ARTICLE.ARTICLEFRN.VAL181 == "HApplique") Clone1.Container = PanneauHApplique;
if(ARTICLE.ARTICLEFRN.VAL181 == "HAppliqueDecalageSeuil") Clone1.Container = PanneauHAppliqueDecalageSeuil;


When the value is initialized with the first data, the container is correctly affected. With a second value received in the databand, that is different of the first one, the clone is still refered to the same container when rendering. With a third value that is the same as the first one, the clone present correctly to the panel.
rendering.png
rendering.png (75.32 KiB) Viewed 272 times


I hope my explanations are enough detailed.

Thanks in advance.
alepage
 
Posts: 39
Joined: Mon Jan 19, 2009 7:02 am
Location: France

Re: Clone element with multiple panels

Post Thu Oct 05, 2017 9:59 pm

Hello,

Your XML file does not contain relations. Please send us XSD file also.

Thank you.
Attachments
Capture.PNG
Capture.PNG (78.04 KiB) Viewed 263 times
Alex K.
 
Posts: 6300
Joined: Thu Jul 29, 2010 2:37 am

Re: Clone element with multiple panels

Post Tue Oct 10, 2017 10:15 am

Hi,

I've seen with our developer, we don't have XSD files.
Those relations are added after loading the XML file in the dictionnary by using those instructions (c# code) :
Code: Select all
   DataColumn parentCol = _reportData.Tables["ARTICLEFRN"].Columns["_ID"];
   DataColumn childCol = _reportData.Tables["ARTICLE"].Columns["_IDCMDFRN"];
   _reportData.Relations.Add(parentCol, childCol);
                       
   DataColumn parentCol = _reportData.Tables["GRPART"].Columns["_ID"];
   DataColumn childCol = _reportData.Tables["ARTICLE"].Columns["_IDGRPART"];
   _reportData.Relations.Add("GRPART_ARTICLE", parentCol, childCol);


The developer told me the XML file I've send to you was finally unfinished.
There is another file in attachment. I hope you could use this one.

Thanks,
Arnaud
Attachments
data sample.xml
(72.71 KiB) Downloaded 9 times
alepage
 
Posts: 39
Joined: Mon Jan 19, 2009 7:02 am
Location: France

Re: Clone element with multiple panels

Post Wed Oct 11, 2017 1:09 pm

Hello,

You can use the following code in the AfterPrint event of the page to save uses data to xml and xsd:
Code: Select all
ARTICLE.DataTable.DataSet.WriteXml(@"d:\data.xml");​
ARTICLE.DataTable.DataSet.WriteXmlSchema(@"d:\data.xsd")​;

Thank you.
Alex K.
 
Posts: 6300
Joined: Thu Jul 29, 2010 2:37 am

Re: Clone element with multiple panels

Post Wed Oct 11, 2017 3:02 pm

Hello,

Here there are.

Thank you
Attachments
data.xsd
(62.08 KiB) Downloaded 9 times
data.xml
(46.3 KiB) Downloaded 8 times
alepage
 
Posts: 39
Joined: Mon Jan 19, 2009 7:02 am
Location: France

Re: Clone element with multiple panels

Post Mon Oct 16, 2017 6:19 am

Hello,

Thank you for the test data.
We need some additional time to investigate the issue. We will let you know about te result.

Thank you.
Alex K.
 
Posts: 6300
Joined: Thu Jul 29, 2010 2:37 am

Re: Clone element with multiple panels

Post Mon Oct 16, 2017 7:06 am

Thanks too
alepage
 
Posts: 39
Joined: Mon Jan 19, 2009 7:02 am
Location: France

Re: Clone element with multiple panels

Post Tue Oct 17, 2017 11:05 am

Hello.

Please, try to add a Sub-report with a Data band and Child bands.
You could disable all unnecessary Child bands using Conditions.
Please, look at the attached image.

Thank you.
Attachments
SubReportImage.mrt
(12.45 KiB) Downloaded 7 times
HighAley
 
Posts: 7579
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Next

Return to Stimulsoft Reports.Net

Who is online

Users browsing this forum: Google [Bot] and 7 guests