how to manually register a 32 bit version of SqlDmo.dll?

1.5k Views Asked by At

I am making my first Crystal report but I am getting the error Retrieving the COM class factory for component with CLSID {10020100-E260-11CF-AE68-00AA004A34D5} failed due to the following error: 80040154.

My Code is:

FrmRptPrint.ShowReport(@"~\Crystal Reports\RegInfo_Receipts.rpt", Datatable);

and

    public static bool ShowReport(string RptFileName, DataTable reportData, string[] ParamFieldNames, object[] ParamFieldValues)
    {
        FrmRptPrint FrmRptPrint = new FrmRptPrint();

        FrmRptPrint.InitReport(RptFileName, reportData, ParamFieldNames, ParamFieldValues);

        FrmRptPrint.ShowDialog();

        return true;
    }


    public bool InitReport(string RptFileName, DataTable reportData, string[] ParamFieldNames, object[] ParamFieldValues)
    {
        if (RptFileName.StartsWith("~"))
        {
            RptFileName = Environment.CurrentDirectory.ToString() + RptFileName.Substring(2 - 1);
        }
        cryRpt.Load(RptFileName);
        this.UpdateConnString();
        cryRpt.SetDataSource(reportData);

        this.UpdateParamField(ParamFieldNames, ParamFieldValues);
        cryRpt.Refresh();
        Rptviewer.ReportSource = cryRpt;
        Rptviewer.Refresh();
        return true;
    }

I am using Sql server 2008 and Visual Studio 2010 and my PC is 32-bit

0

There are 0 best solutions below