Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Data Source

Status
Not open for further replies.

dky1e

Programmer
May 4, 2002
293
US
Hi,

I was just wandering if it is possible to pass in an xml string (returned from a SQL Server stored procedure) intead of a standard recodset in Crystal Reports 9?
 
I don't think so, and I'd be surprised if there were an advantage to doing this otehr than leveraging existing code as you would be parsing the data into XML from SQL Server, and then parsing it back in CR...

-k
 
It does make sense if you're grouping.

Let's say you return:
Code:
Col1    Col2    Col3
----    -----   -----
aaaaa   xxxx1   12
aaaaa   xxxx1   32
aaaaa   xxxx1   16
aaaaa   xxxx2   4
aaaaa   xxxx3   43
aaaaa   xxxx3   2 
aaaaa   xxxx3   2
bbbbb   yyyy1   45
bbbbb   yyyy1   61
etc...
You're returning values for columns Col1 and Col2 multiple times, now in xml you would have

Code:
<Col1 value = &quot;aaaaa&quot;>
     <col2 value = &quot;xxxx1&quot;>
           <col3 value = 12/>
            etc....
     </col2>
</Col1>

XML would be more efficient, since &quot;aaaaa&quot; will be returned only once.
 
Hi, If you group by col1,col2 in your report only 1 of each repeated value will show..
Even with XML, I suspect all the values are read, but not shown.

[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top