the problem of the Chinese code
Re: the problem of the Chinese code
Hello.
Can you send us .mrt file with this wrong symbols in datasource ?
Can you send us .mrt file with this wrong symbols in datasource ?
Re: the problem of the Chinese code
Hello ,it is my report http://test.arp.cn/appendix/M00/00/1A/C ... ort123.mrt
Re: the problem of the Chinese code
Hello.
This name is broken, You should reenter chinese names again & save file.
This name is broken, You should reenter chinese names again & save file.
Re: the problem of the Chinese code
hello, I don't know what's your mean, when I save the report the name is broken.
Re: the problem of the Chinese code
Hello.
We tried your report - words broken and then we reenter chinese characters and save. Then no broken characters in report.
We tried your report - words broken and then we reenter chinese characters and save. Then no broken characters in report.
Re: the problem of the Chinese code
Hello,there are broken characters but I just create the mysql connection ,and I don't know how are you create dataSource.
Re: the problem of the Chinese code
Hello , and what about this problem?
heqichao wrote:Hello, it is a problem about Chinese disorder code.
I use json dataSource and the data is this,
but the Chinese Disorder Code in the report.
it is my report .Thank you.
http://test.arp.cn/appendix/M00/00/1A/C ... IN_RPT.mdc
Re: the problem of the Chinese code
Hello.
As we see mdc file have wrong data
<item45 Ref="47" bh="Transparent" br="All;Black;1;Solid;False;4;Black" fn="MICROSOFT YAHEI UI,10" ha="Center" isSer="true" mr="0,0,0,0" name="Text54" pl="d.DataBand4" rc="2.4,5,3.8,1" tb="Black" text="转��方预算负责人审批" type="Text" va="Center" />
can you send us .mrt file with data
As we see mdc file have wrong data
<item45 Ref="47" bh="Transparent" br="All;Black;1;Solid;False;4;Black" fn="MICROSOFT YAHEI UI,10" ha="Center" isSer="true" mr="0,0,0,0" name="Text54" pl="d.DataBand4" rc="2.4,5,3.8,1" tb="Black" text="转��方预算负责人审批" type="Text" va="Center" />
can you send us .mrt file with data
Re: the problem of the Chinese code
Hello ,this is my code
and is my report and the json data :
http://test.arp.cn/appendix/M00/00/1B/C ... IN_RPT.mrt
http://test.arp.cn/appendix/M00/00/1B/C ... =json.json
and this my http request
Code: Select all
public static StiReport getReport(String reportPath,String httpQueryUrl){
StiReport stiReport = null;
try {
stiReport = StiSerializeManager.deserializeReport(new File(reportPath));
stiReport.getDictionary().getDataSources().clear();
stiReport.getDictionary().getDatabases().clear();
stiReport.getDictionary().getRelations().clear();
StiJsonDatabase db = null;
if(stiReport.getDictionary().getDatabases().get("JSON")== null){
db = new StiJsonDatabase("JSON",httpQueryUrl);
stiReport.getDictionary().getDatabases().add(db);
}else{
db=(StiJsonDatabase) stiReport.getDictionary().getDatabases().get("JSON");
}
JSONObject resuleObj =db.getJSONObject();
//TODO
JSONObject obj =resuleObj.getJSONObject("obj");
for(String ojbKey : obj.getNames(obj)){
JSONArray list =(JSONArray) obj.get(ojbKey);
StiDataTableSource ts = new StiDataTableSource("JSON"+"."+ojbKey, ojbKey, ojbKey);
ts.setColumns(new StiDataColumnsCollection());
Map keyMap =ReportUtil.getJsonArrayKey(list, new HashMap());
for(Object key :keyMap.keySet()){
ts.getColumns().add(new StiDataColumn((String)key, (String)key, StiSystemTypeEnum.SystemString.getSystemType()));
}
ts.setDictionary(stiReport.getDictionary());
stiReport.getDictionary().getDataSources().add(ts);
}
} catch (Exception e) {
e.printStackTrace();
}
stiReport.Render(false);
return stiReport;
}
public static Map getJsonArrayKey(Object obj,Map keyMap){
if(obj instanceof JSONArray){
JSONArray jsonArray =(JSONArray) obj;
int length = jsonArray.length();
for(int i=0;i<length;i++){
try {
JSONObject jsonObject =jsonArray.getJSONObject(i);
String[] names=JSONObject.getNames(jsonObject);
for(String name :names){
keyMap.put(name, name);
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
else if(obj instanceof JSONObject){
JSONObject jsonObject =(JSONObject) obj;
String[] keys=JSONObject.getNames(jsonObject);
for(String key : keys){
try {
if(jsonObject.get(key) instanceof JSONArray){
getJsonArrayKey(jsonObject.get(key), keyMap);
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
return keyMap;
}
http://test.arp.cn/appendix/M00/00/1B/C ... IN_RPT.mrt
http://test.arp.cn/appendix/M00/00/1B/C ... =json.json
and this my http request
Re: the problem of the Chinese code
Hello,
We need some additional time for investigating the issue.
We will try to add the additional changes within two or three weeks.
We will let you know about the result.
Thank you.
We need some additional time for investigating the issue.
We will try to add the additional changes within two or three weeks.
We will let you know about the result.
Thank you.