Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Copper Contributor
Posts: 19
Registered: ‎07-26-2013

Crystal Reports Viewer Window Size

In Saleslogix 8.1 when running a report in Saleslogix it opens the Crystal Report Viewer in a 8x6 screen.

 

Is there any options for this to open in a full sized window?

 

We had a client with a customised report that opened in a full sized window in 7.5 but in 8.1 it opens in 8x6.

 

I know standard reports have always opened in 8x6 but I wondered if there is any code to change this?

 

8.1 Crystal Report forms and scripts have changed since 7.5

 

Thanks

Employee
Posts: 629
Registered: ‎04-24-2009

Re: Crystal Reports Viewer Window Size

Hi Jake,

 

The maximizing of the report viewer is not supported when calling the Report.Show() method; however, it is supported when calling the viewer directly. You would have to create an instance of the SlxReportViewer object and then set its WindowStartupKind property to 1 (SlxWindowStartupKind_Maximized = 1). The viewer can be displayed by calling its Show() method, which takes the following arguments:

 

Note: fileName is the .RPT file name. Also, you would have to just pass the password and not the encryptedPassword, since the encryption method is not exposed; this would cause the clear password to be sent on the command line.

 

procedure ShowReport(const fileName: WideString; const userId: WideString; 
const password: WideString; encryptedPassword: OleVariant; 
deleteReport: OleVariant; reuseParameterValuesOnRefresh: OleVariant; 
hideExportButton: OleVariant; hidePrintButton: OleVariant; 
hideRefreshButton: OleVariant; waitUntilClosed: OleVariant); safecall;

 The SlxReportViewer can be created using:

 

    Dim oViewer
    Dim strFileName
    Dim strUserId
    Dim strPassword

    Set oViewer =  CreateObject("SlxReporting.SlxReportViewer")
    strFileName = "C:\Your.rpt"
    strUserId = "ADMIN"
    strPassword = ""
    oViewer.WindowStartupKind = 1
    oViewer.ShowReport strFileName, strUserId, strPassword ' The other arguments are optional

You might be able to replace the current Show() method with this logic by first saving the report document to a new location in SystemSmiley FrustratedLX Report Controller.

 

mCrystalReport.RDC.SaveAs strYourFileName, False

 The place where you would put your logic is at the line where the following is called in this script:

 

mCrystalReport.RDC.Show reuseParameterValuesOnRefresh, allParametersHaveBeenSet, hideExportButton, hidePrintButton, hideRefreshButton

 

Thanks

 

Mike

Copper Contributor
Posts: 19
Registered: ‎07-26-2013

Re: Crystal Reports Viewer Window Size

Hi Mike,


Thanks for the help.

 

I passed this onto the development team hear and they haven't been able to maximise the screen upon loadup.

 

Thanks

Employee
Posts: 629
Registered: ‎04-24-2009

Re: Crystal Reports Viewer Window Size

Ok; the example I gave was for integration in Report Manager; if they are displaying the report using another means (e.g. BasicFunctions), then the solution I gave would not help.

 

Thanks

 

Mike

Copper Contributor
Posts: 19
Registered: ‎07-26-2013

Re: Crystal Reports Viewer Window Size

I believe in their system it does use basic functions to bring up the report from the Ticket Form to open report xx and gets information from field xx, yy, zz.

 

However when accessing the template from the Reports function within Saleslogix we did get a full sized screen from there so I would of expected that in the 8.1 version?

 

Thanks

Employee
Posts: 629
Registered: ‎04-24-2009

Re: Crystal Reports Viewer Window Size

Hi Jake,

 

The previous implementation used the Crystal Reports ActiveX viewer, which is no longer available for us to use (deprecated by Crystal). The report viewer is now a separate application (i.e. SLXReportViewer.exe). That is why you are not seeing the same UI.

 

Thanks

 

Mike