Page 1 of 1

Rare Behavior creating the report dinamically

Posted: Fri May 27, 2011 2:54 pm
by khalid89
Hi! I'm creating my report dinamically and I have found an unwanted behavior. I'm defining my own styles and applying them to the bands (Group, Data and Footer) and when the report is shown, the style is applied to all the page width, instead of just at the created labels. I'm attaching a link to my sample proyect to clarify my scenario.
The FooterBand is shown as I expected, but the Group and Data bands are not.

http://www.megaupload.com/?d=1J0ROMRB

Download my proyect and I'm sure I will find my mistake.
I hope you can help me,
Best regards,
Seb . .

Rare Behavior creating the report dinamically

Posted: Mon May 30, 2011 5:59 am
by Alex K.
Hello,

Please check the following code:

Code: Select all

private void EstablecerEstilos(StiReport report)
{
    StiGroupHeaderBand groupHeader = report.Pages["Page1"].GetComponents()["GroupBand"] as StiGroupHeaderBand;
    foreach (StiComponent comp in groupHeader.Components)
    {
        comp.ComponentStyle = this.ESTILOS[0];
    }
    StiDataBand dataBand = report.Pages["Page1"].GetComponents()["DataBand"] as StiDataBand;
    foreach (StiComponent comp in dataBand.Components)
    {
        comp.ComponentStyle = this.ESTILOS[1];
    }
    StiFooterBand footerBand = report.Pages["Page1"].GetComponents()["FooterBand"] as StiFooterBand;
    foreach (StiComponent comp in footerBand.Components)
    {
        comp.ComponentStyle = this.ESTILOS[2];
    }
}
Thank you.

Rare Behavior creating the report dinamically

Posted: Mon May 30, 2011 7:32 am
by khalid89
Aleksey,
Thank you for your time and patience =)
Your code works excellent.. I'm glad to find out that your support team have the right answer to our problems, and in a very short time..

Thanks a lot for your work, guys!
Best regards,
Seb . .

Rare Behavior creating the report dinamically

Posted: Mon May 30, 2011 8:18 am
by Andrew
Thank you for your good words! We are glad to hep you!