DateTime Format Issue
Re: DateTime Format Issue
Worked like a charm, thank you very much.
If I wanted to specify a specific page (emulating the textbox with current page #), would be a long the same lines but with "GoToPage" or how would that look
If I wanted to specify a specific page (emulating the textbox with current page #), would be a long the same lines but with "GoToPage" or how would that look
Re: DateTime Format Issue
Hello.
It need more code to call the GoToPage.
We need some time to prepare a sample for you.
Thank you.
It need more code to call the GoToPage.
We need some time to prepare a sample for you.
Thank you.
Re: DateTime Format Issue
Sure thing, appreciate the help to my barrage of questions.
Your example will probably include this part but, I'm also trying to make a call to:
for the total page count but it always writes a zero, however in the console when logged it shows the correct value
I've also tried
as well as
Your example will probably include this part but, I'm also trying to make a call to:
Code: Select all
viewer.jsObject.reportParams.pageCount
I've also tried
Code: Select all
report.pages.count
Code: Select all
report.renderedPages.count
Re: DateTime Format Issue
Hello
Here is the code of the GoToPage action:
Thank you.
Here is the code of the GoToPage action:
Code: Select all
viewer.jsObject.reportParams.pageNumber = pageNumber; //first page number 0
viewer.jsObject.postAjax(
viewer.jsObject.options.requestUrl.replace("{action}", viewer.jsObject.options.actions.viewerEvent),
{ action: "GetPages" },
viewer.jsObject.showReportPage);
Re: DateTime Format Issue
This worked fine, thank you again, however making the call to
is always showing zero. If I console log that code and also log
you can see the correct number of pages for reportParams but not for pagesCount.
Code: Select all
viewer.jsObject.reportParams.pagesCount
Code: Select all
viewer.jsObject.reportParams
Code: Select all
console.log(viewer.jsObject.reportParams);
console.log("Page Count: " + viewer.jsObject.reportParams.pagesCount);
Re: DateTime Format Issue
Hello.
When do you check the pagesCount?
Maybe there is no information about the count of pages at this moment?
Thank you.
When do you check the pagesCount?
Maybe there is no information about the count of pages at this moment?
Thank you.
Re: DateTime Format Issue
Screenshot from previous post is where those console logs are
Code: Select all
$.ajax({
type: 'GET',
url: "url/to/data",
dataType: 'json',
contentType: 'application/json',
data:
{
'start' : moment(start).format('YYYY-MM-DD'),
'end' : moment(end).format('YYYY-MM-DD')
},
success: function(d) {
if(d.count != 0) {
var dataSet = new Stimulsoft.System.Data.DataSet("DataSet");
viewer = new Stimulsoft.Viewer.StiViewer(options, "viewerContent", false);
report.loadFile('Report.mrt'));
report.dictionary.databases.clear();
dataSet.readJson(d);
report.regData(dataSet.dataSetName, "", dataSet);
report.dictionary.synchronize();
viewer.report = report;
viewer.renderHtml("viewerContent");
}
else {
viewer = new Stimulsoft.Viewer.StiViewer(options, "viewerContent", false);
viewer.report = null;
viewer.renderHtml("viewerContent");
}
},
failure: function(errMsg) {
}
}).done(function(data) {
//page count would be called here
console.log(viewer.jsObject.reportParams);
console.log("Page Count: " + viewer.jsObject.reportParams.pagesCount);
});
Re: DateTime Format Issue
Hello.
Please, try to call the render() method.
Thank you.
Please, try to call the render() method.
Code: Select all
report.dictionary.synchronize();
report.render();
viewer.report = report;
Re: DateTime Format Issue
If I make those changes, nothing is render at all, I have a div where the report is to rendered.
Re: DateTime Format Issue
Hello.
Lets try again.
If you need to know the Number of Pages of the rendered report, you could render the report and get the number of rendered pages.
When you get it from the viewer.jsObject.reportParams.pagesCount, it seems that there is no such information yet.
Thank you.
Lets try again.
If you need to know the Number of Pages of the rendered report, you could render the report and get the number of rendered pages.
When you get it from the viewer.jsObject.reportParams.pagesCount, it seems that there is no such information yet.
Thank you.