Loop through data in code
Loop through data in code
Hi,
Is it possible to access data directly in code?
My dictionary has multiple levels of ParentRelations
DATEN
-- Relation DATEN.AuftraegeDaten
-- Relation DATEN.AuftraegeDaten.HVFELDER
-- Data Fields...
AUFTRAEGE
-- Data Fields
HVFELDER
-- Data Fields
I have a DataBand setup to loop through "DATEN", grouped by DATEN.AuftraegeDaten. In the code, I would like to create a foreach loop to go through the Relation DATEN.AuftraegeDaten.HVFELDER. Is this possible?
The class definition for HVFELDER shows as "public virtual ParentHVFELDERRelation HVFELDER" - what is this class based on, what are available methods? It does not seem to be implementing Enumeration?
Any ideas?
Thanks,
Jack
Is it possible to access data directly in code?
My dictionary has multiple levels of ParentRelations
DATEN
-- Relation DATEN.AuftraegeDaten
-- Relation DATEN.AuftraegeDaten.HVFELDER
-- Data Fields...
AUFTRAEGE
-- Data Fields
HVFELDER
-- Data Fields
I have a DataBand setup to loop through "DATEN", grouped by DATEN.AuftraegeDaten. In the code, I would like to create a foreach loop to go through the Relation DATEN.AuftraegeDaten.HVFELDER. Is this possible?
The class definition for HVFELDER shows as "public virtual ParentHVFELDERRelation HVFELDER" - what is this class based on, what are available methods? It does not seem to be implementing Enumeration?
Any ideas?
Thanks,
Jack
Re: Loop through data in code
Hello,
It is difficult to say something without a test data. Please try to see the "Hierarchical Reports" category in or Demo.
If it is not suited for your task, please send us a test data and sample how it should look like for analysis.
Thank you.
It is difficult to say something without a test data. Please try to see the "Hierarchical Reports" category in or Demo.
If it is not suited for your task, please send us a test data and sample how it should look like for analysis.
Thank you.
Re: Loop through data in code
Hi again,
maybe you misunderstand the question. I want to loop through data in C#, so completely indepedent of the existing DataBands. I'm just missing documentation on how to access the data. Class definitions, available methods etc.
Is there any existing development guide that I could check?
Thanks,
Jack
maybe you misunderstand the question. I want to loop through data in C#, so completely indepedent of the existing DataBands. I'm just missing documentation on how to access the data. Class definitions, available methods etc.
Is there any existing development guide that I could check?
Thanks,
Jack
Re: Loop through data in code
Hello.
Sorry, but we don't really understand what do you need.
Could you describe your problem more detailed.
It will be great if you will send us a sample project which will help us to understand your issue.
Thank you.
Sorry, but we don't really understand what do you need.
Could you describe your problem more detailed.
It will be great if you will send us a sample project which will help us to understand your issue.
Thank you.
Re: Loop through data in code
Hi,
I figured out what I need to do, here is my code snipped to manually manipulate or retrieve data from the dataset provided.
I should be able to access any data in the dataset as required. Of course structural knowledge of the DataSet is needed to avoid Exceptions (or they must be caught).
Thanks and best regards
Jack
I figured out what I need to do, here is my code snipped to manually manipulate or retrieve data from the dataset provided.
Code: Select all
DataTable dt = (DataTable)HVFELDER.DataTable;
DataRow[] result = dt.Select(string.Format("{0} LIKE '%{1}' AND {2} LIKE '%{3}'}", "ID", "1234", "Category", "Superfunhappystuff"));
foreach (Object item in result[0].ItemArray)
{
// do something
}
Thanks and best regards
Jack
Re: Loop through data in code
Hello.
Do you really need to do all of it in code?
It seems that your issue could be solved with our report components.
there are no dataset in our reports. We use Data Sources.
Did you try to look at Master-detail report? Thank you.
Do you really need to do all of it in code?
It seems that your issue could be solved with our report components.
there are no dataset in our reports. We use Data Sources.
Did you try to look at Master-detail report? Thank you.
Re: Loop through data in code
Hi,
I'm afraid I do - I don't actually want to output the data, but instead format other data based on parameters. I have three DataTables in my source which I combine to loop throug and group the data, and four more tables (at different data hierarchy levels) that define meta-information which I use for conditional formatting.
But my report works fine now.
Thanks and regards
Johan
I'm afraid I do - I don't actually want to output the data, but instead format other data based on parameters. I have three DataTables in my source which I combine to loop throug and group the data, and four more tables (at different data hierarchy levels) that define meta-information which I use for conditional formatting.
But my report works fine now.
Thanks and regards
Johan
Re: Loop through data in code
Hello,
Ok.
Let us know if you need any additional help.
Ok.
Let us know if you need any additional help.
Re: Loop through data in code
Hello . I have a stored procedure with a parameter. I take the parameter value from another procedure. but this stored procedure(from which I am taking parameter value) returns a list and I want to get from this list every parameter in the first stored procedure.
"Reconnecting on every line" didn't help. what can I do? Thanks a lot
"Reconnecting on every line" didn't help. what can I do? Thanks a lot
-
- Posts: 6329
- Joined: Tue Mar 20, 2018 5:34 am
Re: Loop through data in code
Hello,
You should use DataBands.
Thank you.
You should use DataBands.
Thank you.
- Attachments
-
- Screenshot 2024-02-07 132827.png (186.28 KiB) Viewed 715 times