Change the datasource in a report Devexpress WPF Xtrareports - wpf

I have a report in Devexpress that is assigned to a certain Datasource and I need to change it to a different Datasource. I want to do this without having to put all the fields back into the report. To help me with this I copied all of my tables and stored procedures to the new Database. Is there a way to do this? This report is going to multiple clients that each have their own naming convention so I would need to be able to change it dynamically. Thank you in advance for your help.

You can comfortably change the connection string and everything should work. This also depends on how you are accessing your data. If you are using standard datasets or some other ORM tool then this should work so long as you have exposed the connection string in your config file.

Related

how to specify the data source of a report in a url

If I design a report based on some data source, lets say an spreadsheet from google sheets.
but then I want to reuse this report on a different sheet, can I do this without actually editing the report? Can I specify the source somehow in the URL?
Then all I need to do to reuse the report is upload new sheets to my google drive and then connect them to the report by specifying them in the URL.
Is this possible? Or is there a better way to do it?
(I'm googling, but I cannot find out how to reuse reports without actually manually editing them).
so there does seem to be something called "Custom JSON/CSV/XML" by Supermetrics.
and you seem to be able to specify the url as a parameter somehow. If someone has done this and succeeded/failed, or knows of a walkthrough/tutorial, or a variation on this theme then that would be helpful.
Using default connectors, you can't change the Data Source using parameters.
You may try to create a community connector with a parameter to set the desired resource, but I don't think it will fit your needs or worth the effort (you'll still need to edit the report to change the parameter).
However, when you click to copy/duplicate a report, it prompt you to select new sources for each Data Source in your report. It will copy-then-edit your report anyway, but it is a friendly interface. Maybe you should try this.

SSRS 2016 Mobile Reports Error with missing dataset

Does anyone know if it's possible to switch the data set which is used by a Mobile Report? As far as I can see, the only way of doing this would be to add the new dataset and then re-map everything, including filtering to the new one.
It seems a very inefficient way of doing things. In addition, if the original dataset is deleted, there is no way of getting back into the Mobile report!
Any advice appreciated.
In the Report Portal you can manage the settings of the Mobile Report just like you would with paginated reports. You can set the dataset that it's pointing to there without editing the report. As you might suspect, the field names should be the same or it won't know which ones to use.

How to create an RDL using the report class generated from the RDL schema

I have a project where we are creating a custom report generator for SSRS 2008R2. This project allows the user to select fields from a database and then create and store the RDL on the report server.
For some of the initial proof of concept attempts we have been using XMLText writer to generate the XML file. While this works this seems to be very cumbersome and I don't have a lot of confidence in how the schema is being generated as being 100% bulletproof. A second attempt is actually using the generated class from the RDL as my object model. Where I am stuck here is there is almost zero documentation on how to use this object. MSDN has a tutorial on updating the model but it very basic in concept.
I'm looking for some guidance on the preferred approach.
1) continue with the XML generation
2) use the RDL object to create the reports
3) I have also considered using the SSRS endpoint where a dummy report is created and stored on the server then using the RDL object model to update the report with the necessary fields, groups etc.
I haven't tested the third option but it seems as this would minimize the amount of coding for the creation of the document.
Thanks for any suggestions or ideas
I just built a program that creates an SSRS report from a report template and a stored procedure.
I am using the RDLObjectModel to create the report. And RDLSerializer to allow saving the report to a file or the report server. I first load a report template from our report server through the SSRS web service to deserialize the server report into and RDLObjectModel. I then derive parameters for the report fields, and derive fields from the stored procedure to make a report dataset.
The problem that I ran into is that I wasn't able to serialize the report object to be able to save it to the server or to a file because in RDL2008 RDLSerializer is private. Then I came across an article that saved me a lot of headaches. http://ucodia.fr/2011/10/advanced-reporting-services-part2-rdl-serializer/
This is a much better approach that using XMLTextWriter. This should provide you enough to get things rolling.
I ran into the same problem where I was using RdlObjectModel to create my report object but I was unable to serialize it. There is a way to overcome that issue where you can still get instance of the RdlSerializer and call serialize method using reflection
You can find the implementation at the following link

Real time database query

We have a windows program written in vbasic(i think) and we are re-writing the same program in c#. In the old program there is a grid. When we click any cell and as soon as edit the cell content the data in database is changing. In our new program we couldn't find the way of doing that. So we added some buttons for database actions like update selected cell.
What is the best way to do that?
You can do this in c# too.Use a datagridview and to bind with the database so that change in the grid effect database see here
Out of seeing dozens of legacy ODBC frontends put together in Access I would strongly advice not to commit changes in the database at real time. Instead try to create a lightweight process that helps the users to keep their data's quality high.
If you want this kind of functionality you could have the real time changes saved in a different schema, a set of different tables or with a flag that tells that these rows are unverified edits by the user X.
Rasel already gave you a pointer how to do the functionality in C#.

Databases and Qt

I am building an application in Qt/QML.
I have a table view of the database (PostgreSQL).
Is there a way to dynamically refresh my table if there is any change in the database.
One no-so-efficient way to do it is to keep sending periodic SQL queries.
Is there any automatic way to keep my view refreshed?
I am open to use any other Database also if required.
Qt seems to support the NOTIFY mechanism of PostgreSQL databases. Googling for it it found some bug reports, so not sure of well implemented that is. Since I've never used it, I'll have to refer you to google.
If you use QSqlTableModel (or an editable subclass of QSqlQueryModel) with QTableView, any edits made will immediately be visible.

Resources