Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Reporting & Notification Forums - Reporting
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Reporting | New ThreadView:  Search:  
 Author  Thread: Open extern crystal report with parameter in SLX 7.5.4
mygush
Posts: 1
 
Open extern crystal report with parameter in SLX 7.5.4Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jul 13 9:50 AM

Hello,


I wan't to know if it's possible de open à Crystal Report note save in the database SLX but in a repertory on the server as a "CrystalReportViewer" in a .net application. In fact, I wan't to preview and print a report in a click action button on my form. To print the informations of my form, I add a parameter in my report and set the value in my code as this :



Sage.Entity.Interfaces.IRequestSampleDoc rsd = form.CurrentEntity as Sage.Entity.Interfaces.IRequestSampleDoc;<br />            <br />            if(rsd != null)
            {   
                ReportDocument report = new ReportDocument();
                report.Load("E:\\Saleslogix\\Reports\\DemandeEchDoc.rpt");
                CrystalReportViewer crystalReportViewer1 = new CrystalReportViewer();
                crystalReportViewer1.ReportSource = report;
                report.SetParameterValue("idRequest", rsd.Id);
               
                ParameterFieldDefinitions crParameterFieldDefinitions ;
                ParameterFieldDefinition crParameterFieldDefinition ;
                ParameterValues crParameterValues = new ParameterValues();
                ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();           
               
                crParameterDiscreteValue.Value = rsd.Id;
                crParameterFieldDefinitions = report.DataDefinition.ParameterFields;
                crParameterFieldDefinition = crParameterFieldDefinitions["idRequest"];
                crParameterValues = crParameterFieldDefinition.CurrentValues;
   
                crParameterValues.Clear();
                crParameterValues.Add(crParameterDiscreteValue);
                crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
               
                CrystalDecisions.Web.CrystalReportViewer crystalReportViewer1 = new CrystalDecisions.Web.CrystalReportViewer();
                crystalReportViewer1.ReportSource = report;
                crystalReportViewer1.RefreshReport();
            }


But my report will not open and I don't have any error that can help me for debug...
Can you help me please ?
Thanks in advance for your response!

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 12:26:01 AM