android 曲线图:Android集成app

2024-11-09 11:17:12

工具/原料

数据分析图表软件:FineReport7.1.1

大小:148.2M 适用平台:windows

1.资源准备

准备好需要集成FineReport App的Android工程,并下载FineReport提供的集成资源包。

点击android.zip,下载资源包,将其解压,得到如下图所示几个文件:

android 曲线图:Android集成app

2.修改AndroidManifest.xml文件

打开自己工程下的AndroidManifest.xml文件,并将解压出来的FineReport提供的AndroidManifest.xml中的内容写入到自己工程下的配置文件中

3.集成使用FineReport App

FineReport Android App提供了2种类型的接口:直接使用url访问服务器上的模板,

以连接的形式集成至自己的App当中,另外一种是使用目录入口集成,即通过验证用户名密码,登录到FineReport App的主页或者目录页。

3.1URL直接集成

使用URL集成. 直接使用URL访问服务器工程模板,

比如说我们想要集成服务器下的WorkBook2.cpt模板,并且是填报的形式,那么,代码如下:

Intentintent=newIntent();

intent.putExtra("url","http://192.168.100.121:8075/WebReport/ReportServer?reportlet=WorkBook2.cpt&op=write");

intent.setClass(this,IntegrationActivity.class);

startActivity(intent);

注:op=write表示参数op为write填报模式,正常预览模板,

不需要添加op参数。

3.2使用目录欢迎入口集成

使用目录欢迎入口集成,直接登陆报表主页或者目录就相当于将FineReport的App嵌入到

自己的App当中,当需要进入到FineReport App的时候,只需要发送相应的用户名密码验证即可登录到FineReport App的主页或者目录页当中,接口如下:

welcomeIntent.putExtra("serverIp","http://www.finereporthelp.com:8889/app/ReportServer");//数据决策系统地址ip

welcomeIntent.putExtra("serverName","demo服务器");//数据决策系统名称

startActivity(welcomeIntent);

注:如果服务器系统中设置了主页,那么登录完成之后就跳转到主页,如果没有设置主页,就直接显示目录页。

猜你喜欢