Refresh fields in datasource
Refresh fields in datasource
Hi,
We're just evaluating your product, but can't figure out how to achieve this...
I have a report that is linked to a sql view, and want to add a field to the view then have it available in the report designer.
After adding a field to a view used in a report, I've tried opening the report, going to the Dictionary panel, then going Actions -> Syncronize...but the new field doesn't appear.
Hopefully there's a simple way for the designer to see the database changes...
Thanks in advance,
Dave.
We're just evaluating your product, but can't figure out how to achieve this...
I have a report that is linked to a sql view, and want to add a field to the view then have it available in the report designer.
After adding a field to a view used in a report, I've tried opening the report, going to the Dictionary panel, then going Actions -> Syncronize...but the new field doesn't appear.
Hopefully there's a simple way for the designer to see the database changes...
Thanks in advance,
Dave.
Re: Refresh fields in datasource
Hello, Dave
Please try to use the "RetrieveColumn" button in the edit datasource window for the necessary datasource.
Thank you.
Please try to use the "RetrieveColumn" button in the edit datasource window for the necessary datasource.
Thank you.
Re: Refresh fields in datasource
Hi,
can this be achieved programatically when having custom StiUserSource and StiUserAdapterService? So the column appears in Dictionary on the right
thanks!
can this be achieved programatically when having custom StiUserSource and StiUserAdapterService? So the column appears in Dictionary on the right
thanks!
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Refresh fields in datasource
Hello,
You can use RegData() and Synchronize() methods.
Thank you.
You can use RegData() and Synchronize() methods.
Thank you.
Re: Refresh fields in datasource
Hello,
unfortunatelly, the RegData creates a new DataSource "test" instead of replacing our "GEONIS/test" datasource
the code:
unfortunatelly, the RegData creates a new DataSource "test" instead of replacing our "GEONIS/test" datasource
the code:
Code: Select all
StiReport.Load(filePath);
UpdateAssemblies();
foreach (StiDataSource stiReportDataSource in StiReport.DataSources)
{
if (stiReportDataSource.GetDataAdapter() is GReportAdapterService gds)
{
DataTable gDataTable = gds.FetchColumns(stiReportDataSource as GReportDataSource);
StiReport.RegData(stiReportDataSource.Name, gDataTable);
}
}
StiReport.Dictionary.Synchronize();
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Refresh fields in datasource
Hello,
You should use the same name of the DataSet(GEONIS) and Table(test) in the RegData() method.
Thank you.
You should use the same name of the DataSet(GEONIS) and Table(test) in the RegData() method.
Thank you.
Re: Refresh fields in datasource
Thanks, I tried as you suggested with
RegData("GEONIS", gDataTable) but it didnt refresh missing column.
the mrt looks like this:
I tried to delete DOCUMENT column from the DB, but in Dictionaries in Designer it does not refresh.
The "GEONIS" is category name in the GReportDataSource.
RegData("GEONIS", gDataTable) but it didnt refresh missing column.
the mrt looks like this:
I tried to delete DOCUMENT column from the DB, but in Dictionaries in Designer it does not refresh.
The "GEONIS" is category name in the GReportDataSource.
Code: Select all
public override string GetCategoryName()
{
return "GEONIS";
}
- Attachments
-
- GeonisReportDesigner_2019-07-16_08-08-27.png (15.01 KiB) Viewed 3113 times
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Refresh fields in datasource
Hello,
Please check:
report.Dictionary.DataSources.Clear();
report.RegData("");
report.Dictionary.Synchronize();
Thank you.
Please check:
report.Dictionary.DataSources.Clear();
report.RegData("");
report.Dictionary.Synchronize();
Thank you.
Re: Refresh fields in datasource
That is weird, even if i do
report.Dictionary.DataSources.Clear();
report.Dictionary.Synchronize();
the Data Sources in Dictionary UI does not get empty.
report.Dictionary.DataSources.Clear();
report.Dictionary.Synchronize();
the Data Sources in Dictionary UI does not get empty.
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Refresh fields in datasource
Hello,
Please send us a sample project which reproduces the issue for analysis.
Thank you.
Please send us a sample project which reproduces the issue for analysis.
Thank you.