How to show QR code using Google Charts in Crystal reports? - crystal-reports

Currently I managed to show inside Crystal report QR code using Google Charts and dynamically change path of picture but the generated QR code is wrong. I need to show URL with GET methode (3 params) and link is showing only 1st param.
test URL which needs to be opened via QR code (formula "link")
"http://test.com/getData?param1=aaa&param2=bbb"
formula for QR code and dynamically changing picture (it's http because Crystal Reports doesn't support https)
"http://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=" + {#link}
Those two combined form a string
http://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=http://test.com/getData?param1=aaa&param2=bbb
QR code - wrong one (missing param 2)
If I change my link to (url encoding & into %26)
http://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=http://test.com/getData?param1=aaa%26param2=bbb
then I get with browser good QR code but in Crystal reports still wrong one (missing param 2)
QR code - good in browser but not showing the same in Crystal
I suspect that something is wrong with URL encoding in Crystal or different than browser encoding. Any suggestions how to solve this?

If this is due to http limitation, you can generate the QR barcode image locally using a Crystal Reports UFL. You can create your own or at least one of the 3rd-party UFLs listed here provides such a function.

After lots of hours trying encoding/decoding data I accidently figure out that it wasn't problem in data or URL. Only thing I had to do is check "use original URL" in picture properties. After that generated QR code was good and problem solved. Hope it helps someone and saves lots of hours.

Related

Crystal Reports issue with Dynamic images from a web service

I have a report with two dynamic images defined by database fields.
One is a location on our intranet :
ex: \<folder>\image.JPG
the second is being pulled from a web service :
https:////TraverseImage.ashx?parcel=312531800000010860&card=1
I followed this excellent walkthrough :
http://www.cogniza.com/wordpress/2010/03/15/crystal-reports-dynamic-images/
which suggests "set the formula’s text to the name of the formula or parameter field that will contain the image’s URL"
during design time both images display perfectly. When running the report or when changing parameters, the first one from the hard drive works perfectly, but the second one from the web service does not update. The only way to update it is to delete the image, and start over. I have put a hyperlink on the one from the webservice, and it correctly links to the image I want to display.
I am needing this to stay as a native .rpt and not embedded with VS.
I appreciate any suggestions, or comments.
Mark
Crystal dynamic image paths don't support https. Don't blame me; I'm just the messenger.
But you can solve this by using one of the 3rd-party UFLs listed here.
One of these UFLs allows you to use the graphic location expression for the image in Crystal to on-the-fly download an image from a given url, save it to a local file, and return the path to that file.
As added advantage, it can also resize the image to avoid a known memory consumption issue when Crystal is forced to resize images.
Is the path http or https?
If https you can use a UFL to solve this.

Generate multiple sheets in one pdf file

I am trying to generate a pdf from a Tableau workbook which has two sheets using the url method:
E.g: https://TableauServer/views/workbook/sheet1?:format=pdf&parameter=value
I am doing this in a program which will issue the url request to the url. The url works fine for one sheet. But the problem is how to generate one pdf file with both sheets in it?
If you first put your two sheets into a single dashboard and then use the URL for the published dashboard (still using the format=pdf parameter), this should work just fine.
We know it's possible because within the Tableau pages itself if you download a PDF it gives you several formatting options, including the option to put all the worksheets in a workbook into a single PDF.
I couldn't find any documentation on it though. What I ended up doing was looking at the network console in the browser (usually F12) when I downloaded the PDF from the browser by clicking the Download button. That showed me the URL end point and the JSON body the server expected in the request payload.
The endpoint URL wasn't too cryptic and ended with "commands/tabsrv/pdf-export-server". The challenge was to take the JSON in the request payload and find the right settings to get it into a single PDF.
This method is a more technical approach and requires very little coding skills; any language that has functions for http calls will work (I use python for it).
If you don't mind doing it outside a browser, tabcmd has lots of functionality to control PDF generation at the command line.

Embedding QR Code in a stand alone Crystal Report

I would like to embed a QR Code on a stand-alone Crystal Report.
I'm planning to embed information from the report (like Name or Address) that will be stored in the QR that will be generated in the Crystal report.
Can anyone point me in the right direction or link to any resources explaining how to do this?
It's easiest to use an on-line service.
Insert a picture
Edit the conditional formula associated with the picture's Graphic Location property
Provide a link that will generate the QR code. For example: "http://www.esponce.com/api/v3/generate?content=" + {table.field} + "&format=png"

Just displaying the SSRS report image

I have an ssrs report server that I can display reports. When I view the page i get the familiar control to set properties etc. That generates an image with a url that hits this page: "Reserved.ReportViewerWebControl.axd" - with some scary looking ids and stuff.
Is there a way to get this image with all the controls around it? My goal is to embed this image in an email and on a webpage.
Thanks!
PS: I'm a complete SSRS newbie so sorry if this is totally obvious...

Problem including dynamic image in Eclipse BIRT 2.5.0 report on Windows

I have a BIRT 2.5.0 report design with a dynamic image (URL is specified through report parameter, image formats tried - .png, .bmp). When running the report from our application on Ubuntu, everything renders OK. When doing exactly the same thing on Windows, there's following message instead of the actual image:
Current report item is not supported in this report format.
Same problem occurs when including image with a fixed URL - even though the image is displayed and loaded in the Report Designer, it's not rendered in report generated from our application. Again, this happens only on Windows.
The only way I managed to get the image into a rendered report was through embedding it into the report design file, which is not suitable as the image has to be dynamic.
We ended up using a workaround. We put an embedded image with empty data property into the report design file and then supplied the image data as ilustrated in the following snippet:
ReportDesignHandle reportDesign = ...
byte[] imageData = ...
EmbeddedImage embeddedImage = reportDesign.findImage("embeddedImageName.png");
embeddedImage.setData(imageData);
I had a similar error and didn't quite know how to do the above. But in my case it was a different problem. I found that this error:
Current report item is not supported in this report format.
also shows on a PDF when it can't find the image file. I had a relational path rather than the full path e.g.
"/images/picture.jpg" (didn't work, got error)
rather than
"http://server/images/picture.jpg". (worked, showed my image)
The full path worked and I saw my image. The relational path gave me the error.
I spent hours just to find that out. Hope this helps somebody.