Quantcast
Viewing all articles
Browse latest Browse all 3636

setting report parameters in asp.net page when getting report from CMC

Hello all,

 

I'm trying to view in a ASP.NET page, using CrystalReportViewer, a report with parameters stored in Crystal Server repository:

 

I'm trying to set programmatically parameters:

 

       CrystalReportViewer1.ReportSource = reportClientDocument;
               
        ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
        paramDiscreteValue.Value = 0; // p0;
       
        CrystalReportViewer1.ParameterFieldInfo[0].CurrentValues.Add(paramDiscreteValue);

 

But I found two problems with CMC: if I leave default CMC report settings about mandatory parameters (check box checked about mandatory parameters in property settings), in runtime always I get a prompt requesting parameters, even if I set them programmatically.

Otherwise, if I uncheck parameter prompt and I set default values, trying to override them in runtime, I get always report with default CMC values, even if I set other values in code!!

 

How I can set parameters in code without getting any prompt when getting report from Crystal Server 2013 CMC?

 

Thanks in advance

Guglielmo


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>