Inject text at runtime on default location

Stimulsoft Reports.Flex discussion
Locked
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Inject text at runtime on default location

Post by hugo »

Hello,

I want to inject a vertical text at runtime (not design time) in the bottom left corner (as the one provided in attachement, that I easily created at design time).

This is my code, so far (not fully tested):
brandText = new StiText(new StiRectangle(9.6, 28, 10, 0.6), _brandText);
brandText.font = new StiFont("Arial", 8, "Point", 2);
brandText.horAlignment = 2;
brandText.vertAlignment = 3;
brandText.textOptions.angle = 90;

I don't want to depend on the x, y coordinates because I have different report sizes.
I would like to allways get something similar to the provided example

There is any method to achive that or there is any method to get the report dimensions so I can calculate te bottom left ?

PS: I also have reports with different pages with different sizes for specific use cases.

Regards,
Hugo.
Attachments
Template_BuildingBuilding.png
Template_BuildingBuilding.png (17.52 KiB) Viewed 12031 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Inject text at runtime on default location

Post by Alex K. »

Hello,

You can try to place your Text component on the CrossData band.

Thank you.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Inject text at runtime on default location

Post by hugo »

Thank you.
Your suggestion did not worked for me (I also tried dock style) because the header and footer forced the text to be on me middle of the report.

However I solved my issue with the following code:

Code: Select all

                    brandText = new StiText(new StiRectangle(-0.4, page.height - 15, 0.3, 15), _brandText);
                    brandText.font = new StiFont("Arial", 8, "Point", 2);
                    brandText.textOptions.angle = 90;
                    page.components.add(brandText);
Regards,
Hugo.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Inject text at runtime on default location

Post by Alex K. »

Hello

Ok.
Please let us know if you need any additional help.

Thank you.
Locked