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

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.

Related

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

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.

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 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.

updating batches of data

I am using GridView in asp .net and editing data with edit command field property (as we know after updating the edited row, we automatically update the database), and I want to use transactions (with begin to commit statement - including rollback) to commit this update query in database, after clicking in some button (after some events for example), not automatically to insert or update the edited data from grid directly to the DB...so I want to save them somewhere temporary (even many edited rows - not just one row) and then to confirm the transaction - to update the real tables in database...
Any suggestions are welcomed...
I've used some good links, but very helpful, like:
http://www.asp.net/learn/data-access/tutorial-63-cs.aspx
http://www.asp.net/learn/data-access/tutorial-66-cs.aspx
etc...
Well,
you can store your edited data in a DataTable in session. and then pass this data table as a bulk insert in to the database. 2 options are available for this
if you are using SQL Server 2005 you can use OpenXML to achieve this, as i have stated here
if you are using SQL Server 2008 youc an use Table Variables like i did here.
i hope it helps
First way:
Create session variable that will contain your DB object (DataTable or mapped objects).
The GridView should work with this instance instead of sending the data to the database.
Once editing is finished you may take the object from the session and save it in the way you normally do.
Second way:
I would use javascript to collect all changes on the client side while he is editing as a array of objects (each object is separate row).
Once the editing done, you can create json string from the collection and pass it to the server.
If your json object configuration is same as server class then you can use JavaScriptSerializer to deserialize your string into collection of object.
After that, you can save your objects in the way you normally do.

Resources