Page 1 of 2

Clone element with multiple panels

Posted: Mon Oct 02, 2017 7:52 am
by alepage
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

Re: Clone element with multiple panels

Posted: Tue Oct 03, 2017 6:10 pm
by Alex K.
Hello,

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

Thank you.

Re: Clone element with multiple panels

Posted: Wed Oct 04, 2017 3:31 pm
by alepage
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 6052 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 6052 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 6052 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 6052 times
I hope my explanations are enough detailed.

Thanks in advance.

Re: Clone element with multiple panels

Posted: Thu Oct 05, 2017 9:59 pm
by Alex K.
Hello,

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

Thank you.

Re: Clone element with multiple panels

Posted: Tue Oct 10, 2017 10:15 am
by alepage
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

Re: Clone element with multiple panels

Posted: Wed Oct 11, 2017 1:09 pm
by Alex K.
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.

Re: Clone element with multiple panels

Posted: Wed Oct 11, 2017 3:02 pm
by alepage
Hello,

Here there are.

Thank you

Re: Clone element with multiple panels

Posted: Mon Oct 16, 2017 6:19 am
by Alex K.
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.

Re: Clone element with multiple panels

Posted: Mon Oct 16, 2017 7:06 am
by alepage
Thanks too

Re: Clone element with multiple panels

Posted: Tue Oct 17, 2017 11:05 am
by HighAley
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.