chichigi Posted September 6, 2006 Share Posted September 6, 2006 Hi, I try to retriever data from database sqlserver and oracle. The Chinese character is displayed correctly for MS SqlServer, but is displayed incorrectly for Oracle. I do not know how to slove this problem.May somebody help me? Thanks. iReport Version : 1.2.6Pdf font name : c:windowsfontsmingliu.ttc,1Pdf Embedded : checkedPdf Encoding : Identity-H (Unicode with horizontal writing) \HKEY_LOCAL_MACHINESOFTWAREORACLEKEY_OraClient10g_home1 NLS_LANG -> AMERICAN_AMERICA.US7ASCII Link to comment Share on other sites More sharing options...
javydreamercsw Posted September 6, 2006 Share Posted September 6, 2006 I know is a question of the subject, and excuses for that, but you mention having a report from two different datasources. You mean by that at the same time or one at a time? I've been looking for way to have a report in one datasource and a subreport in another. If this is the case I'll appreciate some light there. Thanks and excuses again for being out of the subject here. Link to comment Share on other sites More sharing options...
Code_Slave Posted September 7, 2006 Share Posted September 7, 2006 you do not say what you are trying to do., and if the problem is with a jasper report.where is the character data , displayed and HOW did you get it. oracle automatically does code page translation on character fields.so you need to ensure the oracle database is setup for multibyte characters. and it aint gonna happen with your NLS set as good ol 7bit ascii, is it? Link to comment Share on other sites More sharing options...
Code_Slave Posted September 7, 2006 Share Posted September 7, 2006 javy, you open 2 datasources, or you code your own datasource.it is not difficult. Link to comment Share on other sites More sharing options...
chichigi Posted September 7, 2006 Author Share Posted September 7, 2006 I changed the connection and retrieve data individually.What's the difference "at the same time" or "one at a time"? Here are some connection configuration. 1.Oracle Connection JDBC Driver : oracle.jdbc.driver.OracleDriver JDBC URL : jdbc:oracle:thin:@192.168.1.101:1521:F0 2.SQL Server Connectio JDBC Driver : net.sourceforge.jtds.jdbc.Driver JDBC URL : jtds:sqlserver://192.168.1.232:1433/TGA It seems my oracle db does not surport mutibyte... Link to comment Share on other sites More sharing options...
javydreamercsw Posted September 7, 2006 Share Posted September 7, 2006 There's a HUGE difference. You did the "swap" from iReport. I'm talking about a report that within the same report, at runtime, retrieves data from 2 different connections. i.e. Main report from Oracle, subreport from DB2. I'm dying to get my hands on how to do that!B) Thanks anyways. Link to comment Share on other sites More sharing options...
Code_Slave Posted September 11, 2006 Share Posted September 11, 2006 getting data from 2 sources is NOT a problem.even with the subreport using the data from a different database. it's all down to you needing a customdatasource class , that's all, very easy. The oracle not displaying Chinese. you must INSTRUCT the database to store multi-byte characters, if you do not then it will not, it is not a mind reader , it is only a data manipulator. There is however a way round it, even if you have your database set to ASCII. you can store the Chinese data in BLOB's , NOT CLOB. Varchar2, CLOBS , ARE FILTERED datatypes, in that they are passed thru your NLS settings, ALways on the RDBMS and sometimes on the client, depending on which drivers you are using. BLOBS are not filtered. If your oracle is commisioned in Asia, I would guess that Multibyte is already enabled. Link to comment Share on other sites More sharing options...
javydreamercsw Posted September 11, 2006 Share Posted September 11, 2006 Where can I find an example of s custom data source? Link to comment Share on other sites More sharing options...
Code_Slave Posted September 13, 2006 Share Posted September 13, 2006 Well you could try jasperreports/demo/samples/datasource.where the very capable Teodor Danciu, has already written one for you. but thats only a rough guess. Link to comment Share on other sites More sharing options...
Rags Posted January 9, 2007 Share Posted January 9, 2007 Where can I find an example of s custom data source? Dreamer! Did you get any solution for your problem.. Multiple DataSource support..If so, please share with me.. ThanksRags Link to comment Share on other sites More sharing options...
javydreamercsw Posted January 9, 2007 Share Posted January 9, 2007 I'm still working with it but something like this mike help: Code:java.sql.DriverManager.getConnection("jdbc:db2://[ip address]:[port]/[DB name]", "[user]", "[password]"«») I'm using that in a subreport Connection/Data Source Expresion to connect to a different Database. Workin to make the parent report use the results from that subreport. Hope it helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now