on 03-13-2008 9:45 AM
Hello All,
Is it possible to take a print out from the Portal.
Let me be more clear about the case:
We have designed some charts (Time Scatter) in our WebDynpro projects and displayed it in the Portal. Now, the Team is enquiring if the Print out of the generated charts could be taken from the portal by providing a button. Or else they will have to save the chart as an image and take a print out.
Please let me know how can it be done if possible.
Points will be awarded.
Regards,
Poojith MV
Hi Poojith,
Try this work around.
Create a window ("PrintReport").
Create a view
Make this view as same as the view which is supposed to be taken printout
IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("PrintReport");
//create NonModel External Window
//exact API of this depends on your NWDS version
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(windowInfo);
//show/open the window
window.show();
In this window you can use default Print button of the browser
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
Thanks for the reply, but i have 3 Business Graphics UI element in my view and moreover i have 397 charts totall as a part of the project.
Should my printreport also contain 3 business graphics??? and after i create a new view and embed it inside a new window. Also since they are displayed in the view, when i print it through the browser, will it be printed properly???
Please let me know as to how to proceed with this.
Thanks and Regards,
Poojith M V
Hi Poojith,
Should my printreport also contain 3 business graphics?
Whatever you want to take print all should be placed in the external window's view.
If you want you can maintain in different views in the external window but for this you need to maintain extra navigation buttons.
will it be printed properly???
I am not sure about Business Graphics exactly but we are doing this for UI elements like tables. It should be printed properly
regards,
Siva
hi....
Follow the code given below !!
The print functionality can be included by writing a Separate PortalComponent and calling the component when the print button is clicked on any page.
In the JSP call the print cmponent By using
<%@ page import="com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService"%>
<%@ page import="com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator"%>
<%@ page import="com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator"%>
For instance :
Include code like this in all your jsps
<%
try {
IUrlGeneratorService urlGen =(IUrlGeneratorService) componentRequest.getService(IUrlGeneratorService.KEY);
// get Specialized Portal Url Generator
IPortalUrlGenerator portalGen = null;
ISpecializedUrlGenerator specUrlGen =urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
if (specUrlGen instanceof IPortalUrlGenerator)
{
portalGen = (IPortalUrlGenerator) specUrlGen;
printUrl =portalGen.generatePortalComponentUrl(
componentRequest,
"<ProjectName>.<PrintComponent>");// calling the Print Component
} catch (Exception e) {
response.write("EXception---"+e.getMessage());
}
%>
Hold the bean values in the HttpSession.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pinki,
Thanks for the reply. but i have some queries wrt. this solution.
1. How will i call the abstract portal component from my webdynpro code ie on action of a button.
2. if at all the jsp page is displayed, will the corresponding graphs also be displayed in the jsp page???
3. will the appearance of the charts in jsp differ from the way they are displayed on the portal.
Also, Please let me know if the graphs are generated automatically or should i create a separate graphs in the jsp also????
Regards,
Poojith M V
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.