DefaultTextQualityMode for new Components
-
- Posts: 63
- Joined: Fri Jul 17, 2009 5:00 am
- Location: St. Gallen, Switzerland
DefaultTextQualityMode for new Components
Hello
There is a static property StiOptions.Engine.DefaultTextQualityMode
If this property will be set, all new instances of StiText components will be set with the configured textquality wheter opened in design or preview mode.
Is it possible to set a default textquality only for thos components which will be newly added in design pane?
Thank you.
Andreas
There is a static property StiOptions.Engine.DefaultTextQualityMode
If this property will be set, all new instances of StiText components will be set with the configured textquality wheter opened in design or preview mode.
Is it possible to set a default textquality only for thos components which will be newly added in design pane?
Thank you.
Andreas
Re: DefaultTextQualityMode for new Components
Hello.
Thank you.
This static option set the default text quality mode for newly added StiText components.Andreas Tastler wrote:There is a static property StiOptions.Engine.DefaultTextQualityMode
If this property will be set, all new instances of StiText components will be set with the configured textquality wheter opened in design or preview mode.
Is it possible to set a default textquality only for thos components which will be newly added in design pane?
Thank you.
-
- Posts: 63
- Joined: Fri Jul 17, 2009 5:00 am
- Location: St. Gallen, Switzerland
Re: DefaultTextQualityMode for new Components
But it it also sets the textquality for existing components. I want to ensure that only newly created components will be get the default textquality.
Because existing components should not be changed.
Because existing components should not be changed.
Re: DefaultTextQualityMode for new Components
Hello.
This static option set the default text quality mode for newly added StiText components only.
Thank you.
This static option set the default text quality mode for newly added StiText components only.
Thank you.
-
- Posts: 63
- Joined: Fri Jul 17, 2009 5:00 am
- Location: St. Gallen, Switzerland
Re: DefaultTextQualityMode for new Components
Hello.
If a report has been saved with text quality standard, then the text quality property of StiText will not be serialized to the mrt. When deserializing the report on load, the property will be set with the value in DefaultTextQualityMode. I dont want overwrite any text quality settings of saved reports.
Regards.
Andreas
If a report has been saved with text quality standard, then the text quality property of StiText will not be serialized to the mrt. When deserializing the report on load, the property will be set with the value in DefaultTextQualityMode. I dont want overwrite any text quality settings of saved reports.
Regards.
Andreas
Re: DefaultTextQualityMode for new Components
Hello.
Sorry for a little misunderstood. The DefaultTextQualityMode is Standard by default. When you create a StiText component with default text mode and serialize report, the default text quality isn't written in mrt file. And at deserializing time if StiText component has no text quality property the default mode is set.
Now when you change The DefaultTextQualityMode property before loading report this issue occurs.
Try to set the The DefaultTextQualityMode property after loading report. Then this property should be right.
Thank you.
Sorry for a little misunderstood. The DefaultTextQualityMode is Standard by default. When you create a StiText component with default text mode and serialize report, the default text quality isn't written in mrt file. And at deserializing time if StiText component has no text quality property the default mode is set.
Now when you change The DefaultTextQualityMode property before loading report this issue occurs.
Try to set the The DefaultTextQualityMode property after loading report. Then this property should be right.
Thank you.
-
- Posts: 63
- Joined: Fri Jul 17, 2009 5:00 am
- Location: St. Gallen, Switzerland
Re: DefaultTextQualityMode for new Components
Hello
Thank you for you hint. I tried it and found out that there are more traps than deserializing. If the report will be instantiated by the method StiReport.GetReportFromAssembly() the text quality property will also be overwritten. For me it looks very difficult to handle this property correctly.
Andreas
Thank you for you hint. I tried it and found out that there are more traps than deserializing. If the report will be instantiated by the method StiReport.GetReportFromAssembly() the text quality property will also be overwritten. For me it looks very difficult to handle this property correctly.
Andreas
Re: DefaultTextQualityMode for new Components
Hello.
You could follow the same scenario:Andreas Tastler wrote:Thank you for you hint. I tried it and found out that there are more traps than deserializing. If the report will be instantiated by the method StiReport.GetReportFromAssembly() the text quality property will also be overwritten. For me it looks very difficult to handle this property correctly.
- Change the DefaultTextQualityMode property to Standard.
- Call GetReportFromAssembly() method.
- Set necessary value to DefaultTextQualityMode property.
-
- Posts: 63
- Joined: Fri Jul 17, 2009 5:00 am
- Location: St. Gallen, Switzerland
Re: DefaultTextQualityMode for new Components
Hello
This is true, but not as easy it looks like. This method will also be called by the Compile method in StiReport. So, I have to switch the DefaultTextQualityMode Before and After Compiling. OK, there are GlobalEvents in StiOptions which can handle this, but this thing seems to be a pretty tricky and will going to be buggy very soon...
I think, I use a report variable contains the desired Textquality. Then I set the textquality property of existing StiText components when opening report in designer and new StiText components at creation time.
Thank you.
Andreas
This is true, but not as easy it looks like. This method will also be called by the Compile method in StiReport. So, I have to switch the DefaultTextQualityMode Before and After Compiling. OK, there are GlobalEvents in StiOptions which can handle this, but this thing seems to be a pretty tricky and will going to be buggy very soon...
I think, I use a report variable contains the desired Textquality. Then I set the textquality property of existing StiText components when opening report in designer and new StiText components at creation time.
Thank you.
Andreas
Re: DefaultTextQualityMode for new Components
Hello.
It's a way around your problem.
Unfortunately, we couldn't change this issue because it can cause significant problems.
Thank you.
It's a way around your problem.
Unfortunately, we couldn't change this issue because it can cause significant problems.
Thank you.