05-24-2014 02:30 PM
If you have that draft, I would be very interested in it as well. Any little bit you can provide is HUGE to us partners....
05-27-2014 10:51 AM
@John - this does not look like VBScript to me ;-)
Dim frmReportViewer As New ReportViewer Dim rptRc As New AgrisoftReports.Reports.rpt_Railcar rptRc.SetParameterValue("@pReportDate", m_dateReport) SetReportDBConnection(rptRc) CrystalReportViewer1.ReportSource = rptRcfrmReportViewer.MdiParent =Me.MdiParent frmReportViewer.Show()
More like vb.net - tried to "convert it" to VBS.. but no joy....
We really need VBScript support for this - asap - it's holding up upgrades.
05-27-2014 11:20 AM
05-28-2014 02:00 AM - edited 05-28-2014 02:14 AM
I've attached rough documentation on the Saleslogix Reporting API exposed in Saleslogix.Reporting.API.dll. This Help file was generated from Saleslogix.Reporting.API.tlb and includes the names of objects, classes, interfaces, methods, properties, enums, and parameters. The Help file does not include any examples, but it will help to understand the API that is available. The Help file represents Update 01 (and 02, which are the same). Rename the file to *.chm from *.ch_.
Regarding the ability to disable parameter prompting, that feature was removed by Crystal in the .NET version. Our API wrapper includes an empty placeholder for this property, mainly to make sure existing code compiles and does not bomb elsewhere. The following defect was created to address this issue:
13094384: Implement the ability to disable and then re-enable parameter prompts via the EnableParameterPrompting property of the ISlxReport document
The current reporting API mimics the original Crystal API in all of the ways it was being used in VBScript and the LAN products. It does not expose all of the collections, properties, etc. that are available in .NET; that would be an impossible task. It's possible to use the Crystal .NET API in Saleslogix by creating an extension, should the need arise.
The following is a list of some common APIs avaiable to set parameters, etc.. With regard to VBSCript, these methods would be called against the mCrystalReport.RDC object (e.g. mCrystalReport.RDC.SetParameterDiscreteValue("parameterName", "Hello World")). Note the omission of the @ sign for the parameterName.
// Add a CommandTable to a report (see AddReportParameters() or CreateGroupCommandTable() in System:SLX Crystal Report). function AddCommandTable(const commandText: WideString; const linkSourceFieldName: WideString; const linkSourceFieldAlias: WideString; const linkTargetFieldName: WideString; tableJoinType: SlxTableJoinTypeEnum): WideString; // Add a parameter to a report (see AddReportParameters() in System:SLX Crystal Report). // IMPORTANT: Call RefreshParameterFields() after adding a new parameter; otherwise, it will not show up in the parameters collection exposed by the API (technical requirement because of the Crystal behavior where it cleans up references to parameters). function AddParameterFieldEx(const name: WideString; const description: WideString; const editMask: WideString; const headingText: WideString; length: Integer; valueType: SlxFieldValueTypeEnum; fieldType: SlxParameterFieldTypeEnum; rangeKind: SlxParameterValueRangeKindEnum; defaultValueDisplayType: SlxDefaultValueDisplayType; allowCustomCurrentValues: WordBool; allowMultiValue: WordBool; allowNullValue: WordBool; isEditableOnPanel: WordBool; isNoValue: WordBool; isOptionalPrompt: WordBool; isShownOnPanel: WordBool; minimumValue: OleVariant; maximumValue: OleVariant; currentValues: OleVariant; defaultValues: OleVariant; initialValues: OleVariant): WideString; // Set a value on a the main report document (e.g. val can be a string, etc.). The SetParameterDiscreteValue() method is preferred. procedure SetParameterValue(const name: WideString; val: OleVariant); // Set a value on a subreport document (e.g. val can be a string, etc.). The SetSubReportParameterDiscreteValue() method is preferred. procedure SetSubReportParameterValue(const name: WideString; val: OleVariant; const subreport: WideString); // Set a discrete value on the main report document (e.g. value can be a string, etc.). procedure SetParameterDiscreteValue(const name: WideString; value: OleVariant); // Set a discrete value on a subreport document (e.g. value can be a string, etc.). procedure SetSubReportParameterDiscreteValue(const name: WideString; value: OleVariant; const subreport: WideString); // Set a range parameter on the main report document. procedure SetParameterRangeValue(const name: WideString; beginValue: OleVariant; endValue: OleVariant; lowerBoundType: SlxRangeBoundType; upperBoundType: SlxRangeBoundType); // Set a range parameter on a subreport document. procedure SetSubReportParameterRangeValue(const name: WideString; beginValue: OleVariant; endValue: OleVariant; lowerBoundType: SlxRangeBoundType; upperBoundType: SlxRangeBoundType; const subreport: WideString); // Show a report (e.g. parameters are optional). procedure Show(reuseParameterValuesOnRefresh: OleVariant; allParametersHaveBeenSet: OleVariant; hideExportButton: OleVariant; hidePrintButton: OleVariant; hideRefreshButton: OleVariant);
With regard to the Web, once the report has been loaded the Web has access to the native Crystal .NET ReportDocument via the SlxReport.NativeReportDocument property.
Note: The old report viewer is no longer valid. Reports can be displayed in the viewer using mCrystalReport.RDC.Show() (see ExportReportTo in SystemLX Report Controller for an example).
05-28-2014 09:52 AM
05-28-2014 10:57 AM
the PreCrystal Report WhenOpen now fires only when a DoInvoke is used.....
Now here's the BUG: when Application.BasicFunctions.DoInvoke is used the WhenClosed event now fires PRIOR to the Report being displayed\opened.
The Report Viewer in 8.1 is very slow compared to 7.5 when it's opening up....20+ seconds delta....
06-19-2014 09:22 AM
Sorry for the late reply and thank you for the bug report RJ. I believe the defect is due to the async behavior of the new viewer. Have you created a ticket for this? If not, I'll report it internally.
06-19-2014 10:39 AM
The following defect was created:
14096206: "When Application.BasicFunctions.DoInvoke is used the WhenClosed event now fires PRIOR to the Report being displayed\opened."
06-19-2014 11:33 AM
Thanks Mike for creating the Ticket! The new report viewer window isn't Modal (asynchronous) so that's why the OnClose\WhenClosed event isn't firing correctly......
Because we can't use hidden parameter dialog calls in the new Crystal Report API, we have gone back to the old tried and true method of inserting a Parameter Record that's part of the Crystal Query.....viewing the Report...and when we get back to the calling script delete the created Parameter Record.....
Other ways to skin that cat, and we certainly wish we could call Crystal without parameter dialogs and WITH parameters.....
10-28-2014 02:42 AM
The Report Viewer Saleslogix 8.1 is very slow in this version compare with version 7.5, 20 sec about to open the report..
Is there a solution for that ?
Thanks all for your help