|
|
|
|
Re: Read report design [message #550221 is a reply to message #550195] |
Thu, 29 July 2010 14:44 |
|
Kris,
Can you post what you did to help others?
Jason
On 7/29/2010 9:54 AM, Kris Chappell wrote:
> Whoo hooo!!!! I got it to work. Thanks again Scott for your reply.
|
|
|
|
Re: Read report design [message #550241 is a reply to message #550236] |
Thu, 29 July 2010 15:11 |
|
Thanks for posting!
On 7/29/2010 11:08 AM, Kris Chappell wrote:
> Well, I'm not really the best person to ask, I'm not a java programmer.
> But the problem that I had was in my return from fetching the design.
> This is the working method.
>
> public class RptDbUtil implements RptDbSql
> {
> public static String
> retrieveDesign(String pReportName, String pVersion)
> throws Exception
> {
> Log.debug("Entered RptDbUtil.retrieveDesign");
> CHGSQLService lService = CHGSQLService.getInstance();
> SQLResult lResult = lService.executeQuery(RptDbSql.SQL_SELECT_DESIGN,
> new Object [] {pReportName, pVersion}, 0L); if (lResult.getRowCount() == 0)
> {
> throw new RuntimeException("Report not found " + pReportName + " for
> version " + pVersion);
>
> }
> return lResult.getRow(0).getValue(0).toString();
>
> }
> }
>
>
> I was returning lResult.getRow(0).toString(); which was returning an
> object instead of a string. The string is passed into the
> openReportDesign using this:
>
> lDesign = aBirtEngine.openReportDesign(new
> ByteArrayInputStream(RptDbUtil.retrieveDesign("inactiveUsers ",
> "1").getBytes()));
>
> There may be a more efficient or more elegant way, but this worked for
> me. :)
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03227 seconds