Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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 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.
Posted
Updated 26-Oct-13 22:16pm
v2
Comments
Mycroft Holmes 27-Oct-13 6:07am    
It would seem reasonable to ask this on the Stimulsoft http://forum.stimulsoft.com/ forum!
coded007 28-Oct-13 2:22am    
Can you please track the SP's which you are passing through. I hope there is a variables which has zero size.

1 solution

roozbeh heydari wrote:
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.
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.
 
Share this answer
 
Comments
roozbeh heydari 29-Oct-13 3:04am    
tnx that's true
thatraja 29-Oct-13 3:06am    
so solved the issue?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900