StiMvcMobileDesigner rendering

Stimulsoft Reports.WEB discussion
Post Reply
pritaeas
Posts: 7
Joined: Mon Apr 07, 2014 7:33 am

StiMvcMobileDesigner rendering

Post by pritaeas »

I have the following Razor partial layout:

Code: Select all

@using Stimulsoft.Report.MvcMobile
@using StiMvcBaseHelper = Stimulsoft.Report.MvcMobile.StiMvcBaseHelper

@StiMvcBaseHelper.Stimulsoft(Html).RenderMvcMobileDesignerScripts()

<div class="row">
    @StiMvcBaseHelper.Stimulsoft(Html).StiMvcMobileDesigner("StiMvcMobileDesigner",
    new StiMvcMobileDesignerOptions
    {
        ActionGetReportTemplate = "GetReportTemplate",
        ActionGetReportSnapshot = "GetReportSnapshot",
        ActionSaveReportTemplate = "SaveReportTemplate",
        ActionDesignerEvent = "DesignerEvent"
    })
</div>
It renders the designer div with an inline style like this:

Code: Select all

<div id="StiMvcMobileDesigner" style="left: 0px; top: 0px; right: 0px; bottom: 0px; position: absolute;">
The absolute positioning breaks my layout. How can I disable/change this rendering?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcMobileDesigner rendering

Post by HighAley »

Hello.

Please, set Width and Height of the Designer.
You could set it to 100%.

Thank you.
pritaeas
Posts: 7
Joined: Mon Apr 07, 2014 7:33 am

Re: StiMvcMobileDesigner rendering

Post by pritaeas »

It renders differently, but please see the attached screenshot (IE11 but also in Opera32). The footer is now not at the bottom, and the designer page not visible at all.

Code: Select all

@StiMvcBaseHelper.Stimulsoft(Html).StiMvcMobileDesigner("StiMvcMobileDesigner",
    new StiMvcMobileDesignerOptions
    {
        ActionGetReportTemplate = "GetReportTemplate",
        ActionGetReportSnapshot = "GetReportSnapshot",
        ActionSaveReportTemplate = "SaveReportTemplate",
        ActionDesignerEvent = "DesignerEvent",
        Width = Unit.Percentage(100),
        Height = Unit.Percentage(100) // with and without this same problem
    })
screenshot
screenshot
stimvcmobiledesigner.jpg (138.1 KiB) Viewed 2254 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcMobileDesigner rendering

Post by HighAley »

Hello.

It hard to suggest any definitely solution having the srceen-shot and some parts of your code.
But we will try to guess. It seems that the Height of any parent element has not enough size.
Please, try to set the Height of all parent elements to 100% or set the fixed Height of the Designer.

Thank you.
pritaeas
Posts: 7
Joined: Mon Apr 07, 2014 7:33 am

Re: StiMvcMobileDesigner rendering

Post by pritaeas »

Thanks for the suggestion. I'll see what I can come up with.

Is there a way to pass HtmlAttributes to my Razor code above? The reason I have it the way it is displayed is because if I don't use the alias, I get ambiguous reference between StimulSoft.Report.Mvc.StiMvcBaseHelper and StimulSoft.Report.MvcMobile.StiMvcBaseHelper.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcMobileDesigner rendering

Post by HighAley »

Hello.
pritaeas wrote:Is there a way to pass HtmlAttributes to my Razor code above? The reason I have it the way it is displayed is because if I don't use the alias, I get ambiguous reference between StimulSoft.Report.Mvc.StiMvcBaseHelper and StimulSoft.Report.MvcMobile.StiMvcBaseHelper.
Could you describe this more detailed?
What attributes do you need to pass?
How id it connected with alias for StiMvcBaseHelper?

Thank you.
pritaeas
Posts: 7
Joined: Mon Apr 07, 2014 7:33 am

Re: StiMvcMobileDesigner rendering

Post by pritaeas »

Usually I'd write this instead:

Code: Select all

@Html.Stimulsoft().StiMvcMobileDesigner()
But if I do I get the ambiguous error stated above. I needed the alias to get it to work.

What I mean with the HtmlAttributes is that I can do this for example:

Code: Select all

@Html.TextBoxFor().HtmlAttributes(new { @class = "designer" })
But I cannot on the StimulSoft components.

B.t.w. I made another partial view with the @Html.Stimulsoft().StiMvcViewer and that one renders nicely within the same layout page, whereas the mobile designer does not.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcMobileDesigner rendering

Post by HighAley »

Hello.

Unfortunately, we have no solution for the conflict between StiMvcViewer and StiMvcMobileDesigner when it is used on one view.

Thank you.
pritaeas
Posts: 7
Joined: Mon Apr 07, 2014 7:33 am

Re: StiMvcMobileDesigner rendering

Post by pritaeas »

It's not a big issue, but they are in separate (partial) views: DesignReport vs ShowReport, they do share the layout page. I'll leave it for now. If I get the chance to separate this into a small project, I'll report back. Thanks anyway.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcMobileDesigner rendering

Post by HighAley »

Hello.

Please, let us know if you get any information about the issue.

Thank you.
Post Reply