Page 1 of 1

DataSource Relations are Not working on tamplate with Code.

Posted: Wed Sep 04, 2013 12:35 pm
by roomy
With my report datasource relations create issue when I use C# code. I have a template with controls, datasource and relation,
when i use XML file all relations are working file. please find an exampls with attachment.

But with Code all relations are fail. Code I use :

Code: Select all

    StiReport report1 = new StiReport();
    report1.Load(templatePath);
    DataSet ds = new DataSet();
    DataReportFunction(ref ds);
   // ds.Relations.Add("Prod_Comp_Info",ds.Tables["P"].Columns["productid"], ds.Tables["Child"].Columns["productid"]);
    report1.Dictionary.DataSources.Clear();
    report1.RegData(ds);
    report1.Dictionary.Synchronize();
    report1.Compile();
    ds.Dispose();
[/color]

Re: DataSource Relations are Not working on tamplate with Co

Posted: Thu Sep 05, 2013 7:08 am
by Alex K.
Hello,

Can you please send us a sample project which reproduce the issue for analysis.

Thank you.

Re: DataSource Relations are Not working on tamplate with Co

Posted: Mon Sep 09, 2013 4:40 am
by roomy
I got the solution here..

I need to remove report1.Dictionary.DataSources.Clear();
Thanks Aleksey.

Re: DataSource Relations are Not working on tamplate with Co

Posted: Mon Sep 09, 2013 5:23 am
by HighAley
Hello.

Let us know if you will need any additional help.

Thank you.