My template has a center image holder. Is there a way to have the image keep its aspect ratio and be contained within (in the center of) the image shape boundry? I tried usePlaceholderSize= true but then the image is stretched. Itried using just the height, but then if the image is bigger than the page, it falls off the page (even height-wise) no matter what the height value is. Or if the image is smaller than the container , it get's aligned in the upper left corner of the container instead of in the center...
Posts made by lukuser
-
pptx image aspect ratio
-
paginating multi-level data in pptx helper
Hello, I'm trying to paginate an inner data object represented by the suites table on the playground example. The max lines on that table can be max of 3. Is there a way to repeat a building record with remaining suites if there are more than 3 suites associated to a give building (as in building 432)? The overall max number of suites in a building can be upwards of 20 in production.
https://playground.jsreport.net/w/lukuser/mvDlWC1t.
I have seen a previous post discussing pagination here: https://forum.jsreport.net/post/12353, but I can't seem to be able to port this into a multilevel object structure like in the example.
-
RE: error when using pptxSlides helper with only one array element
Hello @bjrmatos, this is still not working. Was the fix released yet?
-
RE: error when using pptxSlides helper with only one array element
Thank you. @bjrmatos. I'll keep track of the releases to catch that one. Hopefully It'll be soon as our application relying on jsreports was in production when this happened. We'd have to write off a significant dev-time investment if we had to move on to another reporting solution now. For now we ask our users to select an extra record and the page is then discarded when the pptx is printed out...
-
error when using pptxSlides helper with only one array element
Hello,
pptx helper seems to fail when using pptxSlides helper with only one array element:
https://playground.jsreport.net/w/lukuser/UsE_lRgu
This used to work, but my templates started to fail since approx. last week..
This happened before too:
https://forum.jsreport.net/topic/3035/can-t-render-pptx-report-with-pptxslides-with-only-one-slide -
RE: error in all pptx templates in jsreport studio
Hi @admin, it works now. Thanks for the help.
-
RE: error in all pptx templates in jsreport studio
Hi @admin, no, I'm not behind a proxy. Your sample pptx previews fine, but none of my pptx files work.
jsreportonline version: 3.13.2
jsreport version: 3.13.0I tried another machine, another location (home vs work), same effect. I tried reuploading, but no change. Like I said, templates that used to work in preview/run now don't without changes. They all still work when rendered using API though.
-
error in all pptx templates in jsreport studio
Hello,
This morning all our templates pptx report an error when pressing "preview" in jsreport studio in the browser. These templates were previously working correctly and no changes were made. The "run" in the studio also doesn't work. What's interesting is that those templates render just fine when using API. Also in the studio, I have other templates using docx helper and those preview and run correctly. The error reported in the preview pane is :
Cannot read properties of undefined (reading 'error').
It is display using dark grey on black so it's barely visible:
but I can read it when I highlight it:
-
browser_client disconnecting in appsmith
Hello I use the the browser client in appsmith to render some pptx and docx report. appsmith lets me connect an external library, so I use this link to connect : https://cdn.jsdelivr.net/npm/@jsreport/browser-client@3.1.1/+esm
The browser_client works for awhile, but eventually it disconnects and I get "browser_client is not defined" and I have to remove and re-add the library. Any idea why this happens? Other libraries in use in the application work fine.
-
are nested pptx tables possible?
Hello @admin,
I'm trying to implement this sort of pptx slide:
I have two levels of data: submarkets and offices. Doesn't look like I can do any nested pptx tables though, I tried one table surrounded by {{#each}} handle based on the docx CV example:
but I got an error. Is this sort of report even doable using the pptx helper?
-
Can't render pptx report with pptxSlides with only one slide.
Hello,
There seems to be an issue with the pptxSlides helper. When the array for the slides contains 2 elements, it works fine, but if I remove one, the report fails to render. The issue is demonstrated in this playground report. Inside I have one template but 2 sample data assets. The data2 is the same as data, but with the second "buildings" array element removed. Selecting the tamplate with data works but with data2 fails:
-
error when using pptxSlides
Hello, when trying to use a pptxSlides directive, I run into an error:
Report "test_report" render failed.
Error while executing pptx recipe
(because) error when evaluating engine handlebars for template anonymous
(because) parse error on line 39:
...ersion></Properties>
-----------------------^
Expecting 'OPEN_INVERSE_CHAIN', 'INVERSE', 'OPEN_ENDBLOCK', got 'EOF'(sandbox.js line 13:18)
Here's my playground report: https://playground.jsreport.net/w/anon/nZs5Y1aD. Is there something wrong with my data or the template?
-
Can a pptxImage work inside a pptxTable?
Hello, I'm trying to figure out a way to have two levels of pptx table with images embedded in the parent table, but there's something not working. I get an error :
"pptxImage" helper call failed (because) pptxImage helper requires src parameter to be set
Could someone take a look at this playground report, please?
-
RE: using browser-client library with appsmith
Hello @admin, Thank you for the suggestion. I tried your playground download example in both chrome and firefox. Both spin for a minute before stopping without downloading anything. In the end I used your suggestion and implemented my own download, by getting the report from blob to a File object. From there I uploaded to supabase storage.:
let blob = await report.toBlob(); let reportfile = await new File([blob], reportname + '.docx'); let reportURL = await FileManager.uploadFile(reportfile,"reports",reportname + '.docx');
Thanks again for all your help.
-
RE: using browser-client library with appsmith
Thanks @admin, YES! this works. it was the case on serverURL that did me in. I guess I'm an n00b :)
That being said, I now have a problem with the download. I have this error when executing:Uncaught TypeError: t.initMouseEvent is not a function.
Here's my code:
browser_client.serverUrl = 'https://myservergoeshere.jsreportonline.net'; browser_client.headers['Authorization'] = "Basic " + btoa("myusernamegoeshere:mypasswordgoeshere") const report = await browser_client.render({ template: { name: "/Vancouver Data Project/PRD/Office_FloorPlan" }, data: { "rows":[ { "sfloorplan" : "https://house-renderings.com/images/examples/floor-plan-2-1-min.jpg", "bbuildingname" : "666 West Broadway" } ] } }) // this works! When pasted into browsers address, It downloads a docx file. The file is rendered properly report.toObjectURL().then((value) => console.log(value)); //error: Uncaught TypeError: t.initMouseEvent is not a function. report.download('test.docx');
-
RE: using browser-client library with appsmith
Hi @admin, thanks for sticking with it. I did try to set the serverURL anyway, but I just get an error: "The script was not linked from jsreport. You need to fill jsreport.serverUrl property with valid url to jsreport server." I'm not an expert in javascript, but I'm a programmer, and looking at the jsreport.js that you linked above, it doesn't seem like there's an entrypoint or a declaration for serverURL in that file. All references to serverURL in that module only seem to try to read it...
:
-
RE: using browser-client library with appsmith
when I try to use the link (https://www.npmjs.com/package/@jsreport/browser-client )you send I get "Library is unsupported", but I use the one from jsdelivr (https://cdn.jsdelivr.net/npm/@jsreport/browser-client@3.1.1/+esm) and that one is accepted. Hereare the functions I see available when I use the library:
-
RE: using browser-client library with appsmith
right, that's the one that seems to be missing the serverURL property...
-
using browser-client library with appsmith
Hello,
I'm trying to use jsreport with appsmith application. Appsmith allows for external libraries, so I'm trying to use the browser-client library. There seem to be 2 clients that appsmith recognizes: https://www.npmjs.com/package/@jsreport/browser-client v3.1.1 and https://www.npmjs.com/package/@jsreport/jsreport-browser-client v4.0.0. The first one seems to be missing the property serverURL that I'd need to set before using it, and the second one has ony 4 properties exposed: serverURL, call, bind, and apply. Is there another one that is a combination of the two or am I missing something?