Page 1 of 1

Working with reports having mutiple tables

Posted: Sun Jan 22, 2012 4:47 am
by sharpguy
Hello,

I am working with reports with multiple tables and relations in Silverlight 11.3, I am handling the tables, relations, and variables the following way. But it does not work. Though the report dictionary is getting datasource, tables, relations. The viewer shows only variables no data. Please let me know what wrong here. Note that, this works fine with reports with single table.

Code: Select all

Public Function LoadReport()
		
		'
		'
		'
		'
		'
		
            InvokePreviewDataSet()


            report.Load(strm)


            For t As Integer = 0 To PreviewDataset.Tables.Count - 1
                PreviewDataset.Tables(t).TableName = report.Dictionary.DataSources.Item(t).ToString()
            Next


            Dim CalColList As New ArrayList 
            Dim VariableList As New ArrayList 
            Dim RelationList As New ArrayList 

            For i As Integer = 0 To report.Dictionary.DataSources(0).Columns.Count - 1
                Dim Col As Object = report.Dictionary.DataSources(0).Columns(i)
                If Col.GetType.Name = "StiCalcDataColumn" Then
                    CalColList.Add(Col)
                End If
            Next

            For i As Integer = 0 To report.Dictionary.Variables.Count - 1
                Dim Var As Object = report.Dictionary.Variables(i)
                If Var.GetType.Name = "StiVariable" Then
                    VariableList.Add(Var)
                End If
            Next

            For r As Integer = 0 To report.Dictionary.Relations.Count - 1
                Dim Rel As Object = report.Dictionary.Relations(r)
                If Rel.GetType.Name = "StiDataRelation" Then
                    RelationList.Add(Rel)
                End If
            Next



            report.Dictionary.Databases.Clear()
            report.Dictionary.DataSources.Clear()
            report.Dictionary.Variables.Clear()
            report.Dictionary.Relations.Clear()




            report.RegData(preview_Dataset)
            report.Dictionary.Synchronize()


            'Add CalcCols
            For Each CalCol As Dictionary.StiCalcDataColumn In CalColList
                report.Dictionary.DataSources(0).Columns.Add(CalCol)
            Next

            'Add Variables
            For Each var As Dictionary.StiVariable In VariableList
                report.Dictionary.Variables.Add(var)
            Next

            'Add Relations
            For Each rel As Dictionary.StiDataRelation In RelationList
                report.Dictionary.Relations.Add(rel)
            Next


            For Each Var In list
                If list.Count > 0 Then
                    If report.Dictionary.Variables.Count > 0 Then
                        report.Dictionary.Variables(list.IndexOf(Var)).ValueObject = Var.CntVal 
                    End If
                End If
            Next

            report.Dictionary.Synchronize()
            report.Render(False)

            Return RenderingReportHelper.CheckReportOnInteractions(report, True)


    End Function



Thank you
Irfan

Working with reports having mutiple tables

Posted: Tue Jan 24, 2012 6:55 am
by Alex K.
Hello,

We couldn't reproduce this bug.
Can you please send us a sample project which reproduces the issue for analysis.

Thank you.

Working with reports having mutiple tables

Posted: Sat Jan 28, 2012 3:03 am
by sharpguy
Hello,

Thanks for your reply. Fortunately the problem has been solved by itself after several builds, without any change in the code, and it works fine now.


Thank you.

Working with reports having mutiple tables

Posted: Sat Jan 28, 2012 3:10 am
by Anton Lozovskiy
Hello,

Let us know if you need any additional help.

Thank you.