Page 1 of 1
Modify RunTime Structure
Posted: Wed Sep 04, 2013 4:02 pm
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.
Re: Modify RunTime Structure
Posted: Thu Sep 05, 2013 6:14 am
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.
Re: Modify RunTime Structure
Posted: Sun Sep 08, 2013 7:08 pm
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!
Re: Modify RunTime Structure
Posted: Mon Sep 09, 2013 8:13 am
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.