Probelm setting the relations
Hi,
Is there a query designer data dictionary that I can set up?
Also, when in the query designer, I notice that the table names appearing on the right are not displaying the whole name, but ending with "...". What setting can I use to change that?
Also, is there a way to override the query designer, and to be able to use our own?
Also, I tried adding relations programmatically, after loading the tables schema, but I don't see them.
Any help would be appreciated.
Daniel Rail
Is there a query designer data dictionary that I can set up?
Also, when in the query designer, I notice that the table names appearing on the right are not displaying the whole name, but ending with "...". What setting can I use to change that?
Also, is there a way to override the query designer, and to be able to use our own?
Also, I tried adding relations programmatically, after loading the tables schema, but I don't see them.
// Declare all the tables that will have relations
DataSource InvoicesTable = vReport.Dictionary.DataSources.FindByAlias("V_INVOICE");
DataSourceBase AccountsTable = vReport.Dictionary.DataSources.FindByAlias("V_ACCOUNT");
// Declare the relations
Relation rel = new Relation();
rel.Name = "AccountsInvoices";
rel.ParentDataSource = AccountsTable;
rel.ChildDataSource = InvoicesTable;
rel.ParentColumns = new string[] { "ECO_ID" };
rel.ChildColumns = new string[] { "ACCOUNT" };
vReport.Dictionary.Relations.Add(rel);
Any help would be appreciated.
Daniel Rail
Comments
Query designer does not use data dictionary. It works with original table/column names.
Could you post a screenshot? I was not able to reproduce that.
No way unless you use FastReport.Net Professional with source code. In this case you may make own build.
Set the rel.Enabled to true.
I've attached the screenshot.
I was afraid of that.
It didn't work for me. And, I've installed version 1.4.
After the line following line is executed: InvoicesTable is null. I also noticed that vReport.DataDictionary.DataSources contains no data sources, and this is after adding a FirebirdDataConnection with a loaded schema(I was able to verify while tracing through the code that the connection's Tables collection does contain the list of tables that I want).
Can you give some guidance? I'm not sure what I'm doing wrong.
report.GetDataSource("aliasname")
instead of
report.Dictionary.DataSources.FindByAlias("aliasname")
Dictionary.DataSources collection contains only datasources registered in your program's code. If you use report data connection, the datasources reside in the Connection object (the collection of connections is Dictionary.Connections).