Page 2 of 3
Re: Problems with Designer (the installed executable)
Posted: Thu Nov 21, 2013 7:10 am
by HighAley
Hello.
kgb2013 wrote:As far as I see, the preview on the Designer.exe is correct, but in my site it's not correct.
Did you try it with the MVC viewer on a simple web site?
(I have re-checked this in one of your demo projects)
Could you describe this issue more detailed with samples?
kgb2013 wrote:I also attach a video for you.
Sorry but we couldn't reproduce this issue.
How do you run Designer.exe?
Could you send us your report template?
Does
Save as... command work?
Thank you.
Re: Problems with Designer (the installed executable)
Posted: Thu Nov 21, 2013 8:18 am
by kgb2013
I attach a test file (Test.mrt).
It has a German Culture set to it and a {Time} field displayed.
I load this with this code:
Code: Select all
@section JS{
@Html.Stimulsoft().RenderMvcViewerScripts()
}
@Html.Stimulsoft().StiMvcViewer(
"Reports",
new StiMvcViewerOptions()
{
Controller = "List",
ActionGetReportSnapshot = "GetReportSnapshot?r=" + r,
ActionViewerEvent = "ViewerEvent?r=" + r,
ActionExportReport = "ExportReport?r=" + r,
ActionPrintReport = "PrintReport?r=" + r,
//ServerCacheMode = StiCacheMode.Page,
Width = Unit.Percentage(100),
Height = Unit.Pixel(1300),
ClientRequestTimeout = 900000,
Theme = StiTheme.Office2007Silver,
ScrollbarsMode = true,
//CountColumnsParameters = 4,
ShowButtonParameters = true,
BackColor = Color.DarkGray,
MenuShowMode = StiShowMenuMode.Click,
MenuViewMode = StiWebViewMode.OnePage,
MenuAnimation = false,
ShowButtonBookmarks = false,
//ActionDesignReport = "",
//ShowButtonDesign = true,
}
)
public ActionResult GetReportSnapshot(ListModel model)
{
using(var report = GetReport(model))
{
return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);
}
}
public ActionResult ViewerEvent(ListModel model)
{
using (var report = GetReport(model))
{
return StiMvcViewer.ViewerEventResult(HttpContext, report);
}
}
private StiReport GetReport(ListModel model)
{
var r = HttpContext.Request.QueryString["r"];
if (string.IsNullOrWhiteSpace(r))
{
var docs = model.GetDocsStimulSoft();
var newDocs = docs.Select(x => new
{
// Fill in the properties...
});
var report = new StiReport();
report.Load(MrtFilePath);
report.RegBusinessObject("Document", "Document", newDocs.ToList());
return report;
}
else
{
string mrtFile = HttpUtility.UrlDecode(r, Encoding.UTF8);
mrtFile = Path.Combine(ReportsDir, mrtFile + ".mrt");
var report = new StiReport();
report.Load(mrtFile);
SetReportParameters(report);
return report;
}
}
void SetReportParameters(StiReport report)
{
ChangeConenctionString(report);
report.RequestParameters = true;
var vars = report.Dictionary.Variables;
var ident = IoC.GetInstance<IIdentityContext>();
report["usrID"] = ident.UserId;
report["grpID"] = ident.CurrentGroupId;
report["FromDate"] = DateTime.Now.AddYears(-1);
report["ToDate"] = DateTime.Now;
}
void ChangeConenctionString(StiReport report)
{
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase("Connection", "Connection", "connection string", false));
}
My Windows is in English but the default thread culture is Greek (I guess this is due to "Region and Language" settings).
When I view the report with the code presented above, I see the {Time} field in Greek (21/11/2013 10:10:12 πμ).
-------------------------------
Nope. "Save As" doesn't help either.
I attach my MRT file (SOS_Report 4.mrt).
Re: Problems with Designer (the installed executable)
Posted: Mon Nov 25, 2013 10:43 am
by HighAley
Hello.
The culture of the thread overrides the Culture property of the report.
So there is always Greek culture in your report.
Thank you.
Re: Problems with Designer (the installed executable)
Posted: Mon Nov 25, 2013 11:20 am
by kgb2013
Hello.
But then what's the point in having a Culture in the MRT?
The current thread always has a culture.
Re: Problems with Designer (the installed executable)
Posted: Mon Nov 25, 2013 1:24 pm
by HighAley
Hello.
Please, send us a sample working project which reproduces this issue for analysis.
Thank you.
Re: Problems with Designer (the installed executable)
Posted: Wed Nov 27, 2013 10:57 am
by kgb2013
I have made a demo project, but I have no such problem in there.

I can't understand what is the difference in my real project yet.

Re: Problems with Designer (the installed executable)
Posted: Wed Nov 27, 2013 1:28 pm
by Alex K.
Hello,
It is difficult to say something without the sample which reproduce the issue.
Thank you.
Re: Problems with Designer (the installed executable)
Posted: Thu Dec 12, 2013 10:02 am
by kgb2013
Concerning the font size problem that I described previously, it seems that only happens for some MRT.
I attach one that has the problem.
Try to change the font size of the green area (ReportTitleBand), save the report and then reload it with the Designer.exe.
When I reload it, the font size is restored to the old one.
Also, saving the borders for the same ReportTiltleBand has the same problem.
I hope this helps you locate the problem.

Re: Problems with Designer (the installed executable)
Posted: Fri Dec 13, 2013 12:25 pm
by Alex K.
Hello,
Please try to check the ComponentStyle property for this component.
Thank you.
Re: Problems with Designer (the installed executable)
Posted: Fri Dec 13, 2013 12:36 pm
by kgb2013
Aha!
Setting ComponentStyle to None solves it.
Great!
Thanks.
