Can not display data from .mrt template file

Stimulsoft Reports.Silverlight discussion
Locked
pure123
Posts: 2
Joined: Tue Sep 13, 2011 4:03 am
Location: china

Can not display data from .mrt template file

Post by pure123 »

load the mrt file , and preview,it is nothing on page,read nothing from the server.the mrt file contains sqlconnectionstring .
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Can not display data from .mrt template file

Post by Alex K. »

Hello,

Please send us your report with sample data for analysis.

Thank you.
birang
Posts: 2
Joined: Wed Jun 05, 2013 7:12 am

Re: Can not display data from .mrt template file

Post by birang »

I have a same issue:

Code: Select all

 _context = new ScreenContext();

            _context.Load(_context.GetTable_1Query(), LoadBehavior.RefreshCurrent, true).Completed += (sender1, arg1) =>
                {
                    var lstobj = (from p in _context.Table_1s select p).ToList();
                    report.RegBusinessObject("Table_1", "Table_1", _context.Table_1s);
                    report.Dictionary.SynchronizeBusinessObjects(3);
                    report.Render();
                    viewerControl.Report = report;
                };
file .mrt attach bellow not display data
Attachments
OM_BaoCaoDSBanHangTheoHD.mrt
(29.78 KiB) Downloaded 336 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Can not display data from .mrt template file

Post by HighAley »

Hello.

To solve a problem rapidly we need the following information from you:
  • Product name and its version;
  • Detailed description of the problem and how to reproduce it;
  • Your operational system (98, ME, 2000, XP, Vista or NT), its version and localization, installed service-packs;
  • Version the of Microsoft .Net Framework package installed and its localization;
  • Name of your development framework and its version;
  • Additional information that can help us to solve your problem.
Thank you.
birang
Posts: 2
Joined: Wed Jun 05, 2013 7:12 am

Re: Can not display data from .mrt template file

Post by birang »

Hi Aleksey,
I used to Stimulsoft Reports.Ultimate 2012.1
I development silverlight project with RIA Service.
In Init event of MainPage.xaml I code next:

Code: Select all

 public Page2()
        {
            InitializeComponent();
            StiReport report = new StiReport();
            InitializeComponent();
            using (Stream stream = this.GetType().Assembly.GetManifestResourceStream("HRApp.Report.OM_BaoCaoDSBanHangTheoHD.mrt"))
            {
                if (stream == null)
                    throw new Exception();


                report.Load(stream);
            }
            _context = new ScreenContext();

            _context.Load(_context.GetTable_1Query(), LoadBehavior.RefreshCurrent, true).Completed += (sender1, arg1) =>
                {
                    var lstobj = (from p in _context.Table_1s select p).ToList();
                    report.RegBusinessObject("Table_1", "Table_1", _context.Table_1s);
                    report.Dictionary.SynchronizeBusinessObjects(3);
                    report.Render();
                    viewerControl.Report = report;
                };

            //report.Dictionary.Databases.Clear();
            //report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", @"Provider=SQLNCLI10.1;Persist Security Info=False;User ID=sa;Initial Catalog=eBiz4DApp;Data Source=TOANND-PC\TOANND;password=P@ssw0rd"));
           // report.Dictionary.Restrictions.Add("sptest", StiDataType.DataSource, StiRestrictionTypes.DenyEdit);
            //report.CompiledReport.DataSources["sptest"].Parameters["@opt"].ParameterValue = 1;
        

      
        }
In RIA Service code next:

Code: Select all

   public IQueryable<Table_1> GetTable_1()
        {
            return this.ObjectContext.Table_1;
        }

I use Microsoft Visual Studio 2010, .Net Framework 4.0

Thanks and looking forward to your help.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Can not display data from .mrt template file

Post by Alex K. »

Hello,

Please check the last prerelease build and let us know about the result.
Also if possible please send us a sample project which reproduce the issue for analysis.

Thank you.
Locked