Inject text at runtime on default location

Jump to: Board indexJS, Java, PHP, FlexStimulsoft Reports.Flex

Stimulsoft Reports.Flex discussion

Inject text at runtime on default location

Post Fri Sep 22, 2017 8:08 am

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 65 times
hugo
 
Posts: 301
Joined: Fri Mar 08, 2013 10:46 am

Re: Inject text at runtime on default location

Post Fri Sep 22, 2017 9:29 am

Hello,

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

Thank you.
Alex K.
 
Posts: 6217
Joined: Thu Jul 29, 2010 2:37 am

Re: Inject text at runtime on default location

Post Sat Sep 23, 2017 11:00 pm

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.
hugo
 
Posts: 301
Joined: Fri Mar 08, 2013 10:46 am

Re: Inject text at runtime on default location

Post Mon Sep 25, 2017 1:04 pm

Hello

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

Thank you.
Alex K.
 
Posts: 6217
Joined: Thu Jul 29, 2010 2:37 am


Return to Stimulsoft Reports.Flex

Who is online

Users browsing this forum: No registered users and 2 guests