Report templates

Stimulsoft Reports.WEB discussion
Post Reply
victorinable
Posts: 152
Joined: Mon Aug 03, 2015 9:28 am

Report templates

Post by victorinable »

Hi,

I'm curious to know if there's a way to create such a template. Let me explain better:

What I do now is that I have an empty report where I have defined :

- SQL Connection
- Variables I need to compose filters for my queries. (Variables are always the same)
- Components (DataBands, Cross-Tabs, Texts...) as example with desired design/properties, then I copy-paste-custom on demand.

Then I copy/rename report so I have a new report with this "template".

Could this be done in some other way? I guess... create a template like the ones pre-defined, like master-detail or chart..., but customized by me.

As in my last post (About separated css to design layout easily) I guess it's fine to allow users to customize or automatize reports layout/behavior more easily. Don't missunderstand this, the tool is GREAT!!, the only hard thing is to customize some little aspects, but you know, customers always want more!! :twisted: :twisted: And furthermore, as I said, solutions exists, but extra work is needed. At least in my scenario, all reports are using same "logic" on behind, that's why I would like to have a template with some variables/properties setted from default.

Thanks in advance.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report templates

Post by HighAley »

Hello.

If you use Mobile Designer, you could load pre designed report template in the Designer.
You could create a set of base report templates and then let customers to choose necessary one.

Thank you.
victorinable
Posts: 152
Joined: Mon Aug 03, 2015 9:28 am

Re: Report templates

Post by victorinable »

Hi,

Ok, but my question was how to di this.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report templates

Post by HighAley »

Hello.

Here is a sample code how to load the report template to the Mobile Designer:

Code: Select all

        public ActionResult GetReportTemplate()
        {
            StiReport report = new StiReport();
            report.Load(@"f:\Support\Report.mrt");
                        
            DataSet data = new DataSet();
            data.ReadXml(Server.MapPath("~/Content/Data/Demo.xml"));
            report.RegData(data);

            return StiMvcMobileDesigner.GetReportTemplateResult(HttpContext, report);
        }
It is taken from the Using Designer sample project. You could find it in \Samples\ASP.NET MVC\HTML\Using Designer\ folder.

Thank you.
victorinable
Posts: 152
Joined: Mon Aug 03, 2015 9:28 am

Re: Report templates

Post by victorinable »

Hi Aleksey,

I think we're not talking about the same... have you read my post entirely?? My question is:

I want to get a report, include some variables and connections, and then, when user is creating a new report (From file/new) as the same way he/she can see "Wite report", "Master Detail report", "Chart report"... I want to create one "template" (Call it template, example, sample... whatever) that user can select to have a base report to work with.

I iknow how to load reports, the main task off the application itself is to "open reports", I just wonder how can I add one of the reports to the templates so user can select from UI. The way I'm doing, people can edit and save as from an explorer I provide within my app, but from your plugin, how can I add templates so user can use it as a base template to work with? Is even a way?

thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report templates

Post by HighAley »

Hello.

Unfortunately, it's impossible to add your templates beside the wizards.
But we have such feature in other our designer and have in plans to implement it in Mvc Mobile designer too.

Thank you.
Post Reply