如何将参数发送到stimulsoft中的存储过程? [英] How do i send parameters to stored procedure in stimulsoft?

查看:111
本文介绍了如何将参数发送到stimulsoft中的存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public virtual ActionResult GetReportSnapshot()
    {
       var data = (ComparativeBalanceReportDS) TempData["ComparativeSession"];


        StiReport report = new StiReport();
        report.Load(Server.MapPath("~/Content/StimulReports/SampleReport.mrt"));

        report.Compile();

        report["fromDocumentNumber"] = "1";
        report["toDocumentNumber"] = "85";
        return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);}



i有存储过程并执行设计师,但我不发送参数,当运行App =>错误:SqlCommand.Prepare方法要求所有可变长度参数都具有显式设置的非零大小。


i have stored procedure and execute in designer but i do not send parameters to it and when run App=> Error:SqlCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.

推荐答案

roozbeh heydari写道:
roozbeh heydari wrote:

我有存储过程并在设计器中执行,但我不向它发送参数,当运行App =>错误: SqlCommand.Prepare方法要求所有可变长度参数都具有显式设置的非零大小

i have stored procedure and execute in designer but i do not send parameters to it and when run App=> Error:SqlCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.

此错误与 Sql命令类有关。您需要指定参数的长度。检查 SqlCommand.Prepare方法 [ ^ ]。



在查看报告之前,只需确保从存储过程的输出中获取任何数据。

This error is related to Sql command class. You need to specify the length of parameters. Check SqlCommand.Prepare Method[^].

Before viewing report, just ensure you're getting any data from stored procedure's output.


这篇关于如何将参数发送到stimulsoft中的存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆