SSRS won't allow parameters in embedded dataset based on data source - ssrs-2008

Whenever I construct a report that uses an embedded dataset and try to use a parameter (such as #StartDate and #EndDate), I receive an error that states I must declare scalar values. However, this error only comes up if I set a data source that uses the "credentials stored securely in the report server" option. If I set the data source to use "Windows integrated security," I do not receive the error.
I am at a complete loss. These reports need to be accessed by a large amount of people. We have granted them "browser" privileges through an Active Directory Group through SSRS, including the data sources.
What is the best way to proceed? Is there an easy fix?

I generally deploy with the option already set by going into the Data Source and choosing 'Log on to SQL Server' section > 'Use SQL Server Authentication'> (Set your user and settings). When you use a windows user as your main user after you deploy there could be issues.
The other question would be does this work correctly at all times in Business Intelligence Development Studio, BIDS, and just not on the server? It is very interesting a permission issue alone would cause a scalar error to return. Generally when users have to get to the report they may still get the error but not storing the credentials merely asks them for credentials. It would help more to know the datasets and what they are returning or supposed to be returning. Generally a Start and End are typically defined as 'DataTime' in SSRS and are in a predicate like 'Where thing between #Start and #End' and there data is chosen from a calendar by a user. If you are binding them to other datasets and there is the possibility of a user selecting multiple values that could present an issue.

I took a look at the data source that had been set up by our DBA. It was set up as an ODBC connection. I changed it to Microsoft SQL. It works now. I do not understand why and would appreciate if a more seasoned individual might explain.

Related

How to assign values to variables in tableau

I have a field named Datavalue 2, I have to manually assign value to that field,How do I write the calculations for this. Any leads for this will be helpful.
Thanks in advance
Tableau is a read-only tool. It does not allow you to make persistent modifications to the original source data.
If you want to derive a value of a field that can change during the life of a Tableau visualization, but leave the original data source unchanged, that is entirely possible. The Tableau features that help with this are calculated fields and parameters. Parameters can be set interactively by the user. Both features are documented in the on-line help.
Tableau has some tricky issues with it, but it is possible to work with variables as well. I am making the assumption that your data is connected through a database.
In my experience, I was connected with data from an MSSQL server, and I had need to use variables for some data cleaning.
The solution I came upon was the difference between using a 'Custom SQL Query' and 'Initial SQL'.
Tableau will not allow declared variables, temp tables, or common table expressions in 'Custom SQL' but it will allow all of those items in the 'Initial SQL' area.
Under 'Connections' Tableau should have the server connection, right clicking on this will allow you to navigate to the 'Initial SQL' box.
After that, I had to do a little fidgeting with the code, but ultimately it was a successful process. Hope that helps somewhat to the OP or any newer viewers. There weren't quite enough tags to determine more about the issue.

Where does the stored procedure Sys.xp_readerrorlog Read its contents from specifically?

I have been working with this stored procedure Sys.xp_readerrorlog for around a week now, and what I have learned is it accepts 7 parameters to fully refine how it should display its data. Easily enough to understand.
I have the question now from, where exactly does this stored procedure get its data from? I know you can also preview the data in the SSMS Object browser, under Managements In the SQL Server logs folder, although I have come to the theory that the Dialog that opens when you read the logs also use this procedure to display to the user in a grid.
I am baffled. I scouted through the system databases and found nothing (no table) which looks remotely like the output you get from this procedure
exec sys.xp_readerrorlog 1,0,'','',null,null,N'Desc';
Any expert that can tell me where the actual log data is stored, and if it is queryable through a select statement if you have admin rights?
It reads from the SQL Server error log file, which is a plain text file. There is no built-in interface to the file from TSQL; xp_readerrorlog is widely known, but it's also undocumented so relying on it is risky although of course you can use it if you don't mind that risk.
Using SMO you can find the file location but there is no special API for reading it because it's just a text file.

CRM 2011 and SSRS - Generating a report for a single record

Is it at all possible using CRM 2011 and SSRS to generate a report on a single record, and only get results for that one record?
EDIT
Additional Info - Must Use:
Custom SSRS report
Custom entity in CRM
Here's a more specific link to your question: link. You're probably looking for pre-filtering (look for "3. Pre-filtering Element" in the link provided) if you want the report to be record specific (context sensitive).
Here's a link describing the 2 types of pre-filters (CRM 4.0 but the theory applies to CRM 2011): link. And here's an example of prefiltering in CRM 2011: link
I have done this successfully in CRM 2011 with a completely custom report made in BIDS, on a custom entity, with full context sensitivity.
Make sure to learn fetchXML as it's going to be the going forward technology for these reports. The existing reports are using SQL which make them bad examples to copy off of.
Here's an example on how to extract fetchXML from an advanced find: link It also has more information on pre-filtering.
Take a look a the report Account Overview.rdl. It could be executed for a single account record or multiple records.
See Reporting for Microsoft Dynamics CRM Using Microsoft SQL Server Reporting Services
Create an embedded connection to the CRM database engine for the environment you want to target.
Create an embedded dataset to query the current record. This going to be kind of weird since experience will tell you that you are going to get tons of records, but because of the clunkiness behind CRM it will actually only get the current record. For example, if you wanted to get the current quote you would use "SELECT quoteid FROM FilteredQuote AS CRMAF_Quote"
Add a parameter to store the reference to the entity you just queried. In keeping with this example I created #QuoteFilter which is type text, could store multiple values (even though that's not what we're using it for), and gets its default value from the dataset in step 2. Also, probably ought to make this hidden since GUIDs aren't end user friendly.
Finally, use the parameter discovered in the where clause of the other datasets. For example, a search on quote products for the current quote would look something like SELECT * FROM FilteredQuoteDetail WHERE (quoteid = #QuoteFilter)
As a final note, you should keep in mind that CRM loves to remember everything even when you don't want it, too. On one of my reports I messed up my datasource and CRM was forever convinced that the report should run against all records. I fixed my datasource, but uploading the report did not trigger a refresh and correct the problem. In the end, I deleted the report from CRM, created a new one, uploaded the same exact file with no changes, and everything worked. Go figure.

Eclipse Birt Reports, Creating report from SQL database, (user key?)

I'm fairly new to using the Birt Report Designer and need to figure out how to generate a report from a SQLite database. I have suceeded in getting it to connect to the DB but am now unsure how to generate a report and the tutorials that I have found aren't of much help so far.
I have a template that was given to me by my employer that has a few fields, I'm wondering if these fieldnames (in the template) are supposed to match field names in the DB.
Also, when I go to Run->View Report-> As PDF I am unsure what I am supposed to enter for the field "User Key", does this correspond to a table name in the DB or something along these lines?
As of now, I have tried entering a table name but just a blank report is generated.
If anyone can point me to a good resource or help with this I would greatly appreciate it. Thanks
There are two books i could really advice:
BIRT - A Field Guide to Reporting
Integrating and Extending BIRT
and the Eclipse Help containing BIRT documentation.
I suppose the User Key could be report parameter (listed in Data Explorer window), which is passed to Data Set to select appropriate data. If I'm guessing right, check within a Data Set editor ("Parameters" tab and "Query" tab) where the User Key parameter goes in - probably to one of the table field in a WHERE clause. Parameters in a query are represented by question marks: SELECT * FROM fooTable WHERE barColumn = ?. Hope tracking this would lead to find out, what to enter to the parameter.
Additionally, ensure if your Data Set(s) is(are) connected correctly to your SQLite Data Source ("Data Source" tab in a Data Set editor).
Being as new as you are to BIRT, I would suggest building a couple of reports with the sample DB (Classic Models). There are many, many samples out there for you to use as a guide. Additionally, most tutorials will use the Classic Models data so you can follow right along. After you create a couple of practice reports (this should not take more than 30-45 minutes) the template you have been given will likely make A LOT more sense and allow you to make progress almost immediately.
If you are looking for a nice collection of tutorials and samples, be sure to check out Birt Exchange for Dev Share (samples) & tutorials.
As for the "User Key" this is almost certainly a report-level parameter used to filter the data set (as the previous answer points out).
Good Luck!

Crystal Reports - Failed to open a rowset

What can be done to resolve the exception:
CrystalDecisions.CrystalReports.Engine.InternalException: Failed to open a rowset.
This is a generic error in Crystal Reports whenever the report query fails. There can be a number of causes. If your report was targeted to a specific database and then the database was changed without updated the report, this can cause it. It can also be caused by something in the query itself failing, such as if the report is based on a stored procedure that doesn't exist on the database against which the report is running. Try verifying the database for the report.
As said this is a generic error, and like all such errors it's a very frustrating one. The problem is that VS 2003 has no preview option for crystal reports so it's hard to track down the source of the problem. So best way to solve this is to create a blank project in vs 2005 or later, import the crystal report, and run preview. You will get a more specific error then.
I had the same issue, and received this error message:
One ore more fields could not be found in the result set. Use Verify Database to update the report.
Error in File filename {9FEE6406-1613-409A-B9BD-C5FDA24E3DEE}.rpt:
The rowset column could not be found.
I was using a stored procedure to collect data for the report, and sure enough I was passing an invalid parameter for the SP. Double check the type and value of the parameters if you are using a SP to populate the report data.
Good luck!
I have also gone through same error with report having sub reports. Issue resolved as i switch to each sub report and make it verify again with database/tables/views.
This is caused by some discrepancy in your relations, like opposite left joins or something similar. CR has also the bad habit to create 'default' links each time you modify the list of tables and views needed for the report. It can even sometimes automatically create recursive links that might not be viewable 'at once' in the relations screen.
If you cannot find which relation(s) is causing the trouble (sometimes it is not so obvious), you'll have to make some trial & errors test by adding/removing tables from your report.
Every time you add a new table in crystal it adds its own links on already linked tables, some times it even links the 2 fields from the same table.
Make sure you know your links in order to go through after you add a table and scroll all tables to see for any links create from to the same table
I received :
CrystalDecisions.CrystalReports.Engine.InternalException was unhandled
Message=The Report Application Server failed
Google brought me here. For those that have similar problems.
For the record: I had a byte[] array with an image and removed the log from the report and the error stopped. I now have to figure out what I have done wrong with the logo.
I had this problem - we use SQL logins for our security (not integrated / DSN connections)
By granting execute permissions to the user for my stored procedure I fixed the problem.
Really, really couldn't hate Crystal more for their exception masking - let this be a lesson to all programmers;
Try
'your code here
Catch
Throw new exception("Hey, here's a really friendly but completely useless error message")
End Try
will result in pain for future developers - DON'T DO IT!
When you verify your database it might tell you that it is up to date, in that case you have two more options to check for:
a) Refreshing the report (a lightning-shaped icon), if you have a problem with a field, such as a SQL Field, it will give you the error and then show you the edit window for the field.
b) Running the query directly on SQL, if there is a problem with the query itself you will also get this message in Crystal but SQL will tell you exactly what went wrong.
Check Changing Crystal Report Database logon information at runtime in VS2005 for help.
Important line in it is:
table.Location = Database & ".dbo." & table.Name
For me, the problem was fixed when I logged of and logged back to the SQL server that the report was connecting to
In your store procedure If you are using
SET NOCOUNT ON;
Then just remove this
--SET NOCOUNT ON;
Now verify your report database, build & run your solution.