jQuery image import to Crystal Report - html

I am trying to find a way how to import image from html to Crystal Reports. What I found is I need to set a code to download and save the image to a database and then add it to Crystal Report.
In other words, I need to find a way to add image dynamically to the Crystal Reports from HTML using id, rather than save it to a database.

Do you mean save the HTML page as an image and display the result in Crystal? There is a User Function Library (UFL) that provides that functionality. See list of UFLs here.
If you mean an image file referenced by an HTML page, then it's just a file (the fact that it is also used in an HTML page is irrelevant. You can simply use the path to that file.
Consider providing more details...

Related

How to build Angular HTML template on button click?

I'm trying to create an HTML template to export it as a PDF File, but I'm not sure on how to do this using Angular's engine;
What I need to do basically is to build this template when I click a "Download As PDF" button, and this should take all the information I have in one component and use to create an HTML document which will be exported, but not shown on the screen or anything like that.
Since my actual screen and the format I need to have on the PDF file I'm not able to just use the same component's HTML template, so I'm looking to build the template structure I need when I click on the button.
My current component uses mat-tabs to display information, but in the actual PDF I need each tab to be its own individual section in the page; so I would need to build this new HTML structure only when I want to generate the file
Any ideas how i could do something like this?
Based on your criteria this sounds like it needs to be a whole new component that is created specifically to the format needed for the PDF export. You'd add the correct headers such as content-disposition to have your PDF attachment.
Your next task is to determine how to get your data into that new component that is dedicated to PDF export. If you are already using a Redux/NGRX store in your app then that is probably easy enough to use.
A more common way to share data across components within the same module is to utilize an Angular service. This service is injected into both versions of the component and all important data is saved and retrieved from that service.

JasperReports - Embedding chart as SVG into HTML report

I'm using JasperReports integrated into Spring application (JasperReports 6.3.0, SpringBoot 1.4.1).
I have a report (created with Jaspersoft Studio 6.3.1) with a stacked bar chart within. It does print properly in pdf, xls. The problem is html format, which has the chart displayed as an empty box - when you look at the source code, the src attribute of img element is empty.
I've seen people advicing setting up some kind of Jasper-defined servlet to serve images as static files to html report, though this might be extra complicated with environment I'm working on.
The most convenient way I can think of is to insert the chart in svg format, so that it would be present inside the html content - this is my preferred solution to this.
The chart element (in report desing) actually has an option to be displayed as svg, though changing this doesn't seem to affect html output at all, just like Jasper would want to export the created svg to a file, and then include it as image anyways.
I've tried several config options, but I'm kind of stuck now, so my question is:
Do I need some extra environment setup, or some other fancy stuff, to reach my goal? Is what I ask for even possible with JasperReports?
Thanks in advance!
What you need is the following two properties in your jasperreports.properties (if you don't already have that file, create it and put it to a jar or folder that's on the application classpath):
net.sf.jasperreports.chart.render.type=svg
net.sf.jasperreports.export.html.embed.image=true

How to provide a document preview as a thumbnail independent of file type

In gmail when a file is sent as an attachment to an email, the recipient(s) can see a small portion of the contents of the file before even hovering over it. Now I'm very curius and in fact interested in implementing this in my own application. I've tried inspect element but couldn't quite get how they do this. Ok, with images I can somewhat understand how it's done. But how about pdf, word or excel document? Do they take a snapshot of some portion of the file and store it along with the attachment to later show it inside a container? Has anyone been able to do this? Is just html and css enough?
May be you have found a solution....
But am just updating an answer i just found
If you use Krajee Plugin then you can get that type of preview of the file. Its just not giving gmail like file preview but also giving other type plugin to upload and preview the images and files(almost every type). Giving below the links for your reference.
File Preview Demo
File Preview Icon Demo

Create a Sharepoint page from HTML file with images

I'm trying to create an editable page in Sharepoint. I already have the page in HTML (it's quite large) and it has many images in it. Previously I have just created a new page in sharepoint and pasted the HTML source in, the uploaded/inserted the images manually, one at a time.
Unfortunately, I am not able to do this in a reasonable amount of time since there are many images this HTML file is using.
So, I want an editable Sharepoint page that keeps the images intact from a directory that looks like this:
thepage.html
1.png
2.png
...
...
...
343.png
etc
Any ideas?
EDIT: For more clarity - this is a specifications document in HTML form, so it has a lot of text and header integrated with images. I'd like it to be converted to an actual Sharepoint Page that is editable from Sharepoint's interface.
Seems best here to use a low-tech solution, some HTML editing and use the best way for you to upload multiple files.
Assuming
C:\mypage
-> \page.html
-> \images\1.png
-> \images\2.png
...
-> \images\100.png
Via the UI
Go to a Document or Image library, and use the "Upload Multiple files/images" (this only appears on Internet Explorer)
Lets say you uploaded it to //sharepoint/myimages
Create a new content page (say an Article page, or WebPart Page with a Content Editor WebPart)
Lets say your page resides now at //sharepoint/pages/mypage.aspx
Change your html to point from <img src="images/1.png" /> to <img src="../myimages/1.png" />
Edit the HTML for your newly created page (Ribbon > Edit HTML Source), paste your HTML code
Via SharePoint Designer
Drag and Drop all the images in your desired location
repeat the HTML steps above
To replace text in bulk, SharePoint Designer, your favorite HTML editor or event Notepad can do that well using the CTRL+H menu / Edit > Find & Replace options.
NOTE: the //sharepoint address up there is the http url for your site, SO won't let me use a full fake address as a sample.
From IE or from Word, save the page as a complete webpage so it creates an HTML file plus a folder with the images.
In network places, create web folder (WebDAV) pointing to Sharepoint. This way, you can access it from the file system in Explorer.
Open your new network place, navigate to the library where you want your HTML file to be, and drag-n-drop the file and folder into there.
The file then will be visible in browser, with the pictures, but the folder will be hidden.
If I have understood correctly your question. You can use this post answer to load list of images by javascript and php ->
Load list of image from folder.
Upload files to Share Point server and use that folder.
Or you can dynamically write c# code to read Share Point folder and display images.

Problems in generating HTML with JasperReports

I am using jasper report with my application and generating the reports in pdf formats, which are coming up fine. We want the user to be able to view those reports in html also with in the application, but generating HTML from jasper contains inline CSS for its individual element which we do not want. (We want to apply our own CSS so that look and feel of application remains same.). If any body has any ideas how it can be done, please help.
Also we do not want large number of records in a single page in html, so any ideas on how we can implement pagination in such a scenario.
I don't think so you can separate the CSSs from the HTML which is generated by the iReport.
To check for some more options please open the export options which are under
Tools->> Options ->> Export Options.