|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.crystaldecisions.report.web.ServerControl
This is an abstract class. Use the derived classes
such as CrystalReportViewer and
ReportServerControl.
| Constructor Summary | |
ServerControl()
|
|
| Method Summary | |
static java.lang.Object |
deserializeBase64ToObject(java.lang.String base64)
For internal use only. |
int |
getHeight()
Returns the viewer height. |
java.lang.String |
getHtmlContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context)
This method handles the user's request to generate the HTML for the report and returns the HTML as a String. |
int |
getLeft()
Returns the value for the position of the left side of the viewer. |
java.lang.String |
getName()
Returns the name of the viewer control. |
int |
getTop()
Returns the value for the position of the top of the viewer. |
java.lang.String |
getURI()
Returns the Universal Resource Identifier for the web page containing the viewer. |
java.lang.String |
getViewState()
Returns the ViewState. |
int |
getWidth()
Returns the viewer width. |
boolean |
isIgnoreViewStateOnLoad()
Returns whether the view state will be ignored when loading the viewer. |
boolean |
isOwnForm()
Returns whether or not the viewer control owns the form. |
boolean |
isOwnPage()
Returns whether or not the viewer control owns the page. |
void |
processHttpRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
java.io.Writer out)
Handles the user's request to generate the HTML for the report and writes the HTML directly to the response object. |
void |
setHeight(int newM_Height)
Sets the viewer height. |
void |
setIgnoreViewStateOnLoad(boolean newIgnoreViewStateOnLoad)
Sets whether to ignore the view state when loading the viewer. |
void |
setLeft(int newM_Left)
Sets the position for the left side of the viewer. |
void |
setName(java.lang.String newName)
Sets the name for the viewer control. |
void |
setOwnForm(boolean newOwnForm)
Sets whether the viewer control owns the form. |
void |
setOwnPage(boolean newOwnPage)
Sets whether the viewer control owns the page. |
void |
setTop(int newM_Top)
Sets the value for the position of the top of the viewer. |
void |
setURI(java.lang.String newURI)
Sets the Universal Resource Identifier for the report. |
void |
setViewState(java.lang.String viewState)
The ViewState is an encoded string
that represents the current state of the report.
|
void |
setWidth(int newM_Width)
Sets the width of the viewer. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ServerControl()
| Method Detail |
public static java.lang.Object deserializeBase64ToObject(java.lang.String base64)
throws java.io.IOException,
java.lang.ClassNotFoundException
For internal use only.
java.io.IOException
java.lang.ClassNotFoundExceptionpublic int getHeight()
Returns the viewer height.
int.
The unit is browser-dependent.setHeight
public final java.lang.String getHtmlContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context)
throws ReportSDKExceptionBase
This method handles the user's request to generate the HTML
for the report and returns the HTML as a String.
Note:Either the getHtmlContent method
or the processHttpRequest
method can be used to handle the user's request to generate the HTML
for the report, depending on how you write your JSP.
If the viewer's content will be displayed more than once,
then the getHtmlContent method will be more efficient,
because the request is processed once and the resulting HTML string
can be used multiple times. In this case, you must set the content type
of the HTML, as recommended in the table.
| Viewing format | Recommended HTML content type |
| Standard web reporting | "text/html; charset=UTF-8" |
| Mobile | "text/html" or "text/vnd.wap.wml" |
| PDA | "text/html; charset=UTF-8" |
request - A HttpServletRequest object
containing the values passed to the server during an Http request.response - A HttpServletResponse object
that receives the HTML output and sends it to the client.context - A ServletContext object
that specifies the servlet context.
String.
ReportSDKExceptionBasepublic int getLeft()
Returns the value for the position of the left side of the viewer.
int. The unit is browser-dependent.setLeftpublic java.lang.String getName()
Returns the name of the viewer control. By default the viewer control is named CrystalViewer.
String.setNamepublic int getTop()
Returns the value for the position of the top of the viewer.
int for. The unit is browser-dependent.setToppublic java.lang.String getURI()
Returns the Universal Resource Identifier for the web page containing the viewer.
String.setURIpublic java.lang.String getViewState()
Returns the ViewState. This is an encoded string
that represents the current state of the report.
The ViewState is used in order to perform client-side
caching of information about the current state of the report.
By default, the viewer will manage the ViewState
unless isOwnForm is set to false.
String that represents the
current state of the report.setOwnForm,
isOwnForm,
setViewStatepublic int getWidth()
Returns the viewer width.
int. The unit is
browser-dependent.setWidthpublic boolean isIgnoreViewStateOnLoad()
Returns whether the view state will be ignored when loading
the viewer. You would want this to be set to true
if the viewer is loaded in order to display a different page of the report.
true if the view state will be ignored and
false otherwise.setIgnoreViewStateOnLoadpublic boolean isOwnForm()
Returns whether or not the viewer control owns the form.
If the server control owns the form it is able to get and
set values for the form.
In particular, by owning the form, the viewer control creates
the ViewState object that is used in order
to perform client-side
caching of information about the current state of the report.
If this is set to false, it is the host's responsibility to use
getViewState()
and set persistence (form, session).
The host may use setViewState before calling
processHttpRequest();
if not the control will obtain it from the request object.
true if the server control owns the form and
false otherwise.
By default, this value is true.setViewState,
getViewState,
setOwnFormpublic boolean isOwnPage()
Returns whether or not the viewer control owns the page. In other words, the page is not within a portal and the JSP page only contains the viewer control. If the server control owns the page, it provides the opening and closing HTML tags and it is able to get and set values for the entire page.
true if the server control owns the page and
false otherwise.setOwnPage
public final void processHttpRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
java.io.Writer out)
throws ReportSDKExceptionBase
Handles the user's request to generate the HTML for the report and writes the HTML directly to the response object.
Note: Either the getHtmlContent
method or the processHttpRequest
method can be used to handle the user's request to generate the HTML
for the report, depending on how you write your JSP.
If the viewer's content will be displayed more than once,
then the getHtmlContent method will be more efficient,
because the request is processed once and the resulting HTML string
can be used multiple times.
Note: If you provide your own writer then you must set the
charset and the content-type. For improved
performance, you may wish to wrap your writer in a java.io.BufferedWriter.
response - A HttpServletResponse object that receives
the HTML output and sends it to the client.context - A ServletContext object
that specifies the servlet context.request - The HttpServletRequest object containing
the values passed to the server during an Http request.out - A Writer object. This value is set to null unless you are
providing your own writer.
ReportSDKExceptionBasepublic void setHeight(int newM_Height)
Sets the viewer height.
Note: Together, the setHeight and
setWidth methods control the viewable size of
the viewer. The default value is 0 (zero). If these methods
are set to zero, the viewable size of the viewer is calculated
based on the report the user is viewing.
If the setBestFitPage
method is set to true, the values of the setHeight and
setWidth methods are ignored.
newM_Height - An int that specifies the height of
the viewer. The unit is browser-dependent.getHeightpublic void setIgnoreViewStateOnLoad(boolean newIgnoreViewStateOnLoad)
Sets whether to ignore the view state when loading the viewer.
You would want this to be set to true,
if the viewer is loaded in order to display a different page of the report.
newIgnoreViewStateOnLoad - true to make the viewer
ignore the ViewState when loading.isIgnoreViewStateOnLoadpublic void setLeft(int newM_Left)
Sets the position for the left side of the viewer.
newM_Left - An int that specifies
the position for the left side of the viewer.
The unit is browser-dependent.getLeftpublic void setName(java.lang.String newName)
Sets the name for the viewer control. By default the viewer control is named CrystalViewer.
newName - The String that specifies the name of the
viewer control.getNamepublic void setOwnForm(boolean newOwnForm)
Sets whether the viewer control owns the form.
By default this is true.
If this is set to false, it is the host's responsibility to
getViewState()
and set persistence (form, session).
The host may setViewState before calling
processHttpRequest();
if not the control will obtain it from the request object.
newOwnForm - true to make the
viewer object own the form. By default this is true.setViewState,
getViewState,
isOwnFormpublic void setOwnPage(boolean newOwnPage)
Sets whether the viewer control owns the page.
Set this to false if the page is within a portal.
If the server control owns the page, it provides the opening
and closing HTML tags and it is able to get and
set values for the entire page.
Note: If you set setOwnPage to false
then you must set the charset and the
content-type.
newOwnPage - true to make the
viewer object own the page. The default value is true.isOwnPagepublic void setTop(int newM_Top)
Sets the value for the position of the top of the viewer.
newM_Top - An int value for the position of the
top of the viewer. The unit is browser-dependent.getToppublic void setURI(java.lang.String newURI)
Sets the Universal Resource Identifier for the report.
newURI - A String that specifies the Universal Resource
Identifier for the report.getURIpublic void setViewState(java.lang.String viewState)
The ViewState is an encoded string
that represents the current state of the report.
The ViewState is used in order to perform client-side
caching of information about the current state of the report.
By default, the viewer will manage the ViewState
unless isOwnForm is set to false.
viewState - An encoded String that represents the
current state of the report.getViewState,
setOwnForm,
isOwnFormpublic void setWidth(int newM_Width)
Sets the width of the viewer.
Note: Together, the setHeight and
setWidth methods control the viewable size of
the viewer. The default value is 0 (zero). If these methods
are set to zero, the viewable size of the viewer is calculated
based on the report the user is viewing.
If the
setBestFitPage
method is set to true, the values of the setHeight and
setWidth methods are ignored.
newM_Width - An int value for the width of the viewer.
The unit is browser-dependent.getWidth
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||