Tuesday, March 27, 2012
books online tutorial - why am i getting an error?
I am doing the MSDN Online tutorial "Accessing the Report Server Web Service
Using Visual Basic or Visual C#".
However, when I come to the 3rd step, Accessing the Web Service, and use the
supplied code, I get an error saying
"Namespace or type specified in the Imports
'GetPropertiesSample.ReportService2005' doesn't contain any public member or
cannot be found. Make sure the namespace or the type is defined and contains
at least one public member. Make sure the imported element name doesn't use
any aliases."
and
"Type 'ReportingService2005' is not defined."
This happens when using C# or VB.
What I am doing wrong?
ThanksSorry, I forgot to rename my project to GetPropertiesSample.
Works ok now.
"PacMan" wrote:
> Hi,
> I am doing the MSDN Online tutorial "Accessing the Report Server Web Service
> Using Visual Basic or Visual C#".
> However, when I come to the 3rd step, Accessing the Web Service, and use the
> supplied code, I get an error saying
> "Namespace or type specified in the Imports
> 'GetPropertiesSample.ReportService2005' doesn't contain any public member or
> cannot be found. Make sure the namespace or the type is defined and contains
> at least one public member. Make sure the imported element name doesn't use
> any aliases."
> and
> "Type 'ReportingService2005' is not defined."
> This happens when using C# or VB.
> What I am doing wrong?
> Thanks
Monday, March 19, 2012
Body BackgroundImage not displayed in browser
I have been trying to set up reports with a background image. The background displays correctly on the preview tab in Visual Studio, but is not visible when deployed to the report server and rendered in Internet Explorer.
However, if the report is printed, or exported to PDF or Excel, the background displays correctly.
It does not seem to make any difference if the image is external or embedded. Also, the problem only seems to affect the Body properties; a background image attached to a table, for example, seems to display correctly.
Has anybody else seen this behavior? I have not done extensive testing, but every report that I have tried seems to have the same problem. Is there a setting someplace that I am missing, or is this perhaps a bug in IE?
This sounds like a known issue in RS 2005 SP1 where the background images does not show up when rendering with the ReportViewer control. This was addressed in a Hotfix and will also be fixed in Visual Studio 2005 SP1.
-Chris
|||
I am running RS 2005 with SP2. When I render a RS report to Internet Explorer the background image still is not displaying, though the image does print. Exactly as described in the origional message. Any ideas?
Thanks!
Body BackgroundImage not displayed in browser
I have been trying to set up reports with a background image. The background displays correctly on the preview tab in Visual Studio, but is not visible when deployed to the report server and rendered in Internet Explorer.
However, if the report is printed, or exported to PDF or Excel, the background displays correctly.
It does not seem to make any difference if the image is external or embedded. Also, the problem only seems to affect the Body properties; a background image attached to a table, for example, seems to display correctly.
Has anybody else seen this behavior? I have not done extensive testing, but every report that I have tried seems to have the same problem. Is there a setting someplace that I am missing, or is this perhaps a bug in IE?
This sounds like a known issue in RS 2005 SP1 where the background images does not show up when rendering with the ReportViewer control. This was addressed in a Hotfix and will also be fixed in Visual Studio 2005 SP1.
-Chris
|||I am running RS 2005 with SP2. When I render a RS report to Internet Explorer the background image still is not displaying, though the image does print. Exactly as described in the origional message. Any ideas?
Thanks!
Friday, February 24, 2012
Blob and MFC
rver. I have a table that has a blob(image) column in it. The structure of t
he table is:
CREATE TABLE [dbo].[lbx_blob_1096] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Date] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Refno] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[imgData] [image] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
I have a Stored Procedure thru which I would like to insert data and image i
nto the table. The Stored Procedure is defined as follows:
CREATE proc dbo.CMS_sp_inserttoblobtable
@.blobtablename varchar(50),
@.valuesstr varchar(100),
@.resultparam int output
as
BEGIN TRAN INSERT_BLOBTABLE
DECLARE @.retval int
EXEC('INSERT INTO ' + @.blobtablename + ' (busdate,refno,imgData) VALUES ( '
+ @.valuesstr + ' )')
IF @.@.ERROR <> '0'
BEGIN
ROLLBACK TRAN INSERT_BLOBTABLE
END
ELSE
BEGIN
COMMIT TRAN INSERT_BLOBTABLE
SET @.resultparam = @.@.IDENTITY
END
SET @.retval = @.@.ERROR
RETURN @.retval
GO
I would like to know of a easy way to pass the image data from my MFC applic
ation to the Stored Procedure. Rightnow, I'm trying to use the SQLBindParame
ter as :
retValue = SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_BINARY, SQL_BIN
ARY,0, 0, (SQLPOINTER)s_ImgData, 0, &cbBinary);
But, I keep getting a datatype mismatch error. Can anybody please help me on
this?
Thanks,I don't think you can update BLOB fields from MFC using a SP. I think you'll
need to look into using the either the ADO GetChunk and AppendChunk methods
or the ADO Stream object. Here's a couple pieces of information that might
help:
http://support.microsoft.com/defaul...kb;en-us;189415
http://support.microsoft.com/defaul...kb;en-us;258038
Mike O.
"Mohan K" <anonymous@.discussions.microsoft.com> wrote in message
news:C8B747B6-7E2B-48A0-9219-DFF0500180AA@.microsoft.com...
> I'm using MFC(Visual C++ 6.0), SQL Server 2000 and ODBC to connect to SQL
Server. I have a table that has a blob(image) column in it. The structure of
the table is:
> CREATE TABLE [dbo].[lbx_blob_1096] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [Date] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NU
LL ,
> [Refno] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NU
LL ,
> [imgData] [image] NOT NULL
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> GO
> I have a Stored Procedure thru which I would like to insert data and image
into the table. The Stored Procedure is defined as follows:
> CREATE proc dbo.CMS_sp_inserttoblobtable
> @.blobtablename varchar(50),
> @.valuesstr varchar(100),
> @.resultparam int output
> as
> BEGIN TRAN INSERT_BLOBTABLE
> DECLARE @.retval int
> EXEC('INSERT INTO ' + @.blobtablename + ' (busdate,refno,imgData)
VALUES ( ' + @.valuesstr + ' )')
> IF @.@.ERROR <> '0'
> BEGIN
> ROLLBACK TRAN INSERT_BLOBTABLE
> END
> ELSE
> BEGIN
> COMMIT TRAN INSERT_BLOBTABLE
> SET @.resultparam = @.@.IDENTITY
> END
> SET @.retval = @.@.ERROR
> RETURN @.retval
> GO
> I would like to know of a easy way to pass the image data from my MFC
application to the Stored Procedure. Rightnow, I'm trying to use the
SQLBindParameter as :
> retValue = SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_BINARY,
SQL_BINARY,0, 0, (SQLPOINTER)s_ImgData, 0, &cbBinary);
> But, I keep getting a datatype mismatch error. Can anybody please help me
on this?
> Thanks,
Sunday, February 19, 2012
blank report - problems with datasource?
is blank.
My report's source is on MySql; I connect runtime and send datatable
to the report.
this is the rdlc file; I canceled some rows
[code]
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/
2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/
SQLServer/reporting/reportdesigner">
<PageWidth>21cm</PageWidth>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>21cm</InteractiveWidth>
<rd:GridSpacing>0.25cm</rd:GridSpacing>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ColumnSpacing>1cm</ColumnSpacing>
<ReportItems>
<Textbox Name="comune">
<Left>0.25cm</Left>
<Top>0.25cm</Top>
<rd:DefaultName>comune</rd:DefaultName>
<ZIndex>1</ZIndex>
<Width>14.25cm</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>0.63492cm</Height>
<Value>=First(Fields!comune.Value)</Value>
</Textbox>
<Textbox Name="textbox2">
<Left>15cm</Left>
<Top>0.25cm</Top>
<rd:DefaultName>textbox2</rd:DefaultName>
<Width>3.99471cm</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>1.00529cm</Height>
<Value>Scheda cliente</Value>
</Textbox>
</ReportItems>
<Height>25cm</Height>
</Body>
<rd:ReportID>2c8fb28d-af14-4a5f-b557-de3fbbfb5378</rd:ReportID>
<DataSources>
<DataSource Name="reminder_local">
<ConnectionProperties>
<ConnectString />
<DataProvider>OLEDB</DataProvider>
</ConnectionProperties>
<rd:DataSourceID>47284d9e-3aa3-4350-9732-405dc3c0abbf</
rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DSCliente">
<rd:DataSetInfo>
<rd:TableAdapterGetDataMethod>GetData</
rd:TableAdapterGetDataMethod>
<rd:DataSetName>dbDataSet</rd:DataSetName>
<rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
<rd:TableAdapterName>ProductsTableAdapter</
rd:TableAdapterName>
<rd:TableName>tbCliente</rd:TableName>
</rd:DataSetInfo>
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>select * from tbCliente</CommandText>
<DataSourceName>reminder_local</DataSourceName>
</Query>
<Fields>
<Field Name="id">
<rd:TypeName>System.Int64</rd:TypeName>
<DataField>id</DataField>
</Field>
<Field Name="ragsoc">
<rd:TypeName>System.String</rd:TypeName>
<DataField>ragsoc</DataField>
</Field>
<Field Name="via">
<rd:TypeName>System.String</rd:TypeName>
<DataField>via</DataField>
</Field>
<Field Name="comune">
<rd:TypeName>System.String</rd:TypeName>
<DataField>comune</DataField>
</Field>
<Field Name="prov">
<rd:TypeName>System.String</rd:TypeName>
<DataField>prov</DataField>
</Field>
</Fields>
... fields tolti...
</DataSet>
</DataSets>
<Width>20.25cm</Width>
<InteractiveHeight>29.7cm</InteractiveHeight>
<Language>en-US</Language>
<PageHeight>29.7cm</PageHeight>
</Report>
[/code]
and this is the page code loading the report
[code]
protected void Page_Load(object sender, EventArgs e)
{
DataSet dsCliente = new DataSet();
dsCliente.DataSetName = "DsCliente";
MySqlConnection mycnn = new
MySqlConnection(ConfigurationManager.ConnectionStrings["reminder_local"].ToString());
MySqlCommand cmd = new MySqlCommand();
MySqlDataAdapter DA = new MySqlDataAdapter();
cmd.Connection = mycnn;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new MySqlParameter("P_ID", 1));
cmd.Parameters.Add(new MySqlParameter("P_AncheAnnullati",
"True"));
cmd.CommandText = "spSelectClienteByID";
DA.SelectCommand = cmd;
DA.Fill(dsCliente);
dsCliente.Tables[0].TableName = "tbCliente";
rwScheda.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
rwScheda.LocalReport.ReportPath = MapPath("SchedeClienti.rdlc");
ReportDataSource rptDS = new ReportDataSource();
rptDS.Name = "DSCliente";
rptDS.Value = dsCliente.Tables[0];
rwScheda.LocalReport.DataSources.Add(rptDS);
rwScheda.DataBind();
//rwScheda.LocalReport.Refresh();
}
[/code]
I've already seen that in the table there is one record.
Why I don't see anything'I answer myself
I put the property AsyncRendering="false" on the reportviewer object
in the aspx page
and now works fine.