Jump to content
Sign in to follow this  
HQuintas

FyiReporting parameters

Recommended Posts

HQuintas

Oi

Não sei se é aqui o sitio certo, para colocar esta duvida. Penso que devia existir um tema Reports.

Estou começando a trabalhar com este Fyireporting e parece ser bom.

Alguém me sabe dizer como passar um parâmetro do tipo data, no "Data Type" escolhi "Date Time"

Já tentei no dataset  "SELECT linha, data, id, serv, chk FROM Serviço where CONVERT(nvarchar(10), data, 105)='29/12/2010'"

E Estou usando o SQLce.

Obrigado

Share this post


Link to post
Share on other sites
HQuintas

  Dim rdlViewer As New fyiReporting.RdlViewer.RdlViewer
        With rdlViewer
            .Height = Me.Height - 50
            .Width = Me.Width - 50
            .Top = 10
            .Left = 25
            .Anchor = System.Windows.Forms.AnchorStyles.Top Or _
                System.Windows.Forms.AnchorStyles.Bottom Or _
                System.Windows.Forms.AnchorStyles.Left Or _
             System.Windows.Forms.AnchorStyles.Right

             .Parameters = "MyDate='29-12-2010'"
            .SourceFile = "F:\My\TESTE.RDL"
            '.SaveAs("C:\tespdf.pdf", "pdf")

        End With
        Me.Controls.Add(rdlViewer)
        rdlViewer.Show()

Está dado os erros ao apresentar o report

Severity: 4 - Unable to connect to datasource 'DS1'.

Severity: 4 - Unable to connect to datasource 'DS1'.

No report tenho assim:

 <DataSources>
    <DataSource Name="DS1">
      <ConnectionProperties>
        <DataProvider>SQLCe</DataProvider>
        <ConnectString>Data Source='F:\My\bin\Debug\BASEDADOS.sdf';</ConnectString>
      </ConnectionProperties>
    </DataSource>
  </DataSources>


  <DataSets>
    <DataSet Name="Dados">
      <Query >
        <DataSourceName>DS1</DataSourceName>
        <CommandText>SELECT linha, data, id, serv, chk FROM Serviço where CONVERT(nvarchar(10),data, 105)=@MyDate</CommandText>
        <QueryParameters>
          <QueryParameter Name="MyDate">
            <Value>=Parameters!MyDate</Value>
          </QueryParameter>
        </QueryParameters>
      </Query>

Tenho que adicionar o datasource no codigo vb? como?

Share this post


Link to post
Share on other sites
HQuintas

ok

Encontrei que o problema

Eu copie o ficheiro System.Data.SqlServerCe.dll para o directoria \bin\debug e assim funciona bem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.