Unable to link user controllable parameter to query: DevExpress Report and Dashboard Server - devexpress

I'm currently working on generating a set of reports and dashboards based on a set of data within our mysql database.
I've created a few custom procedures that take a date input and give all the results as required.
Unfortunately, when I point to these procedures within "data sources", I'm unable to dynamically change the Date parameter - once I set it within Data Source, it's stuck as that date forever (unless I edit the report/dashboard).
Does anyone know of any way you can change the query based on a users input?
I've tried creating parameters which match the name of the parameter set within the query at "Data Source", but have been unable to "inject" the date to use.
Any help would be greatly appreciated!

Check the "Filter a SQL Query" section of this documentation topic https://docs.devexpress.com/ReportServer/118944/create-dashboards/add-a-dashboard-parameter-and-filter-data
Briefly, you need to create a dashboard/report parameter and bound it to the data source's query parameter via expression.

Related

How to fetch certain column data from datasource?

I want to fetch the specified column from a data source(i.e. exclude certain columns) because even I don't show the data in UI, the data is loaded. (it is visible from Network tabs in Browser DevTools).
So far, I found the automatic data load and query builder/ query script provide the filters and sorting of the data but loads all the columns.
I have tried record owner security and role based security but this will make the data inaccessible to some users.
You can try creating a Calculated SQL Model to limit columns being pulled.
Let's take an example where you have a Student model with Name and City as the only two fields. You can add a new Calculated SQL with this SQL query and only Name column would be pulled.
SELECT Name FROM Student
Please refer to the official guide here. Feel free to comment if you want some clarification!
Hope this helps.

How to find if file has been imported in Access database or created within it?

In my access database there is a dataset which I need to know how it has been created. I tried to backtrack and reached to a table for which I am not able to find any source data. I am pretty much sure that it has been imported from some where. I checked in "View" option there is not "SQL" view for that table. It only has "Datasheet" view and "Design View".
In access database is there any way to check that whether a file has been imported or has been created using SQL query within access database? Is there any "flag" raised or something like that?
No. Once data is persisted in a table, that's it.
If you need further info, you can have a Timestamp field with a default value of:
Now()
or, if a higher resolution than one second is needed:
Date() + Timer() / 86400
or another custom field where you record session info as you like during the import or creation of data.

Telerik Report Stored Procedure call: The expression contains object 'myobject' that is not defined in the current context

I'm very new to telerik reporting. Please check my issue below.
I have created a telerik report using designer. This report calls stored procedure to retrieve the data and binds to chart.
I'm getting following error message when I generate the report via report viewer.
"The expression contains object 'dtScan' that is not defined in the current context".
I have already added all required report parameters (input parameters). Actually this 'dtScan' is not an input parameter. It is a one of the data table field and using inside my stored procedure. I'm sure that there is no issue on my stored procedure. It is working perfectly when I design the report (means that when I set stored procedure to report via design wizard).
As I mentioned, I'm getting this error message when I generate report via report viewer and as well as preview window (please see the attached images below).
Please looking forward your help to solve this issue.
Thanks!
Finally, I managed to understand the problem. The reason is because of 'temporary table. I have temporary table inside my stored procedure and return data from temporary table.
Please refer ​this link: http://www.telerik.com/forums/temporary-table-in-stored-proc​
Hope this helps others!

reporting services - data set has no query but works... Where could the query be located?

I was given a report today with a normal embedded data set (dataset1) and data source (datasource1) but the data set query is just a number: '1411'. The previous programer manually entered fields (not calculated fields) into the field tab.
When I click RUN, it works.
How is it populating the page without a proper query?
-There is only 1 tablix called (table1.) It also is pointing to dataset1.
-In Report Properties there is no VB code.
-RDL XML: Under dataset1's tag:
<DataSourceName>datasource1</DataSourceName>
<CommandText>=1411</CommandText>
I see no other SQL listed. Could there be something else on the server that's triggering it?
What sort of data source is "datasource1"?
If it's an RDBMS, check if there is a stored procedure or function in the database with the name "1411".
In SQL Server for example you could conceivably have a stored procedure called [1411] that returned a data set.
I'm assuming we are talking RDL (Report Definition Language). You might open this report with your favorite text editor and look at the CommandText XML tag to find the associated query. Hope that helps.

Reporting Services and checkboxes to specify WHERE Clause

I have a report embedded in an ASP.NET page. The ASP.NET page has some checkboxes that the user can select which datapoints they want to have show up in the report.
In the code behind file I am setting up part of the WHERE clause to be used in the query based on which checkboxes are checked.
I am putting this string into a report parameter and am not sure how to implement that parameter in the query. Simply placing the parameter in the query thinking the value of the string would come across does not work. I have the correct syntax in the string that is being passed into the report.
How do I properly use a Report Parameter to alter the WHERE Clause of the query?
I am using SQL Server 2005.
Base the report on a stored procedure that takes a BIT parameter for each of the checkbox values.
Build the dynamic SQL in the stored procedure and execute it.

Resources