locked
Crystal report access from Newtork folder RRS feed

  • Question

  • User578734294 posted

    Hi Guys,

    I'm looking for a solution to run my crystal reports File is placed in network folder And I have to call the report and populate in ASP .net,C# Crystal reportviewer. 

    Please share the link,Ideas to achieve.

    Thanks

    Thursday, May 3, 2018 1:13 PM

All replies

  • User283571144 posted

    Hi Jayakumar,

    Could you please tell me more details about the network folder?In ftp folder or the share folder?

    Could you please post the network folder file path?

    If you could post more details information, it will be more easily for us to find the solution.

    Best Regards,

    Brando

    Friday, May 4, 2018 9:17 AM
  • User-37275327 posted

    Did you try like this

    using System;using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    
    // On the page load/Button click
    
    ReportDocument reportDocument = new ReportDocument();       
    string networkPath = "\\Networkpath\\CrystalReport.rpt";                
    reportDocument.Load(networkPath );  
    crystalReportViewer.ReportSource = reportDocument; 

    Sunday, May 6, 2018 5:37 AM
  • User578734294 posted

    Dear Brando, Thanks for your reply I'm accessing from Network folder.

    Dear Cnranasinghe, Thanks I acheived by using "Server.UrlPathEncode("\\Network path")".

    Now I'm facing issue how to pass a values to Formula fields dynamically.

    For Eg.: Imagine 2 reports are there Report A and Report B

    Report A has 2 formula fields - X and Y

    Report B has 2 formula fields - Y and Z

    When running the report A, I'm passing the below piece of code

                                  crReportDocument.DataDefinition.FormulaFields["X"].Text = "'"+x_Value+"'";

                                  crReportDocument.DataDefinition.FormulaFields["Y"].Text = "'"+y_Value+"'";

    When running the report B, I'm passing the below piece of code

                                  crReportDocument.DataDefinition.FormulaFields["Y"].Text = "'"+y_Value+"'";

                                  crReportDocument.DataDefinition.FormulaFields["Z"].Text = "'"+z_Value+"'";

    My question is

                    (1) Can we handle formula fields dynamically when running the report.

                    (2) Depends on the report The formula field has to dynamically select and pass to respective reports.

    Tuesday, May 8, 2018 9:41 AM