Rare Behavior creating the report dinamically

Stimulsoft Reports.NET discussion
Post Reply
khalid89
Posts: 6
Joined: Wed May 04, 2011 10:34 am
Location: Capital Federal

Rare Behavior creating the report dinamically

Post 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 . .
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Rare Behavior creating the report dinamically

Post 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.
khalid89
Posts: 6
Joined: Wed May 04, 2011 10:34 am
Location: Capital Federal

Rare Behavior creating the report dinamically

Post 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 . .
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Rare Behavior creating the report dinamically

Post by Andrew »

Thank you for your good words! We are glad to hep you!
Post Reply