Hai All,

I want to create crystal reports dynamically, I don't know the columns i will take it from database at runtime, im getting all data into one dataset and im convrting dataset into xml schama, then im using that xml schama in crystal reports,there i drag n drop all fields in xml schama to crystal report, up to here its working fine, but when ever i changed fields in database i have to change in crystal report also

Is there any way to update crystal report dynamically.....?(it shoulld display newly added columns in database also, Is it possible????)

Thanks,
Aswath.

Hai All,

I want to create crystal reports dynamically, I don't know the columns i will take it from database at runtime, im getting all data into one dataset and im convrting dataset into xml schama, then im using that xml schama in crystal reports,there i drag n drop all fields in xml schama to crystal report, up to here its working fine, but when ever i changed fields in database i have to change in crystal report also

Is there any way to update crystal report dynamically.....?(it shoulld display newly added columns in database also, Is it possible????)

Thanks,
Aswath.

Couldnt you return the fields from the database giving them the names required by the XML.

E.G. if the xml was [A VERY IMAGINATIVE XML DOC]

<?xml version="1.0" encoding="utf-8" ?>
<library>
  <book id="1">
    <name>john</name>
    <author>alan thomas</author>
    <isbn>100928772552</isbn>
    <date>14/03/2007</date>
  </book>
</library>

and your SQL statement looked osmething like this

SELECT bookname, bookauthor, bookisbn, bookdate FROM book WHERE bookid = 1

You could name each returned value to that xml tag that it corresponds to E.G.

SELECT bookname AS name, bookauthor AS author, bookisbn AS isbn, bookdate AS date FROM book WHERE bookid = 1

i havent tried this myself but i rekon it would work for you if your then returning a dataset and binding this to the report.

This article has been dead for over six months. Start a new discussion instead.