i have question please and need your help
i have developed Custom Reporting item , i have make simple user control and sure it is done in win form , and then i took this control and have made design time component and run time component and i deploy me item,and it appear in report item toolbox , but when i tried to drag this control in the report there is an error appear : the method or operation is not implemented
please can any one tell me what is the cause of this error
best regards,
9 2194
Sounds like something in the in the Constructor trying to do it's job before the item is loaded.
Can you move code from the constructor to the Load event?
If you have custom/override on the On_Paint event, that could also be a source of the problem.
Dear tlhintoq :
thanks for your fast reply , actually my constructor dont' do job excpet intilze varabile , and about on paint event could you please explain in more detial what do you mean by this cause
this is my design time class - public class mapDesigner : CustomReportItemDesigner
-
{
-
private mapControl map_control;
-
private DesignerVerbCollection _verbs;
-
-
public mapDesigner()
-
{
-
map_control = new mapControl();
-
}
-
-
public override void InitializeNewComponent()
-
{
-
SetDefaults();
-
}
-
-
public void SetDefaults()
-
{
-
// intial values
-
Microsoft.ReportDesigner.Drawing.ReportColor outlineColor = new Microsoft.ReportDesigner.Drawing.ReportColor();
-
outlineColor.ColorRgb = Color.Black;
-
this.Style.BorderColor.Default = outlineColor;
-
Microsoft.ReportDesigner.Drawing.ReportColor barColor = new Microsoft.ReportDesigner.Drawing.ReportColor();
-
barColor.ColorRgb = Color.Green;
-
this.Style.Color = barColor;
-
IComponentChangeService changeSvc = (IComponentChangeService)this.Site.GetService(typeof(IComponentChangeService));
-
changeSvc.OnComponentChanged(this, null, null, null);
-
}
-
-
// OVERIDE METHODS
-
// override onpaint
-
public override void OnPaint(PaintEventArgs e)
-
{
-
// give control some values
-
map_control.FillColor= this.Style.BorderColor.Default.ColorRgb;
-
map_control.Height = this.Height.Pixels;
-
map_control.Width = this.Width.Pixels;
-
map_control.DrawControl(e.Graphics);
-
}
-
-
// override default size
-
public override Microsoft.ReportDesigner.Drawing.DesignSize DefaultSize
-
{
-
get
-
{
-
return new Microsoft.ReportDesigner.Drawing.DesignSize(new RSDrawing.Unit(150),new RSDrawing.Unit(30));
-
}
-
}
-
-
public override Adornment Adornment { get { throw new NotImplementedException(); } }
-
public override DesignerVerbCollection Verbs
-
{
-
get
-
{
-
if (_verbs == null)
-
{
-
_verbs = new DesignerVerbCollection();
-
_verbs.Add(new DesignerVerb("Reset Defaults", new EventHandler(OnCustomAction)));
-
}
-
-
return _verbs;
-
}
-
}
-
-
private void OnCustomAction(object sender, EventArgs e)
-
{
-
switch (((System.ComponentModel.Design.DesignerVerb)sender).Text)
-
{
-
case "Reset Defaults": SetDefaults(); Invalidate(); break;
-
default: MessageBox.Show("Not supported"); break;
-
-
}
-
}
-
-
-
//
-
public override void BeginEdit() { }
-
public override void Dispose() { }
-
protected override void Dispose(bool disposing) { }
-
public override void DoDefaultAction() { }
-
public override void EndEdit() { }
-
public override void OnBackgroundColorChanged() { }
-
public override void OnColorChanged() { }
-
public override void OnDragDrop(DragEventArgs e) { }
-
public override void OnDragEnter(DragEventArgs e) { }
-
public override void OnDragLeave(EventArgs e) { }
-
public override void OnDragOver(DragEventArgs e) { }
-
public override void OnFontChanged() { }
-
public override void OnLocationChanged() { }
-
public override void OnPaddingChanged() { }
-
-
public override void OnSizeChanged() { }
-
public override void OnTextAlignChanged() { }
-
public override void OnTextDecorationChanged() { }
-
public override bool ShowContextMenu(int x, int y)
-
{
-
return true;
-
}
-
}
-
hint : i override all these methods cause they are virtual in parent class (do i have to do so???)
and this is my run time class :
can you please tell me if i have problem on this implementation
Best Regards
TIP: When you first created your question you were asked to wrap your code with [code] tags. It really does help a bunch. Look how much easier it is to read now that someone has done it for you. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
Personally, I wouldn't do this - map_control.Height = this.Height.Pixels;
-
map_control.Width = this.Width.Pixels;
in the OnPaint. It means you are sizing every time the control is painted. I would put it in the SizeChangeCompleted event. So when your parent control is resized, so is the encapsulated child control... but not every time it is painted.
Things like this can cause a problem with the designer. As soon as the designer tries to paint this control, your OnPaint override is executed. But if 'this' doesn't exist... then you cannot do this.width .. and so on.
See how this trickles down?
thank you for this advice , it really help - public mapDesigner()
-
{
-
map_control = new mapControl();
-
}
Just as a test, comment out this part. Don't make the mapControl when you make the Designer.
I've had this be a problem in a few cases when I nested one control inside another. The constructor for the nested control had some issue because it couldn't find a DLL it was dependent on in the new parent project and so on.
@tlhintoq
i have done it , the same error appear when i drag the control to report layout , do you think this may be problem in deployment , let me say my steps in deploy :
1- i have copy the CRI dll to 2 folders
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies
&&
C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin
2- i have copy in the RSReportDesigner this -
<ReportItems>
-
<ReportItem Name="mapControl" Type="MapCRI.mapRender,MapCRI"/>
-
</ReportItems>
-
-
-
<ReportItemDesigner>
-
<ReportItem Name="mapControl" Type="MapCRI.mapDesigner,MapCRI"/>
-
-
where MapCRI is the namespace and mapDesigner , mapRender classes inside this solution
3- copy in rsreportserver this : -
-
<ReportItem Name="mapControl" Type="MapCRI.mapRender,MapCRI"/>
-
-
in
in rssrvpolicy
<CodeGroup class="UnionCodeGroup" version="1" Name="CRICodeGroup" Description="Code group for the ProgressTracker CRI" PermissionSetName="FullTrust">
<IMembershipCondition class="UrlMembershipCondition" version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10.SQLSERVER2008\Reporting Services\ReportServer\bin\MapCRI.dll"/>
is that the compelete deploy
Sign in to post your reply or Sign up for a free account.
Similar topics
by: flecki |
last post by:
I have the following Question:
Is it possible to install a Reporting Service at IIS Webserver without
SQL Server 2000 on the same machine.
We have a Enterprise SQL Server at another machine...
|
by: ferit meftun harmankaya |
last post by:
I have some report which are designed in "Crystal Report". I want to run
these reports in "Reporting Service"
My aim is to convert from extension of Crystal Report (rpt) to extension of
reporting...
|
by: Krish |
last post by:
Hi,
I tried to Develop one Report in SQL Reporting Service. I have
installed SQL Reporting Serivice in Windows 2003 machine. SQL Server
Database is in another machine, running on Windows 2000. I...
|
by: hotice3100 |
last post by:
I have created an interface for a SQL Reporting Service report. SQL Reporting
Service makes a virutal directly in IIS called ReportServer.
There are various buttons on the form I created and one...
|
by: ad |
last post by:
I found that there is reporting service bundle with SQLSever 2005 express.
Can VS2005 express can use the reporting service in SQLSever 2005 express?
|
by: holly |
last post by:
Does anyone know a good newsgroup that I can ask question
about sql reporting service? Thanks
|
by: RdS |
last post by:
Hello,
I use sourcesafe and vb 2003 for my dev environment. on the sourcesafe
server I also have sql2005 and reporting services installed. The web app
references this sql server for db. When...
|
by: refv8 |
last post by:
Hi im working on aplications with Form authentication where the users
is from a Active Directory in one server inside the Domain, i want to
see using the ReportViewer to see the report hosted in...
|
by: jack |
last post by:
Hi
Our team is developing reports using sql reporting service 2005. We
all are new in this area.
I would be glad if any one suggest me the integration of asp.net and
sql reporting service.
...
|
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= |
last post by:
I am using reporting service with asp.net.
I want to save a report snapshot in some time.
How do I do this in asp.net? Is there any web service to do this?
Thanks in advance!
-Billy
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |