Regarding change of text position based on criteria

Stimulsoft Reports.NET discussion
Post Reply
Naveen Aggarwal
Posts: 70
Joined: Wed Feb 24, 2010 11:08 am
Location: India

Regarding change of text position based on criteria

Post by Naveen Aggarwal »

There are two major requirements while designing a report.
1) Actual Text size is not known until runtime.
2) Some columns may not have any data

So my query is

1) Is it possible that text components placed on a band re-size themselves at the runtime (kind of autosize) ?
2) Is it possible to change the text position if a column has no data at runtime. Say for example I have 4 columns to be printed like name, position, class, section.
I place 4 text components on the band. Will it be possible to change the position of class and section if position column has no data.

I came across a topic "change the text position based on criteria" in the forum and tried to do as directed but was not able to do.
I would be highly grateful if you can provide a working sample or step by step tutorial for the same !

Thanks in advance

Naveen
Naveen Aggarwal
Posts: 70
Joined: Wed Feb 24, 2010 11:08 am
Location: India

Regarding change of text position based on criteria

Post by Naveen Aggarwal »

I came across one more topic in the forum "Can I hide data if not available and have its placeholder shrink?"
Still the question remains "how to do it practically" ?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Regarding change of text position based on criteria

Post by Jan »

Hello Naveen,
1) Is it possible that text components placed on a band re-size themselves at the runtime (kind of autosize) ?
Yes you can. Please check CabGrow, CanShrink and AutoSize properties of text component.
2) Is it possible to change the text position if a column has no data at runtime. Say for example I have 4 columns to be printed like name, position, class, section.
I place 4 text components on the band. Will it be possible to change the position of class and section if position column has no data.

I came across a topic "change the text position based on criteria" in the forum and tried to do as directed but was not able to do.
I would be highly grateful if you can provide a working sample or step by step tutorial for the same !
You can use following steps if I right understand you:

1. Add condition to component which will be disable it depend on condition. You can do this with help of Conditions property. Please check attached image.
2. Set Dock proeprty of all components which placed on band to Left.

Also you can use BeforePrintEvent of band to change position of components. Please check second attached image.

Thank you.
Attachments
742.Sample2.png
742.Sample2.png (213.72 KiB) Viewed 2162 times
741.Sample1.png
741.Sample1.png (225.15 KiB) Viewed 2163 times
Naveen Aggarwal
Posts: 70
Joined: Wed Feb 24, 2010 11:08 am
Location: India

Regarding change of text position based on criteria

Post by Naveen Aggarwal »

Thanks a lot sir !

I will try and get back in case there is any difficulty !!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Regarding change of text position based on criteria

Post by Andrew »

Ok!

Thank you.
Naveen Aggarwal
Posts: 70
Joined: Wed Feb 24, 2010 11:08 am
Location: India

Regarding change of text position based on criteria

Post by Naveen Aggarwal »

I tried but it didn't work !
Kindly refer to the posting Can I hide data if not available and have its placeholder shrink dated december 21, 2006 by jonmoores !
I have got the identical requirement !

Thanks & Regards !!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Regarding change of text position based on criteria

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
Post Reply