I am trying to find out if my solution is correct, and if so, if there is anything else I should be aware of. Or, If there is a better way, what might that be ? If this is wrong (even though it builds) what is the correct way of doing this ?
This is the fill error i was getting after i added a parameter to one of the tables in the report.
In my report.xsd, I found the Fill method in the xsd's Designer.cs.
this is what I did. I found the method holding the two parameters. It included the datatable as a parm and the MemberParm which is the name I gave the new parameter in this report.
I copied this method .......
To here. Then, I just commented out the signiture line and replaced it with a line that only included the datatable parm, now. Of course I had to comment out the two lines pertaining to the MemberParm as well, now I had a fill method with one parm .......
(the lines I commented out start with // iqworks)
I placed the cursor over the class lib name, right clicked and hit Build, the build was successful this time.
I saw posts that lead me to documentation that told me "I needed to add a method" but it never told me "where to go to add the method" ?
Anyway, is there anything else I need to do ?
Seems like this should automatically be done just like it automatically adds or changes the original one method with the new parameter ? Not sure ?
11 Answers, 1 is accepted
The dataset files should not be modified manually and you should always use the dataset designer for such purposes. We cannot conclude what is it you're trying to achieve from the information you've provided, but we've certainly not advised to alter the dataset files by hand. If you're binding the report to your own dataset (i.e. not created by the report wizard), then you need to add the Fill method for the dataset in the report constructor (which is what the report wizard does automatically for you) i.e.:
catch (System.Exception ex)
// An error has occurred while filling the data set. Please check the exception for more information.
If still having problems, please start by explaining what is it you're trying to achieve and how you've got there.
the Telerik team
I saw the only Fill method I had having the default param and the new param I added.
If my last response was not clear, and I cannot send you a print screen, here is what I did and here is the error I got ....
In the designer (report wizard), I called up an existing report,
1) Right clicked on the dataset that was in the pane under the "Row Groups" and
2) Selected "Edit in dataset designer".
3) Right clicked on the dataset and selected "Configure".
4) Added a new Parameter to the SQL (@MemberParm).
5) Tried to preview the report.
6) Got the error message:
No overload for method 'Fill' takes '1' arguments.
Your last post said it should add the fill() method for me automatically. This was true for me when I created the report and the initial this initial dataset, but for some reason, adding a parm caused the program to take the original Fill method and add the new parm to IT ! Thus leaving the class without a method with the original one parm signiture. If this process was to have resulted in TWO
Fill methods now, it did not do it here. I am not sure why.
From reading documentation, I did not see where or how to use the designer to add a Fill() method with the correct signiture ? I guess that may be because it was suppose to do it automatically. Thats why I thought I had to find where and how to do it myself.
I guess I understand what you mean when you say i should not alter the dataset by hand, but then you say I need to go in an add the Fill method. I think what you are saying is that if I use the report wizard, I shouldnt have to add anything, but In my case, I am using the designer as you can see, but I get the error that leads me to believe that I still need to add the method manually ?
Perhaps there is something I am missing ?
Not sure what I need to do here - can you advise me ?
thanks for your time with this.
The problem is all of the lines that say ...
have a blue underline. Hovering over this underline displays ...
"No overload for method 'Fill' takes '1' arguments"
Thank you for the clarification - it seems that your confusion comes from the fact that you've added a WHERE clause in your SQL query i.e. added a MemberParm parameter, which of course means that the Fill method would not require a second argument - value for the introduced param in your query. Changes to an already existing dataset are not tracked by the report and that is the reason the Fill method has not changed in the try-catch block. We noticed that in your report constructor you have multiple Fill methods that all fill the iqBodyWorksV02DataSetEquipmentSummaryTable, so please remove all replicas and leave a single try-catch block for that table.
Now if you place a comma after iqBodyWorksV02DataSetEquipmentSummaryTable, Intellisense should show you that the Fill method expects a second argument for the MemberParm parameter, which you need to specify.
I've prepared a sample report that uses as datasource, a dataset that is not created by the report wizard (i.e. manually added parameter) and shows you how the Fill method should look like.
the Telerik team
Thanks very much for the explanation on the Fill method, it was very helpful. And for the sample project.
I loaded the project you sent into my VS2008, I added the Telerik.Report.Processing to the references, but I ran into a problem calling up the Report1.cs. It has using Telerik.Reporting.Drawing; But I get "The type or namespace name 'Drawing' does not exist in the namespace"..
. But I am using this Telerik.Reporting.Drawing namespace no problem in the other report (the one I sent you) I have in my other project. I know this is probably simple, but can you tell me where or what to do to have this recognized in your sample project ?
this is my report .... (My project name is also iqReports_lib).
This is from the project you sent me (In VS2008, the "Drawing" and the "Report" in "Telerik.Reporting.Report" are underlined in
blue ? .... I used the project name "SampleDSimmons" the way I recieved it, so, it is not named "MasterDetailNeedDataSource " , this may have something to do with it ? I tried to rename the "SampleDSimmons" project to "MasterDetailNeedDataSource " but that build failed with the same message ?
Also, Thanks for your advice ....
The sample I've sent is runnable out of the box. The problem is that you're obviously using an older version of the product, since in Q2 we've decreased the number of assemblies to 3: Telerik.Reporting, Telerik.ReportViewer.WinForms and Telerik.ReportViewer.WebForms, having in mind that the last two are used depending on the type of project you're working on. Telerik.Report.Processing assembly is not merged into Telerik Reporting, so simply upgrade to the latest version and run the project as is without adding to other existing solutions - no need for changing namespaces is required.
the Telerik team
I will upgrade between today and tommorrow and try again.
Which and where is the best place to go for the correct upgrade ? Do I have to apply each upgrade until I get to the latest version ? Or can I just upgrade to the latest version ?
I am anxious to learn how my basic reporting environment should be.
You can install Q2 SP1 directly and use the Upgrade Wizard to take care of the updates for you. The only thing you might need to do is remove obsolete assemblies from the references as they no longer exist e.g. Telerik.Reporting.Processing.dll etc.
the Telerik team
Got sidetracked today ...
I think I am suppose to download and apply ? (Then run the wizard from the Telerik menu option in my VS2008)......
Q2 2009 SP1 (version 22.214.171.1247)
8/7/2009 12:00:00 AM
I am thinking this SP1 is just for Telerik Reporting, not for all RadControls - Is there one for all RadControls ?
Any place I can go to read about Telerik service packs and how to apply them ?
It Shows an msi file 47MB Latest Version 2009.2.807 (Aug 7, 2009) - IS THIS WHAT I NEED TO
DOWNLOAD AND IS THIS THE REPORTING SP1 THAT I NEED ? IF SO, I GUESS I WILL RUN
THE WIZARD AFTER DOWNLOADING AND APPLYING THIS msi ?