473,786 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Operation Illegal on Linked Parameters C# and .Net

26 New Member
Hello. Good day. I have this problem with my current program right now. I have a separate report created in Seagate Crystal Reports, and I'm integrating it to my program in C#.

I'm using CrystalDecision s and calls the ReportDocument class.

Under that report, I have many subreports. What I want to do is to select ALL the fields in the MAIN report and put it in the DataTable, then I would put that DataTable as the DataSource of my ReportDocument. The problem is, when I set a value to any of my subreport parameters, I am getting an error "Operation Illegal on Linked Parameters".. Any help? Thanks!
Mar 1 '10 #1
1 3776
kurtzky
26 New Member
ok this is my code snippet, just to elaborate my problem above, which is the Operation Illegal on Linked Parameter. I use this logic in order to load my report faster:


=============== =============== =============== =========

DataTable dtQuery = new DataTable();
ReportDocument rdt = new ReportDocument( );
rdt.Load(@"C:\R eports\Items.rp t");

string sql = "SELECT order_no, supplier_no, item_no, qty FROM Items WHERE order_no IN IN ('" + ord_no + "') "; //ord_no is a string, contains the order numbers to be printed, example is ord_no = (''1234', '3432', '2346');
dtQuery = Database.GetDat aTable("Server1 ", sql); //GetDataTable is a function under Database class, Server1 sample name only
rdt.SetDataSour ce(dtQuery);
rdt.SetParamete rValue("OrderNo ", arr); //arr is an array, so it's possible to have many OrderNo to be printed in the report; this is the Main report's parameter

ParameterDiscre teValue paramDiscreteVa lue = new ParameterDiscre teValue();
DataDefinition DataDef = rdt.DataDefinit ion;
ParameterFieldD efinitions pm = DataDef.Paramet erFields;
ParameterFieldD efinition Param1; //Param1 & Param2 are my subreport parameters
ParameterFieldD efinition Param2;
for (int i = 0; i < dtQuery.Rows.Co unt; i++)
{
Param1 = pm["Pm-supplier_no", "Supplier"]; //Supplier is a subreport
paramDiscreteVa lue.Value = dtQuery.Rows[i]["supplier_n o"].ToString();
Param1.CurrentV alues.Add(param DiscreteValue);
Param1.ApplyCur rentValues(Para m1.CurrentValue s);

Param2 = pm["Pm-item_no", "ItemDesc"]; //ItemDesc is another subreport which takes item_no as the parameter
paramDiscreteVa lue.Value = dtQuery.Rows[i]["item_no"].ToString();
Param2.CurrentV alues.Add(param DiscreteValue);
Param2.ApplyCur rentValues(Para m2.CurrentValue s);
}

=============== =============== =============== =========

Notes:
- In my Supplier subreport, I have a parameter called Pm-supplier_no. This is the link to the MAIN report's supplier_no field. This subreport will display all the supplier details. In this subreport's Record Selection, I have SupplierTable.s upplier_no = {?Pm-supplier_no}

- In my ItemDesc subreport, I have also a parameter called Pm-item_no. This is another link to the MAIN report's item_no. This subrepot will display all the item details. The reason why I have a for loop is that it's possible to have many items in the main report, so I have to pass also the exact number of items to its subreport. In this subreport's Record Selection, I have ItemTable.item_ no = {?Pm-item_no}.


Thanks a lot! Any help will be appreciated!
Mar 1 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1900
by: rob | last post by:
Dear All, I am getting an error "Illegal cross-thread operation". I am not creating any threads. I know internally there are many threads running, though. Does that mean that no form can call a function from another form even if there is a parent-child relationship? Aren't controls like TreeView based on forms. If so then why can a form containing a TreeView call members of the TreeView? If you're interested here is my scenario:
15
7260
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? Thank you.
12
2378
by: [Yosi] | last post by:
What I should do to return back the permissin I had in VS2003 , that allowd me to access public methode of one Class from other Thread. I have Class A(FORM) which create new thread (new class B), the new class thread get as parameter reference to his father( CLASS who mad it (classA)), The new thread need to call methodes from his father like myfathe.methode(), This worked in VS 2003 but now in VS 2005 Beta throw an exception : An...
4
4434
by: oran johnson | last post by:
Illegal cross-thread operation: Control 'PopupInfo' accessed from a thread other than the thread it was created on. Can I track this down using the debugger? Thanks.
10
19753
by: CJM | last post by:
I'm trying to call a package/procedure in oracle (from an ASP page) which requires a number of parameters. I have got this working using OO40 but unfortunately the transaction rollback function doesnt seem to do much. So I'm now trying to use ADO instead (in the hope that ADO transactions will work), however I'm getting the above error. My initial searches havent turned up any suitable suggestions - there appear to be many reasons why...
2
14439
by: vvenk | last post by:
Hello: I wrote a small program to insert a row into an Oracle Table: CREATE TABLE case_list (case_list_name_c VARCHAR2(100) NOT NULL, expiry_dt DATE NOT NULL, days_to_expire_n NUMBER(*,0), created_dt DATE DEFAULT SYSDATE, created_by_n NUMBER)
0
1468
by: Jacn | last post by:
Hi! I have a several problem with the oracle connection and ADO, I use a executenonquery for a select sentence and I use two output parameters and two input parameters, when I run the application an error named "ora-01036 illegal variable name number" appears, where is the error? Help me, please Public cnMinisuper As New OracleConnection("Data Source=MINISUPE;Persist Security Info=True;User ID=minisuper;password=minisuper;Unicode=True")...
0
8633
by: Atos | last post by:
SINGLE-LINKED LIST Let's start with the simplest kind of linked list : the single-linked list which only has one link per node. That node except from the data it contains, which might be anything from a short integer value to a complex struct type, also has a pointer to the next node in the single-linked list. That pointer will be NULL if the end of the single-linked list is encountered. The single-linked list travels only one...
2
5833
by: HotFrost | last post by:
Hello everyone, i am trying to work with linked servers... The local server is the one used by UPS worldwide software (it is Microsoft SQL Server Desktop Engine, v 8.00.2050). The linked server is 2005 MS server. on update/insert event for some table i hooked up the trigger that connects to linked server and updates the record in some DB. To test, i create a stored procedure that updates the record in UPS table that has that trigger....
0
3138
by: Default User | last post by:
I work on creating test cases for a SOAP-based set of servers, using soapUI. I received and updated set of WSDL and schema files, and when I made new tests and mock server operations, all of the ones that had been working now returned a SOAP fault. The faults look something like: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Body> <soap:Fault> <soap:Code>
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.