Jump to content
Fórum Script Brasil
  • 0

Ajuda URGENTE - "Missing parameter values" VB.NET


Leonardo Moura

Question

Olá galera, estou tentando mexer com Crystal Report e não estou conseguindo. Tenho um relatório funcionando e me foi solicitado um botão para geração do relatório em EXCEL. Esta dando o seguinte erro:

"

Missing parameter values.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Missing parameter values.

"

O Código é o seguinte:

Sub btExportar_OnClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btExportar.Click

        crsDAGeral.Report.Parameters.Item(0).DefaultValue = ddlMeses.SelectedValue
        crsDAGeral.Report.Parameters.Item(1).DefaultValue = ddlAnos.SelectedValue

        crsDAGeral.ReportDocument.Refresh()


        Dim objExport As New System.IO.MemoryStream

        objExport = crsDAGeral.ReportDocument.ExportToStream(ExportFormatType.Excel)
    
    End Sub
MEU ASPX:
.
.
.
 <CR:CrystalReportSource ID="crsDAGeral" runat="server">
            <Report FileName="DA_Geral_2003.rpt">
                <Parameters>
                    <CR:Parameter Name="@Mes" DefaultValue="1" ConvertEmptyStringToNull="False" ReportName="" />
                    <CR:Parameter Name="@Ano_Fiscal" DefaultValue="2011" ConvertEmptyStringToNull="False" ReportName="" />
                </Parameters>
            </Report>
 </CR:CrystalReportSource>

<CR:CrystalReportViewer ID="crvRelatorioGeral" runat="server" 
            AutoDataBind="true" ReportSourceID="crsDAGeral" 
            HasCrystalLogo="False" HasRefreshButton="True" DisplayToolbar="False" 
            DisplayGroupTree="False" EnableDatabaseLogonPrompt="true" Width="100%" BestFitPage="True"/>
.
.
.

O qu estou fazendo de errado?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      652k
×
×
  • Create New...