Hello,
so considering that you are currently billing me the monthly fee at 8 each month, if I will upgrade to Bronze on 14/11, will I have 10000 credits to be consumed by 14/12?
Is it correct or not?
Posts made by Matteo Agostoni
-
RE: Jsreport online - exceeding credits level
-
Jsreport online - exceeding credits level
Hello,
I have this kind of issue:normally with my account I stay under the 200 credits, so I can use the free version of the ON-LINE (cloud) license.
Last month I received this alert "The monthly prepaid credits in your account has been exceeded. Please upgrade your jsreportonline plan to avoid service interruption".Now my question is:
- Do I have for example to subscribe for "Bronze" plan?
- How long is the subscription duration?
- As it is probably a "non standard behavioure and use" the reason why we exceeded this month, will be possible to downgrade next month to free plan? Is there any limitation to downgrade policy?
Kind regards,
Matteo -
RE: handlebars helpers... how to define
Solved it.
It was due to one error in html template when I copied my working code
{{#each items}} {{#everyOther 2 2}} <tr class="striped"> {{else}} <tr> {{/everyOther}} <tr> <td width="15%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.codiceE}}</td>
the right code is the following one:
{{/everyOther}} <td width="15%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.codiceE}}</td>
-
RE: handlebars helpers... how to define
Hello,
one strange thing..... I have two different "free" accounts. One works the other nottis is my code
{{#each items}} {{#everyOther 3 2}} <tr class="striped"> {{else}} <tr> {{/everyOther}} <tr> <td width="15%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.codiceE}}</td> <td width="20%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.descE}}<br /><br /></td> <td width="5%" style="text-align: right; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.lE}}</td> <td width="5%" style="text-align: right; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.pE}}</td> <td width="5%" style="text-align: right; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.hE}}</td> <td width="13%" style="text-align: center; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.codfinE}}</td> <td width="12%" style="text-align: center; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.desccolore}}</td> <td width="5%" style="text-align: center; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.qE_in_offerta}}</td> <td width="5%" style="text-align: center; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.qE_scorporati}}</td> <td width="5%" style="text-align: center; border-bottom:solid 1px #444; border-right:solid 1px #444;">{{this.qE_da_produrre}}</td> <td width="5%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;"> </td> <td width="5%" style="border-bottom:solid 1px #444;"> </td> </tr> {{/each}}
this is the function definition, inserted below like you suggested
function everyOther (index, amount, scope) { // rest of code here... if ( ++index % amount) return scope.inverse(this); else return scope.fn(this); }
this is the line inside the css:
.striped {
background-color: #CCC;
}I don't understand why in this second account it does not works
-
handlebars helpers... how to define
Hello,
I'm using js report online.Actually I need to define one handlebar helper in my template.
I'm inside jsreport studio but it is not clear where to define my helper.// Our Helper Handlebars.registerHelper("everyOther", function (index, amount, scope) { if ( ++index % amount) return scope.inverse(this); else return scope.fn(this); });
Please clarify
-
RE: renderAsync does not show nothing
Hello,
checking better the console messages I found this error
"Not allowed to navigate top frame to data URL: data:application/pdf;base64"
due to last Chrome updateso I was able to fix it with this updates
var url = res.toDataURI(); var url_with_name = url.replace("data:application/pdf;", "data:application/pdf;name=myname.pdf;") var html = '<html>' + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style>' + '<body>' + '<p>new viewer</p>' + '<iframe type="application/pdf" src="' + url_with_name + '"></iframe>' + '</body></html>'; var a = window.open("about:blank", "Zupfnoter"); a.document.write(html); a.document.close();
-
renderAsync does not show nothing
Hello,
I built a template in jsreportOnline and it works if I run it from jsReport Studio.Then I incapsulated it in my web application so that I can run it from my javascript application.
here my code that till some days ago worked, but now it does not show nothing in the browser page:
//return false; jsreport.serverUrl = 'https://nimacad.jsreportonline.net/'; jsreport.headers['Authorization'] = "Basic " + btoa("xxxxxx:yyyyyyyy") var request = { template: { shortid: 'S16Ay4UzW', recipe: 'phantom-pdf' }, data: reportData }; //display report in the new tab jsreport.renderAsync(request).then(function(res) { console.log(res); //open in new window window.open(res.toDataURI()) });
it runs, it opens a new browser tab with url like data:application/pdf;base64, JVBERi0xLjQKMSAwIG9iago8P........ but the page is blank, it doesn't show the report. Instead if I take the same reportData and put it in the STUDIO online, when I run the report it shows correctly
-
Different header on first page
Hello,
I need to hide header on first page and then show header on all other pages.I'm using handlebars, and my idea was using #pageNum in header, but I was not able to have it working.
I tried this way:
{{#if pageNum == 1 }}
<table width="100%" border="0" cellspacing="0" cellpadding="5" style="font-size: 12px;">
<tr>
<td width="6%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;"><strong>Offerta n:</strong></td>
<td width="26%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;">{{offerta.codice}}</td>
<td width="4%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;"><strong>Data</strong></td>
<td width="27%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;">{{offerta.data}}</td>
<td width="7%" style="border-bottom:solid 1px #444; border-right:solid 1px #444;"><strong>Cliente</strong></td>
<td width="30%" style="border-bottom:solid 1px #444;">{{cliente.societa}}</td>
</tr>
</table>
{{/if}} -
RE: Handlebar #if construct issue
Hi, checking on stackoverflow I got it
as my <div class="col-xs-1 text-right" style="width: 12%">{{#if settings.condettaglioprezzi }}€ {{offerta.codice}} {{/if}}</div> was inside a {{#each}} I had to use {{#if @root.settings.condettaglioprezzi }}
thanks
-
Handlebar #if construct issue
I'm using handlebar engine and I need to conditionally hide or show a part of the report based on a data value;
this is a piece of my JSON data
{
"settings": {
"condettaglioprezzi": "true"
},
"offerta": {
"codice": "2017-00007",
"data": "",
"oggetto": ""
},..........then in my report template I inserted
<div class="col-xs-1 text-right" style="width: 12%">{{#if settings.condettaglioprezzi }}€ {{offerta.codice}} {{/if}}</div>
but it does not show the € {{offerta.codice}}
Please help me.
-
Error 500 posting http request from javascript
Hello,
I'm new to jsreport;I created a simple report in JSreport online, then from an html / javascript page I want to call the reporting engine.
This is my actual javascript code for the request
$.ajax({ type: "POST", url: 'https://xxxxxx.jsreportonline.net/api/report', contentType: 'application/json', dataType: 'json', data: { "template": { "shortid" : "HJI-R8mz-" }, "options": { timeout: 60000 } }, beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", "Basic " + btoa('viewer:12345678')); }, success: function( data ) { console.log( data ); } });
To simplify the process for the moment I decided to avoid passing data to the report.
Anyway I'm always getting error 500 from the browser and exactly this message in chrome consoleXMLHttpRequest cannot load https://xxxxxx.jsreportonline.net/api/report. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://sample.local:8090' is therefore not allowed access. The response had HTTP status code 500.
For your information sample.local:8090 is the url of the web application running locally on my pc in a xampp environment.
Please help me understand where I'm going wrong!!