.NET Framework - Bild in .rdlc-Datei

Asked By Uwe Conradi
31-Jan-10 03:36 AM
Hallo zusammen,
Ich m?chte den Anwendern die M?glichkeit geben, ein Logo-Bild in den Bericht
einzubinden. So ist mein Code:
ReportViewer1.LocalReport.EnableExternalImages = True
Dim filepath As Uri
filepath = New Uri("D:\vb\SQL\images\image.bmp")
Dim par1 As New ReportParameter("path", filepath.AbsolutePath)
Dim pars(0) As ReportParameter
pars(0) = par1
ReportViewer1.LocalReport.SetParameters(pars)

Und im  rdlc Designer habe ich gesetzt:
source=external
and
value==Parameters!path.Value
Trotzdem sehe ich kein Bild.
Die Umgebung: VS 2008 professional, MS SQL Server Express,  Windows 7.
Danke f?r eure Tips!
Uwe
ReportViewer1.LocalReport.EnableExternalImages
(1)
ReportViewer1.LocalReport.SetParameters
(1)
SQL Server
(1)
ReportViewer1.LocalReport.Refresh
(1)
Request.Url.GetLeftPart
(1)
Windows 7
(1)
UriPartial.Authority
(1)
Page.ResolveUrl
(1)
  Rolf replied to Uwe Conradi
02-Mar-10 07:03 AM
Mein Code:

Dim Param(0 To 0) As ReportParameter
Param(0) = New ReportParameter("Report_Parameter_0",
Request.Url.GetLeftPart(UriPartial.Authority) +
Page.ResolveUrl("~/tpc_Cobranding.jpg"))
ReportViewer1.LocalReport.EnableExternalImages = True
ReportViewer1.LocalReport.SetParameters(Param)
ReportViewer1.LocalReport.Refresh()

Gruss
Rolf
Create New Account
help
LINQ to SQL + SQL Server 7 .NET Framework Hello, I am trying to work with MS SQL Server 7 from the release version of Visual Studio 2008 + LINQ to SQL. And the problem is that the LINQ to SQL designer doesn't accept my tables saying that my connection provider is unsupported. Then I found out that LINQ to SQL officially supports only .NET Provider for SQL Server. The problem is that SQL Server 7 can't work with this provider, so I have to use the .NET
lo probé con DBGRID y TRUEDBGRID) que está relacionada con un DATA con el siguiente sql SELECT E.*, A.NumeroDoc, A.Apellido, A.Id, T.Detalle, C.Detalle FROM Expedientes E update o un insert no refresca la grilla, para eso estoy usando por ej. 100 sql = "UPDATE Expedientes SET idTipo = " & Val(ComboTipo.BoundText) & 102 sql = sql & "IdClasificacion = " & Val(ComboClasif.BoundText) & ", " 104 sql = sql & "FechaInicio = #" & Format(FechaI.Value, "mm / dd / yyyy") & 106 sql = sql & "FechaRecepcion = #" & Format(FechaR.Value, "mm / dd / yyyy") & 108 sql = sql & "Tema = '" & txtTema.Text & "', " 110 sql
SQL Parameterized Command versus Custom String .NET Framework Quick question all, I have a bad habit where I still write my SQL command code like so: string sql; sql = Properties.Settings.Default.PROC_MyProc; sql + = "@Param1 = '" + param1 + "'"; sql + = " , @Param2 = " + param2.ToString(); sql + = "@Param3 = '" + param3 + "'"; sql + = " , @Param4 = " + param4.ToString(); if([some coondition]) { sql + = "@Param5 = '" + param5 + "'"; } / / Execute sql I always have a