Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

PDF report generation, requested by Java

Greetings,

I'm currently working at a web project, using Java the main technology. All the reports of this application are currently generated in PDF by some Java logic. To release some application server resources I'd like to use the QlikView Server that we already have to generate these reports.

I have some questions abou it: how can I request a report processing on QlikView and get the result as PDF ? It is possible using QlikView PDF Generator and PDF Distribution ? Can I do it using Java, or should I develop this logic in .NET ?

Thanks in advance,

Daniel Cheida

1 Solution

Accepted Solutions
disqr_rm
Partner - Specialist III
Partner - Specialist III

First of all, you need to have Publisher and PDF Distributor license applied on top of QVS. Then you can define a report in you QlikView app which you would like to get converted to PDF after all the magic. Once this is done, you can define a job to distribute that report as PDF in a folder, don't set any trigger. Then finally, using Java or any technology trigger that job you defined using EDX (http://community.qlik.com/docs/DOC-2650). Once job is triggered and successfully finished, PDF will be distributed to the folder you setup in the job definition. You can grab that PDF and do whatever you like with it.


If you are sending this PDF as an e-mail, you could just setup distribution job to distribute PDF to e-mail addresses, rather than storing in the folder. Then by just triggering the job from Java, using EDX, it will send the PDF as an attachment to all.

The link http://community.qlik.com/docs/DOC-2650 provides details on QVS APIs and has a .NET sample code, but those APIs are just few webservices, you can consume any any technology including Java.

Hope this helps.

View solution in original post

2 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

First of all, you need to have Publisher and PDF Distributor license applied on top of QVS. Then you can define a report in you QlikView app which you would like to get converted to PDF after all the magic. Once this is done, you can define a job to distribute that report as PDF in a folder, don't set any trigger. Then finally, using Java or any technology trigger that job you defined using EDX (http://community.qlik.com/docs/DOC-2650). Once job is triggered and successfully finished, PDF will be distributed to the folder you setup in the job definition. You can grab that PDF and do whatever you like with it.


If you are sending this PDF as an e-mail, you could just setup distribution job to distribute PDF to e-mail addresses, rather than storing in the folder. Then by just triggering the job from Java, using EDX, it will send the PDF as an attachment to all.

The link http://community.qlik.com/docs/DOC-2650 provides details on QVS APIs and has a .NET sample code, but those APIs are just few webservices, you can consume any any technology including Java.

Hope this helps.

Not applicable
Author

Hi Rakesh,

You said that QMS API v11 service can be consumed in Java. I tried to consume the webservice but i'm getting a 401 error.

Exception in thread "main" AxisFault

faultCode: {http://xml.apache.org/axis/}HTTP

faultSubcode:

faultString: (401)Unauthorized

faultActor:

faultNode:

faultDetail:

    {}:return code:  401

    {http://xml.apache.org/axis/}HttpErrorCode:401

(401)Unauthorized

    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

    at org.apache.axis.client.Call.invoke(Call.java:2767)

    at org.apache.axis.client.Call.invoke(Call.java:2443)

    at org.apache.axis.client.Call.invoke(Call.java:2366)

    at org.apache.axis.client.Call.invoke(Call.java:1812)

    at org.tempuri.BasicHttpBinding_IQMSStub.getTimeLimitedServiceKey(BasicHttpBinding_IQMSStub.java:7533)

    at javaapplication5.JavaApplication5.main(JavaApplication5.java:52)

CODE:

public static void main(String[] args) throws Exception {

BasicHttpBinding_IQMSStub service = (BasicHttpBinding_IQMSStub) new QMSBackendServiceLocator().getBasicHttpBinding_IQMS(new URL("http://192.168.235.128:4799/QMS/Service"));

System.out.println(service.getTimeLimitedServiceKey());

}

Kindly help provide a sample codes how to consume the web service using Java.

Thanks,

Arnold