Modify RunTime Structure

Stimulsoft Reports.Flex discussion
Locked
lgil
Posts: 2
Joined: Wed Sep 04, 2013 3:55 pm

Modify RunTime Structure

Post by lgil »

Hola,
Necesito modificar la estructura del informe en tiempo de ejecucion con el componente Flex.
Ejemplo, en la plantilla tengo: Campo 1, Campo 2, Campo 3 pero al momento de ejecutar el informe necesito agregar uno o dos campos mas..
Me podrian indicar como se realiza esta operacion?
Desde ya muchas gracias.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Modify RunTime Structure

Post by Vladimir »

Hello,

You can use the following code:
Usted puede utilizar el código siguiente:

Code: Select all

				var page: StiPage = report.pages[0] as StiPage;
				var text1: StiText = new StiText(new StiRectangle(0, 0, page.width, 0.85), "My Text Component");
				text1.name = "Text1";
				text1.font = new StiFont("Arial", 12);
				page.components.add(text1);
Thank you.
lgil
Posts: 2
Joined: Wed Sep 04, 2013 3:55 pm

Re: Modify RunTime Structure

Post by lgil »

Muchas gracias.
Eso me sirve para dar de alta en la page Ejemplo Titulo, etc. Me podrias facilitar el codigo para habilitar campos en la StiDataBand?
Muchas gracias!
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Modify RunTime Structure

Post by Vladimir »

Hello,

Please try using the code below:
Por favor, intente con el siguiente código:

Code: Select all

				var page: StiPage = report.pages[0] as StiPage;
				var dataBand: StiDataBand = page.components.getComponentByName("DataBand1");
				var text1: StiText = new StiText(new StiRectangle(0, 0, page.width, 0.85), "My Text Component");
				text1.name = "Text1";
				text1.font = new StiFont("Arial", 12);
				dataBand.components.add(text1);
Thank you.
Locked