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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Positioning Changes After Published onto CE10

Status
Not open for further replies.

kornhill

IS-IT--Management
Dec 12, 2001
15
AU
Hi Everyone,

We are currently experiencing some issues with Crystal Report Viewer (DHTML) and would greatly appreciate if anyone can point us to the right direction please?

We have some reports which are required to be printed on some pre-printed forms, so it is important for all of the fields to be printed on a specified fixed position on the form. When we try to print the report from the designer (CR10 Developer Edition 10) to say printer1, the form comes out correctly, but after we have published this report onto CE10 and try to print from DHTML viewer using "Crystal Print Control 10.0" to the same printer, the layout of each of the fields differs from the original by say 0.5cm.
- All of the fields has been moved to the left by 0.5cm
- Page header has been moved down by 0.5cm
- Page footer has been moved up by 0.5cm

We have tried to print to a different printer as well but have achived the same result. Has anyone faced this similar problem before OR would anyone know if there is configurable parameter that we could tweak to resolve it please?

Thanks in advance
 
Use the active-x control or java viewers in ce 10.

DHTML is basically an export, so formatting will change a bit, this was the case in previous versions as well.

Or you may be able yto enable the active-x print control (Ihaven't tried this yet):


If you enable active-x and it doesn't come up in active-x, try:


-k
 
Hi,
We use that code method to create either an ActiveX or DHTML print function..( ActiveX will require users to allow a plug-in to be installed if it is the first time - They will need PowerUser status, at least, to allow this).
You can set many options in the Viewer object (at this stage the report object and its parameters have been created):
Code:
'Declare the viewer object variable
Dim Viewer

'Create a viewer object and view the report
Set Viewer = CreateObject("CrystalReports.CrystalReportInteractiveViewer")
With Viewer
  .reportSource = reportDocument
  .HasBooleanSearchButton = False
  .HasCrystalLogo = False
  If NbrParams > 0 then
  .ParameterFields = Fields
  End If
  .HasRefreshButton = True
  .IsDisplayGroupTree = False
  .HasPrintButton = true
  .PrintMode = 0 ' 0 for no activeX Printing, use 1 for ActiveX
  .IsOwnPage = true
End With

set session("viewer") = viewer

Response.Redirect("viewprint.asp")

The redirect to viewprint.csp ( can be .asp as well) was needed to fix a problem that the ActiveX print object sometime has..It is a simple page:
Code:
<%@ Language=VBScript %>

<%
option explicit

dim viewer
set viewer = session("viewer")
'Error handle
on error resume next
Viewer.ProcessHTTPRequest Request, Response, Session

if err.number <> 0 then
  response.write "Failed to view report" & "</BR>"
  response.write "error number: " & err.number & "</BR>"
  response.write "error description: " & err.description
end if
%>

Hope it helps..
[profile]

 
Thanks guys,

Really appreciate for your input.

Actually, I was using the ActiveX Print Control before already, so I 've got no luck on that. And you have guessed right that I have the problem in "activating" the use of ActiveX viewer as well. And I have also followed the changes on the kb link but it seems like that I am using the ActiveX viewer all the time.

I have tried created new users and try viewing the report on a fresh machine, but it is always locating the DHTML viewer all the time. Any thoughts?

Turkbear, if you don't mind, could I check with you which file was the first code segment please?

Thanks and Regards
Andy
 
How can you be "And I have also followed the changes on the kb link but it seems like that I am using the ActiveX viewer all the time." yet using a dhtml viewer?

I'm lost...

-k
 
Ah...

Figured out why. I was always under an impression that the preference setting at header section of the Admin Console page controls which viewer to use for all clients. And I didn't realise that there is a 2nd preference tab under the ePortforlio preference which is where I should be change the viewer. I was able to change the report to print from all four different viewers but unfortunately they all come out the same way (i.e. out by approx. 0.5cm compared to what gets printed out from the designer). Would you know of any setting that I can play around with which might correct this?

Cheers
Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top