c# - crystal Reports issue -


i have below code passing parametrs open crsytal report. when opens crystal report asking parameters again show report.

        reportdocument cryrpt = new reportdocument();         tablelogoninfos crtablelogoninfos = new tablelogoninfos();         tablelogoninfo crtablelogoninfo = new tablelogoninfo();         connectioninfo crconnectioninfo = new connectioninfo();         tables crtables;         cryrpt.load(server.mappath("dmtr1.rpt"));         crconnectioninfo.servername = m_strconnectionstring.split(';')[0].split('=')[1];          crconnectioninfo.databasename = m_strconnectionstring.split(';')[1].split('=')[1];          crconnectioninfo.userid = m_strconnectionstring.split(';')[2].split('=')[1];          crconnectioninfo.password = m_strconnectionstring.split(';')[3].split('=')[1];          crtables = cryrpt.database.tables;         foreach (crystaldecisions.crystalreports.engine.table crtable in crtables)         {             crtablelogoninfo = crtable.logoninfo;             crtablelogoninfo.connectioninfo = crconnectioninfo;             crtable.applylogoninfo(crtablelogoninfo);         }         cryrpt.setparametervalue("@receiveddate", convert.todatetime("06/21/2013"));         cryrpt.setparametervalue("@transferdate", convert.todatetime("08/21/2013"));         crysview.reportsource = cryrpt;         crysview.refreshreport(); 

you need replace crysview.refreshreport(); crysview.databind();.


Comments