Rank: Newbie
Groups: Registered
Joined: 6/21/2018(UTC) Posts: 0
|
Diagram Database DiagramThis is my database diagram, i have built a Repository that reflects exactly the diagram by adding the table from the catalog on the seal server manager. the problem is, when i create a report using three related table - FactRegisteredStudent
- DimClass
- DimAcademicYear
the generated query looks like the following: Code:SELECT DISTINCT
Reporting.DimClass.ClassId AS C0,
Reporting.FactRegisteredStudent.StudentId AS C1,
Reporting.DimAcademicYear.AcademicYear AS C2
FROM
(Reporting.DimClass INNER JOIN
(Reporting.FactLeftSchool INNER JOIN
(Reporting.DimAcademicYear INNER JOIN Reporting.FactRegisteredStudent
ON Reporting.DimAcademicYear.AcademicYearId = Reporting.FactRegisteredStudent.AcademicYearId)
ON Reporting.DimAcademicYear.AcademicYearId = Reporting.FactLeftSchool.AcademicYearId)
ON Reporting.DimClass.ClassId = Reporting.FactLeftSchool.ClassId)
ORDER BY Reporting.DimClass.ClassId ASC,Reporting.FactRegisteredStudent.StudentId ASC,Reporting.DimAcademicYear.AcademicYear ASC
i have tried to use join table to avoid and join table to use properties but the query stay the same, so their is any way to make the report designer correct the generated query without setting the form clause manually? Thanks Edited by user Friday, September 28, 2018 7:58:35 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Yes it is strange, can you reproduce it with Northwind and upload the sample report ? Or can you simply upload the report and data source ?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 6/21/2018(UTC) Posts: 0
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Thank you for the files, I have to investigate why it is like this (perhaps a bug in the Joins engine when there are circular paths, to be fixed for the 4.1). In the meantime, you can use the following workaround: Select the 'Views' node, and edit the 'Init Script' of the report: Code:@using Seal.Model
@{
Report report = Model;
report.Sources[0].MetaData.Joins.RemoveAll(i => i.Name.Contains("LeftSchool"));
}
This will remove the joins defined for LeftSchool and fix your join resolution.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 6/21/2018(UTC) Posts: 0
|
thank you very much.
i can't wait to hear from you that this bug has been resolved, i will consider your suggestion as my temp workaround.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Another workaround is to play with the 'Is Bi-Directional' flag of your join: setting this to false for 'Reporting.DimAcademicYear - Reporting.FactLeftSchool' seems to work and generate the correct Join clause.
This flag indicates to consider only one direction Right Table-Left Table
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 6/21/2018(UTC) Posts: 0
|
Thank you,
i have tried the mentioned workaround, no one work perfectly for me, for the time being i will stick with setting from clause manually and will wait for the next version.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Yes, you are right, the simplest is to modify the "From" SQL Statement in your model.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
This has been fixed and will be available in 4.1
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 6/21/2018(UTC) Posts: 0
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.