Showing posts with label helloi. Show all posts
Showing posts with label helloi. Show all posts

Monday, March 26, 2012

Memo field will not display more than 255 chars

Hello;

I am ammending another developer's app who used Crystal Reports 7.0. I am new to Crystal Reports. I have a field on a report that is defined in our Oracle database as a varchar2(4000). The ttx file for the report defines the field as String 4000. But the report will only print out 255 characters or less. We are only noticing this now as in the past the clients have not used this field to its extent (they have always enetered less than 255) But now they want to use it the way we set it up and the data is displaying accordingly in the application (multi-line textbox) when they enter more than 255, but the report won't print it. Please help if possible - it has been 2 days now looking at this. I will include ttx file content:

labour.ttx:

wokorder_no String 30
complaint_id String 40
complaint String 150
ata_code String 14
ata_description String 100
mech_name String 30
service_description String 4000<--field that won't print
estimate_description String 25
estimate String 5
actual_billing String 5
rate String 10
rate_description String 25
total String 12

I have also ensured that CanGrow is set to true, and the maximum number of lines is at '0' which according to documentation should ensure no limit on the number of lines. Any ideers anyone??

Thanks muchMuch to my surprise, the fix was:

data type "String" in ttx file needs to be "Memo" and the cursor location of the connection object must be client side. This is typically a great forum - I am surprised no one replied.|||I have same problem...in this case I not define datatype on ttx file but use recodset. The recodset use textbox object for stored on crystal report.

Monday, February 20, 2012

MDX function ORDER over CROSSJOINed Set

Hello!

I have simple MDX query (SSAS2005):

SELECT
{ [Date].[Calendar].[Calendar Year].&[2004] } ON COLUMNS ,
ORDER(
DESCENDANTS( [Product].[Product Model Categories].[All Products], [Product].[Product Model Categories].[Subcategory] ) *
{[Product].[Size].[All Products], DESCENDANTS([Product].[Size].[All Products], [Product].[Size].[Size]) },
[Measures].[Reseller Sales Amount],
DESC) ON ROWS
FROM [Adventure Works]
WHERE ( [Measures].[Reseller Sales Amount] )

Why members of [Product].[Product Model Categories].[Subcategory] is not arranged?

It is, you haven't specified to break the hierarchy order in the ORDER function and you're not sorting by the column you're displaying. Try the following query:

SELECT

{ [Date].[Calendar].[Calendar Year].&[2004] } ON COLUMNS ,

ORDER(

DESCENDANTS( [Product].[Product Model Categories].[All Products], [Product].[Product Model Categories].[Subcategory] ) *

{[Product].[Size].[All Products], DESCENDANTS([Product].[Size].[All Products], [Product].[Size].[Size]) },

([Measures].[Reseller Sales Amount],[Date].[Calendar].[Calendar Year].&[2004]),

BDESC) ON ROWS

FROM [Adventure Works]

WHERE ( [Measures].[Reseller Sales Amount] )

I've highlighted in red the bits that I've added. It's easy to forget to add the 'B' in front of ASC and DESC, and you have to remember that ORDER won't pick up on any selection you've made on columns - you need to specify the column you want to sort by by adding it to the tuple in the second parameter.

HTH,

Chris

|||

Hi, Chris! Thanks for answer, but...

the hierarchy should be kept. Members of both dimensions should be arranged in the descending order. In the MSAS2000 function ORDER worked correctly. Here is a similar example for Foodmart2000, "Cities" are sorted in the desc and "Education level" is sorted inside of cities too.

SELECT { [Time].&[1997] } ON COLUMNS ,
ORDER(
{
DESCENDANTS( [Customers].[All Customers], [Customers].[City] ) *
{ [Education Level].[All Education Level], DESCENDANTS( [Education Level].[All Education Level], [Education Level].[Education Level] ) }
},
( [Time].&[1997] ),
DESC
) ON ROWS
FROM [Sales]
WHERE ( [Measures].[Unit Sales] )

http://img206.imageshack.us/img206/3055/ordermsas200eg4.jpg

|||

Ah, I see what you mean. This looks like a bug to me - you should report it at Connect (http://connect.microsoft.com/).

In the meantime, does the following query do what you want?

SELECT

{ [Date].[Calendar].[Calendar Year].&[2004] } ON COLUMNS ,

GENERATE(

ORDER(

DESCENDANTS( [Product].[Product Model Categories].[All Products], [Product].[Product Model Categories].[Subcategory] )

,([Measures].[Reseller Sales Amount],[Date].[Calendar].[Calendar Year].&[2004]), DESC)

, [Product].[Product Model Categories].CURRENTMEMBER

*

ORDER(

{[Product].[Size].[All Products], DESCENDANTS([Product].[Size].[All Products], [Product].[Size].[Size]) }

,([Measures].[Reseller Sales Amount],[Date].[Calendar].[Calendar Year].&[2004],[Product].[Product Model Categories].CURRENTMEMBER), DESC)

)

ON ROWS

FROM [Adventure Works]

WHERE ( [Measures].[Reseller Sales Amount] )

Chris

|||

I have made so, but If I need 5-7 crossjoined dimensions?
So many calls instead one ORDER!!!

Thanks.