09-05-2014 04:31 AM
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
09-05-2014 01:20 PM
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 SystemLX 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
09-08-2014 08:45 AM
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
09-08-2014 09:02 AM
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
09-16-2014 01:21 AM
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
09-16-2014 08:40 AM
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