Page 1 of 1

How to sort fields in datasouce dialog box in stimulsoft designer

Posted: Sun May 11, 2008 11:24 pm
by ngaheer
Hi,

when i drag the table from Datasouces(In Dictonary Tab) in stimulsoft designer it shows us
dialog box that contains the fields of that particular table.
My requirement is i want to sort he fields that is displayed in dialog box. Is it possible? if yes then plz
send us reply.

Thanks In Advance,

How to sort fields in datasouce dialog box in stimulsoft designer

Posted: Mon May 12, 2008 8:27 am
by Edward
Yes, it is possible. Please press the button in the up right corner of the Dictionary panel and you'll be able sort all DataSources and their fields as well. After that all Dialogs will contain sorted fields.

This option will be applied for all new reports if the following property of the StiDesigner is set in true:

StiDesigner.AutoSortDictionaryItems

In the 'Sort Dialog Window' also 'Auto Sort' checkbox is present which sets this option.

Thank you.

How to sort fields in datasouce dialog box in stimulsoft designer

Posted: Wed May 14, 2008 2:31 am
by ngaheer
Hi,

I set this "StiDesigner.AutoSortDictionaryItems" statement in our code but this does not work. Yes, If i press the button in the up right corner of the Dictionary panel then its works fine. But this sort the fields in dictionary on original field names but my requirement, that is i want to sort the fields on Alias Names (Display Names of Fields). Becuase we didnot show the original field names instead we show their captions in Dictionary Panel.

So give me the solution to sort the fields according to Fields Display Names.

I am using following code

_reportDesigner = New Stimulsoft.Report.Design.StiDesigner(_Report)
_Report.RegData("Data", dataSet)

_reportDesigner.AutoSortDictionaryItems = True

If (Not _reportLayout.RLALayout Is Nothing) Then
If (_reportLayout.RLALayout.Trim.Length > 0) Then
_Report.LoadFromString(_reportLayout.RLALayout)
End If
End If


_Report.Dictionary.DataSources.Clear()
_Report.Dictionary.Relations.Clear()
_Report.Dictionary.Synchronize()

Thanks.


How to sort fields in datasouce dialog box in stimulsoft designer

Posted: Wed May 21, 2008 8:55 am
by Vital
Hello,

We have added special static options to report designer - StiOptions.Designer.SortDictionaryByAliases. Please set it to true. After then report designer will be sort values in report designer by Aliases.
You can use method SortItems of StiDictionary to sort items. For example:

Code: Select all

report.Dictionary.SortItems();
Changes will be available in build from 23 May.

Thank you.

How to sort fields in datasouce dialog box in stimulsoft designer

Posted: Sat Jun 21, 2008 12:24 am
by ngaheer
Hi,

I have download the new DLL's of stimulsoft as version SR_2008[1].06.08_R2005_EngineV2. The problem is that the code which you given me to sort the dictionary fields is not wokring in New DLL's but this code was working fine in earlier version of DLL's. The code is following:

report.Dictionary.SortItems();

So can you give the right API to sort the fields in datasource.

Thanks.


How to sort fields in datasouce dialog box in stimulsoft designer

Posted: Sun Jun 22, 2008 3:18 am
by Vital
Hello,

I have checked this code and it work fine. Can you say me which problems you have with it? We will fix it.

Thank you.