cancel
Showing results for 
Search instead for 
Did you mean: 

Add TextObject at runtime with correct size

Former Member
0 Kudos

Hi,

I am working on web application (MVC). I use crystal report for .net.

I need create a TextObject at runtime, say, the text is "abcjY".

I can get client's screen size in pixels with javascript, but I don't know how to get the size in mm or inch. But Crystal report use twips as measuring unit (1 inch = 1440 twips).  So I don't know how many taps I should assign to the TextObject width and height.

Is there any way to solve the issue? Like set the TextObject width and height with pixels rather than the twips?

Thank you.

Peter

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Peter,

Add the object and then open the report in CR Designer, you can then select the text object and show size and position. from there you can determine how twips convert to pixels.

Or even easier is to search the WEB, there are all sorts of listing for converting twips to pixels.

Don

Former Member
0 Kudos

Hi Don,

Thank you for the help.

I need create the text object at runtime, so I cannot use CR Designer.

Because I working a web application, as I know there is no javascript function to get screen size in mm or inch.

I checked some functions that converts twips to pixels. But these seem work on for windows or desktop application, in that case, the both screen size and pixels can be retrieved. But in web case, I can only get pixels. 

0 Kudos

CR uses Twips to do the calcualtions so only option is to find a way to determine the screen in java....

Google says there are calculators for doing this so someone figured it out...

Answers (0)