Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Nickel Contributor
Posts: 90
Registered: ‎03-20-2009

Re: Saleslogix 8.1 Web upgrade - Error running Reports

John,

 

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....

Jim Pemberton
Vice President of Engineering
Simplesoft Solutions, Inc
Award Winning Infor CRM Business Partner
Gold Super Contributor
Posts: 3,087
Registered: ‎03-19-2009

Re: Saleslogix 8.1 Web upgrade - Error running Reports

@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.

 

--
RJ Ledger - rjledger@rjlSystems.net +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Silver Contributor
Posts: 835
Registered: ‎03-24-2009

Re: Saleslogix 8.1 Web upgrade - Error running Reports

There you go.....wht the vb 6.0 is trying to do is the same as the C# .Net:

Set the Parameters Name Value PairS in the Crystal Reports Object

Then set the Report Viewer Object with these Parameters......
ReportViewer.Show.

I don't see where we do that in the 8.1 Crystal Reports classes.
RJ Samp
Employee
Posts: 629
Registered: ‎04-24-2009

Re: Saleslogix 8.1 Web upgrade - Error running Reports

[ Edited ]

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 SystemSmiley FrustratedLX Report Controller for an example).

 

Thanks

 

Mike

Gold Super Contributor
Posts: 3,087
Registered: ‎03-19-2009

Re: Saleslogix 8.1 Web upgrade - Error running Reports

Great info, Mike! .. Thanks!

 

We'll should be able to dig our way thru it now that we know what is (really) there.

--
RJ Ledger - rjledger@rjlSystems.net +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Silver Contributor
Posts: 835
Registered: ‎03-24-2009

Re: Saleslogix 8.1 Web upgrade - Error running Reports

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....

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

Re: Saleslogix 8.1 Web upgrade - Error running Reports

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.

 

Thanks

 

Mike

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

Re: Saleslogix 8.1 Web upgrade - Error running Reports

The following defect was created:

 

14096206: "When Application.BasicFunctions.DoInvoke is used the WhenClosed event now fires PRIOR to the Report being displayed\opened."

 

Thanks

 

Mike

Silver Contributor
Posts: 835
Registered: ‎03-24-2009

Re: Saleslogix 8.1 Web upgrade - Error running Reports

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.....

RJ Samp
New Member
Posts: 1
Registered: ‎06-17-2013

Re: Saleslogix 8.1 Web upgrade - Error running Reports

Hello

 

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

 

o/

RV