Monday, 26 August 2013

Crystal Report Truncate XML String?

Crystal Report Truncate XML String?

I am using crystal report connecting to SQl server database. And I have a
database field that has XML data on it. If I browse the data field in
crystal report, I can see that the lenght of the field is 255 characters.
My Stored procedure which has this a column of this field looks like this
:
ALTER PROCEDURE [dbo].[GetData]
(
@ID INT
)
AS
BEGIN
SELECT P.ID,
,P.Name
,dbo.GetAttributesAsXML
(Scalre-valued-Function) That is the field I
want to change it's lenght
FROM Batch P
END
Here is the Scalre-valued-Function :
ALTER FUNCTION [dbo].[GetAttributesAsXML]
(
@ProductID INT
)
RETURNS XML
AS BEGIN
DECLARE @Result XML;
SELECT @Result = (SELECT * FROM
(SELECT AT.ID AS ID
,VAL.ID AS ValueID
,COALESCE(ATT.Name,AT.Name)
AS Name
,COALESCE(VALT.Value,VAL.Value)
AS Value
FROM Attributes AT
LEFT OUTER JOIN
AttributesValues VAL
ON VAL.AttributeID =
AT.ID AND
VAL.ProductID =
@ProductID
) AS T
ORDER BY GOrder, GName, T.[Order]
FOR XML AUTO, ELEMENTS, ROOT('root')
)
RETURN @Result;
END
Does any one know If I can change the length of that column to max? It
seems like I have field with type memo in access. In crystal report if I
get field type as string it only takes 255 char & ignore if length is more
than that. Any One can help resolving this issue?

No comments:

Post a Comment