Page 1 of 1
some suggestion about column caption
Posted: Mon Apr 28, 2008 4:31 pm
by progame
I use regdata to pass a dataset for report, and i have localized datacolumn caption for those tables, but in designer, still show column name. it's not friendly for end-user.
some suggestion about column caption
Posted: Tue Apr 29, 2008 6:19 am
by progame
oh, it's my fault, stireport can show column caption, but why not show relation name in dictionary?
now my table named A has serveral self relation, in dictionary it shows:
A
A
A1
A2
Field1
Field2
some suggestion about column caption
Posted: Tue Apr 29, 2008 4:06 pm
by Edward
Now the Relation has three different names:
NameInSource - this is the 'real' name of the Relation in the DataSet.
Name - it is the Name of the Relation itself as a Dictionary's component.
Alias - this property is shown in the Dictionary and as name of the Relation for connecting Parent and Child DataSources in the name of the filed, e.g.:
{ChildSource.AliasOfTheRelation.ParentSource}
This option can be activated/deactivated with "Use Aliases" checkbox in the Dictionary.
Thank you.
some suggestion about column caption
Posted: Wed Apr 30, 2008 6:13 am
by progame
m_StiReport.RegData(m_Data);
// change relation name
foreach (StiDataRelation r in m_StiReport.Dictionary.Relations)
{
var name = r.NameInSource.ToLower();
name = name.Replace(r.ParentSource.Name.ToLower(),string.Empty).Replace(r.ChildSource.Name.ToLower(),string.Empty);
r.Name = name;
r.Alias = name;
}
i need to change relation name by code, but after regdata, not any relation is dictionary, why?
some suggestion about column caption
Posted: Thu May 01, 2008 12:15 am
by Edward
RegData method doesn't adds new DataSources to the Dictionary. It only registered them in DataStore of the report.
Please add the following method call after RegData:
Code: Select all
m_StiReport.Dictionary.Synchronize();
Also all relations must have unique name in the Dictionary.
Thank you.
some suggestion about column caption
Posted: Thu May 01, 2008 3:05 am
by progame
thanks.
it seems nameindatasource must be unique in whole diction, name and alias just be unique in current datasource?
some suggestion about column caption
Posted: Thu May 01, 2008 10:49 am
by Edward
The limitation is for Name property only. It must be unique for the whole Dictionary.
Thank you.