cancel
Showing results for 
Search instead for 
Did you mean: 

Lines placed one above another will not appear at same position in report

Former Member
0 Kudos

In my crystal report i have placed 5 horizontal lines in a detail section one above another.The line will has suppress condition based on a value of particular column from a database.(I have made the lines to print in such a way that when report has 5 columns the line with less width appear and when 6 columns line higher width appears and so on.). So only difference between them is line width(which varies) according to me. But in report the for different samples, i observed that line is not at same position and it is little bit varies in y position. In crystal report preview i observed the report and found that some lines take large width while some other less in report. So why this happens even though i have placed line one above another? Please help

Please download sample files Here.

RPT files are 10.rpt and 11.rpt .(Both rpt files are same. I just used it to show difference by keeping both rpt files open so to get the difference i am getting)

Set the database location for 10.rpt to table "10" of "Template.mdb"

Set the database location for 11.rpt to table "11" of "Template.mdb"

Now you can see the difference which i was describing above.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey i had set Can grow property of those objects to true. When i unchecked the checkbox for all the objects having lines my problem solved. So what was really happening when i set the can grow property? Is there any problem if i not set this property?

JWiseman
Active Contributor
0 Kudos

Can Grow will allow a text object to expand vertically based on the number of lines in the text object in conjunction with the numeric value assigned in the dialogue. if this is unchecked, the text object height will not change from the height in design mode. there is no problem in leaving this unchecked. it is still strange that this property would cause a difference in the Y position. though.

Former Member
0 Kudos

Yes. Deselecting the Can grow checkbox for all the objects having lines solved the problem. But i don't know the reason behind change in Y position.

JWiseman
Active Contributor
0 Kudos

this would probably be considered a bug. in earlier versions there was one issue that i know of where text objects would move from a manually entered postion. this issue however differs. as this is an old version of crystal there will most likely not be any patches available for it. i searched scn  for older versions and couldn't find anything. websmp only has the currently supported versions. you could always put a question to here. perhaps Ludek would know.

Answers (2)

Answers (2)

JWiseman
Active Contributor
0 Kudos

hi IT researcher,

if you've got a later version of crystal, you may wish to look into using the dynamic Width property using only a single line in a single Details section. the line width is then based on your condition. this way you don't have to mess around with trying to align objects in underlayed sections.

right click on one of your current Text Objects > choose Size & Position > go to the Width conditional formula dialogue. note that the output Width is based on twips (1440 twips per inch.)

you can see a bit more about using this property here.

cheers,

jamie

Former Member
0 Kudos

You are correct.It is only available in newer version of CR. Not available in CR 8.5

JWiseman
Active Contributor
0 Kudos

in that case you may wish to consider using a formula as the output for the line with a box drawing character such as

numbervar c;

if condition A then c:= 50 else

if condition B then c:= 60...

replicatestring('─',c);

this way you would only have one details section and no underlays. ensure that the formula width is already set / stretched out to the maximum width you need.

Former Member
0 Kudos

Can anyone please help me to solve this problem?

DellSC
Active Contributor
0 Kudos

Rather than overlapping the lines, I would create a section for each of the lines and suppress the section based on the same criteria as you're using to suppress the individual lines.  If you put the lines at the top of their sections (Y = 0) and make all of the line sections the same height, you should be able to get it all to line up correctly.

-Dell

Former Member
0 Kudos

If i try to set thr value of Y to 0 by using size and position option of crystal report then Y value automatically sets to -0.028. Why i am not able to set it to 0?

DellSC
Active Contributor
0 Kudos

Try setting it to 0.01 or 0.02 instead.  Sometimes I see this type of issue, but I haven't been able to narrow it down to find a cause.

-Dell

JWiseman
Active Contributor
0 Kudos

i've seen this one as well Dell back in my tech support days for the earlier versions of crystal. if i remember correctly it was treated as a bug but i can't remember a fix / workaround for it. perhaps also try setting the grid size in File > Options > Layout to .01 which is the minimum.