Grapecity Active reports databinding from Code Behind - c#

I have a .rpx file, which I want to bind data from one of my class library projects in C# and generate a PDF file out of it and save it to a specific location. I am able to bind the textbox that is in the page header. The issue that I am facing is in the detail section of the reports where I want to bind repetitive data. The detail section has textboxes, which I want to bind with the properties in the Object.
In short, would need to bind a list of object to the detail grid. So could someone let me know the best approach I can take for this?

The best approach to this is to either bind your data to a DataSet or a DataReader. Please refer to the Bound Data Sample that shows this as well as some other methods of data binding.
Sample Documentation: https://www.grapecity.com/activereportsnet/docs/v14/online/ar-sam-bound-data.html
Sincerely,
The GrapeCity Support Team
https://www.grapecity.com/support/contact

Related

Create a report with its respective chart from a chosen LINQ query in C#

I'm quite busy reading different posts over how to create reports from dynamic queries. I have the next problem and maybe someone here can help me with this:
I have a class where I can create a dataGridView from a dynamic dataTable in a project made with C# from VS 2010. I populate my DataTable with one of 9 different linq queries that I have according to the user requirements, which also are saved in a register in my database. Starting from this point, I need to make a report where I can show of the same way the data selected.
I have found the code from the website got ReportViewer and it works quite good. Only I have a last problem. I need my report to show a chart according to the parameters passed via the DataTable. I saw the examples that they have there for the charts but they work quite restrict with what I need, and the code for the chart generator that is incluided in the Dynamic Table project is quite extense and a bit complex for a beginner like me.
Do you know any other examples that maybe I can find to use to make the code in my project? Many thanks in advance :).
I found another way to do it:
Now I'm using classes as datasources and filling arrays of these classes with the contect of the datatable.
I pass these arrays as my datasources for the project.
I group my data by the number of fields I want to display and then I choose between pre made .rdlc files where I show my data to the user.

Customizing GridView in c#

I am new to C# programming. i have a database which contains different offers and i am able to get these offers from database.But now i want to create a custom look page for these offers(plz see image attached)
Suppose if there are 7 offers in database i want them on my page like the image of the offer on the top under that description. How can i do it ? i used Gridview but its giving result in table can i customize the grid view to get this look?
You have lot other options you can use dataview, repeater or JQuery.
Try googling on above topics and try to implement the process.

How do I query Oracle and store the results into a DataGrid?

I'm an amateur in C#.NET programming.
I need to populate a grid with data from a table I've created based on the "date (date type)" given by the user from a date picker put in a textbox. There is a submit button which populates the grid using the date.
I need to know how to connect to the database and the grid and how to populate it with the date given in the textbox. I do not know anything about grid views.
I couldn't find a relevant site in google for my problem. I'll be more than happy if someone could provide with a general code or a link regarding my problem.
Thanks in advance :)
This involves understanding a few different technologies. I don't think you'll find a single source for all of this. Since this is a general question, I'll give you general guidance.
Oracle
To connect to Oracle, you'll want to use Oracle's DataAccess component (ODAC). Read a few of the API examples that comes with the ODAC to learn how to connect to the database and execute commands. It is very similar to ADO.NET.
When extracting information from the database as the result of a query, you'll want to load the database data into a local .NET class object. This is what you will feed your data grid.
WPF/Winforms
How you bind your results to the DataGrid will depend on whether or not you are using WPF vs Winforms. If you are using WPF, you will want to research ItemsSource binding and the INotifyPropertyChanged interface. Essentially, you'll store a list (typically an ObservableCollection<T>) of your result entities and bind the DataGrid's ItemSource property to the list. You'll then define what columns you want to display in the grid and how those map to the properties of the database entity.
I'm not as familiar with the Winforms grids, but I believe there is a way to bind to those as well.

DNN How to create a complex module with multiple controls

My goal are to create a module that holds a listview with entries of xml files. The xml files are just serialized arrays of some object. Country{Code,Name,URL} as an example.
When an entry is clicked another control should show all the items in some kind of item control with styling based on the type(The idea are from WPF). I assume its possible to create some kind of style/rules for possible item types, in above case Country. (any ideas/advises on how to achieve this is welcome).
Now in the list of styled items, one should be able to select wanted items, and export this to a new XML file based on a new type SelectedContries{Code,Name,Url, Params}. The user will then need to add in the extra params in the new list and export(serialize).
My question is now, to do such module what would be the proper way. One module with 3 controls. I am new to module development so please explain deeply. Do i create Asxc files within the module as my controls?
Based on my explained goal above, any links to guides that might be good for exactly this would be nice and any general advises are also welcome. Thanks.
if I got you right, that you want to have a grid on your module showing all your country entries read out from a xml file.
The user can edit or add some detail information to those entries and export (serialize) it again into xml.
I would use the implemented Telerik Grid RadGrid (DNN wrapper is called "dnnGrid") to show all xml items in a grid on your module.
Then I would enhance the grid for your special needs adding some new columns or edit the existing (dont know exactly what you want to edit in this grid).
The last step is to serialize the entries again this should be done with a extra button calling the serialize method.
These are rly basic ideas from me. Iam a dnn module developer I think I could help you better if you explain it to me a lil detailed, show me a bit of the xml file and so on.
best regards, noone

collapsable master detail gridview structure

I need an advice for a c# asp.net project.
My client wants to see some reports via the gridview object with master/detail structure.
The main gridview will be full by all master data and each row will have a + icon (or button) on the first cells.
When user clicks this icon, the all details data of that master row should be seen under that master row with collaps action.
I can handle the database proccess but i can not figure out the collapsing part.
How can i put some extra rows under the specific row on the gridview object?
Thanks in advance..
Matt Berseth has one of the most impresive tutorials on this kind'a stuff
it contains til now 28 tutorials only on the GridView plus a lot from other asp.net controls as well using jQuery with them. I do learn plenty with him. I really love his work and I just wanna share this with you, you might actually get some good and professional ideas from his code!
There is a CodeProject article with downloadable source:
GridView inline Master/Detail record display
Thanks but its for updating or inserting.
Instead , i have found that page, it seems more effective.
GridView control to show master-child or master-slave data, written in c#, asp.net, and javascript.
Here is another good CodeProject blog. Explains multilevel master/detail without JavaScript.
http://www.codeproject.com/KB/aspnet/MultiNestMDGridview.aspx
This is the easiest to use control I've ever run across:
http://code.msdn.microsoft.com/CompleteGridView

Categories