ServerCacheMode and Parameters

Stimulsoft Reports.WEB discussion
Post Reply
Werlang
Posts: 26
Joined: Wed Feb 20, 2013 1:50 pm

ServerCacheMode and Parameters

Post by Werlang »

Hello

I've just found that ShowButtonParameters and ServerCacheMode.None are incompatible.
I'd like to set both options.
ShowButtonParameters = to allow end-user parameters
ServerCacheMode.None = this was the only way I've found to allow simultaneous users open the same report without interfere with each other. ServerCacheMode.Page didn't work, and ServerCacheMode.Session can't be used (sessionless webapp).

If I comment out ServerCacheMode, then it works. But I wish both to work together.

Most relevant code below:

Code: Select all

@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
{
    Controller = "StiReports",

    ServerCacheMode = StiCacheMode.None,
    ServerTimeout = TimeSpan.FromMinutes(30),

    MenuViewMode = StiWebViewMode.OnePage,
    ShowButtonDesign = false,

    ShowButtonParameters = true
})
What's wrong here?

Thanks
Werlang
Posts: 26
Joined: Wed Feb 20, 2013 1:50 pm

Re: ServerCacheMode and Parameters

Post by Werlang »

Not sure, but would this work? What's the side effects of doing this:

ActionResult GetReportSnapshotViewer():

report.ReportGuid = Guid.NewGuid().ToString();
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: ServerCacheMode and Parameters

Post by Vladimir »

Hello,

If you are using the ServerCacheMode.None option, you must also load the report in the ViewerInteraction action. This action is used to obtain the parameters for the variables panel.
Not sure, but would this work? What's the side effects of doing this:
ActionResult GetReportSnapshotViewer():
report.ReportGuid = Guid.NewGuid().ToString();
Unfortunately, this will not work, because after the report is saved in the cache, it is always taken from there.
We will make revision. If the report parameters are present, separate copies of the report will be saved in cache.

Thank you.
Werlang
Posts: 26
Joined: Wed Feb 20, 2013 1:50 pm

Re: ServerCacheMode and Parameters

Post by Werlang »

Hello Vladimir

I'm not sure about ViewerInteraction you refer?
I've found Interaction and ViewerEvent, can you show me some code of how to properly use? Below is our code.

Code: Select all

        public ActionResult Interaction()
        {
            return StiMvcViewer.InteractionResult(this.HttpContext);
        }

        public ActionResult ViewerEvent()
        {
            return StiMvcViewer.ViewerEventResult(this.HttpContext);
        }
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: ServerCacheMode and Parameters

Post by HighAley »

Hello.

Sorry, we need a little more time to prepare an answer for you.

Thank you.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: ServerCacheMode and Parameters

Post by Vladimir »

Hello,

We had in mind this action:

Code: Select all

public ActionResult Interaction()
        {
            StiReport report = new StiReport();
            report.Load(...);

            return StiMvcViewer.InteractionResult(this.HttpContext, report);
        }
Alternatively, you can upgrade to the latest prerelease build, in which a problem with the cache should be solved.

Thank you.
User avatar
allo_man
Posts: 17
Joined: Sun Jun 10, 2012 6:56 am
Location: Canada

Re: ServerCacheMode and Parameters

Post by allo_man »

In your last post, you said the bug with the cache *should* be fixed in the prerelease of june.
Alternatively, you can upgrade to the latest prerelease build, in which a problem with the cache should be solved.
Is it fixed now?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: ServerCacheMode and Parameters

Post by Vladimir »

Hello,

Yes, this error is fixed.

Thank you.
Post Reply