Crystal Reports - “The report you requested requires further information”

前端 未结 9 1436
梦如初夏
梦如初夏 2021-01-07 08:34

I have some Crystal Reports that were created using Crystal (external to Visual Studio) and are now loaded in the VS project. Before the report is previewed I set up the rep

9条回答
  •  醉梦人生
    2021-01-07 08:41

    If you have added the logon info as follows,

            LogInfo.ConnectionInfo.ServerName = "mcqueen";
            LogInfo.ConnectionInfo.Password = "abc123";
            LogInfo.ConnectionInfo.UserID = "sa";
            LogInfo.ConnectionInfo.DatabaseName = "tbboss";
    
            crysViewer.LogOnInfo.Add(LogInfo);
    

    simply put the crysViewer.LogOnInfo.Add(LogInfo); at the end of crystal Viewer parameter settings. Like follows.

        LogInfo.ConnectionInfo.ServerName = "mcqueen";
        LogInfo.ConnectionInfo.Password = "abc123";
        LogInfo.ConnectionInfo.UserID = "sa";
        LogInfo.ConnectionInfo.DatabaseName = "tbboss";
    
    
        int exportFormatFlags =(int)(CrystalDecisions.Shared.ViewerExportFormats.PdfFormat | CrystalDecisions.Shared.ViewerExportFormats.ExcelFormat);
        crysViewer.AllowedExportFormats = exportFormatFlags;
        crysViewer.ReportSource = Server.MapPath("Reports/Report1.rpt");
        crysViewer.ParameterFieldInfo = paramFields;
    
        crysViewer.LogOnInfo.Add(LogInfo);
    

提交回复
热议问题