How to sort fields in datasouce dialog box in stimulsoft designer

Stimulsoft Reports.NET discussion
Post Reply
ngaheer
Posts: 44
Joined: Sat Jul 22, 2006 1:12 am
Location: San Jose

How to sort fields in datasouce dialog box in stimulsoft designer

Post 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,
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to sort fields in datasouce dialog box in stimulsoft designer

Post 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.
ngaheer
Posts: 44
Joined: Sat Jul 22, 2006 1:12 am
Location: San Jose

How to sort fields in datasouce dialog box in stimulsoft designer

Post 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.

Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to sort fields in datasouce dialog box in stimulsoft designer

Post 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.
ngaheer
Posts: 44
Joined: Sat Jul 22, 2006 1:12 am
Location: San Jose

How to sort fields in datasouce dialog box in stimulsoft designer

Post 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.

Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to sort fields in datasouce dialog box in stimulsoft designer

Post 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.
Post Reply