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

  • edited 8:17PM
    Hello,
    wrote:
    Is there a query designer data dictionary that I can set up?
    Query designer does not use data dictionary. It works with original table/column names.
    wrote:
    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?
    Could you post a screenshot? I was not able to reproduce that.
    wrote:
    Also, is there a way to override the query designer, and to be able to use our own?
    No way unless you use FastReport.Net Professional with source code. In this case you may make own build.
    wrote:
    Also, I tried adding relations programmatically, after loading the tables schema, but I don't see them.
    Set the rel.Enabled to true.
  • edited 8:17PM
    wrote:
    wrote:
    Is there a query designer data dictionary that I can set up?
    Query designer does not use data dictionary. It works with original table/column names.
    So, for an end user, I would have to give them the tables relations in a help document?
    wrote:
    wrote:
    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?
    Could you post a screenshot? I was not able to reproduce that.
    I've attached the screenshot.
    wrote:
    wrote:
    Also, is there a way to override the query designer, and to be able to use our own?
    No way unless you use FastReport.Net Professional with source code. In this case you may make own build.
    I was afraid of that.
    wrote:
    wrote:
    Also, I tried adding relations programmatically, after loading the tables schema, but I don't see them.
    Set the rel.Enabled to true.
    It didn't work for me. And, I've installed version 1.4.
  • edited 8:17PM
    wrote:
    It didn't work for me. And, I've installed version 1.4.
    Could you provide more details on what exactly is not working.
  • edited 8:17PM
    AlexTZ wrote: »
    AlexTZ wrote: »
    It didn't work for me. And, I've installed version 1.4.
    Could you provide more details on what exactly is not working.

    After the line following line is executed:
    DataSourceBase InvoicesTable = vReport.Dictionary.DataSources.FindByAlias("V_INVOICE");
    
    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.
  • edited 8:17PM
    You should use the following code to get a datasource:

    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).
  • edited 8:17PM
    Thanks, it works.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.