SSRS: Subscription column order differs from Report - reporting-services

I have a report, that used to have columns in the following order [A,B,C,D,Banana,E]. I was then asked to make some changes to my report, which I did so that the report columns now has an order of [A,Rocket Ship,Banana,B,C,D,E].
When I look in Visual Studio or look at the report on SSRS, I see the correct order, HOWEVER, when I let the subscription run, I see that it is still putting out reports with the wrong columns. Has anyone else seen this phenomenon? I've tried creating a brand new subscription, but I still get the old Column order.
Any help is greatly appreciated.

Check to see if the report using any caching or snapshots.
It might be using an old copy - though I would think it would be the same as one rendered manually from Report Server.

The issue is that the CSV report that is created isn't dependent on the report that is created with SSRS. Essentially, it just spits out the results of the SQL query into a CSV file.

Related

SSRS Published report from MySQL DB shows blank/empty rows

I have created a very simple report in Visual Studio (also tried it in Report Builder) that just returns 10 rows from a table in a MySQL (Not MSSQL) database. I changed the background and foreground color to make sure I could clearly see the rows in the report.
There are no parameters and it does not use a stored procedure. It's a straightforward SQL query:
select TASK_INSTANCE_ID, TASK_NAME, ASSIGNED_NAME, CREATED_DTTM
from task_instance where created_dttm > date_sub(now(), interval 1 day)
limit 10
Here's the result when previewing the report in Visual Studio. You can see that it is showing 10 rows of data.
I then publish that report to our SSRS server:
And when I view that report on the SSRS server I get 10 blank rows.
To confirm that I was actually seeing the rows and they were just blank, I changed the query to return just 5 rows. This shows that there are now only 5 blank rows, but with the defined background color.
For reference, I also created a simple report from an Oracle DB and published it to the same folder on the same SSRS server. This report works just fine.
So it appears to be something related to using a MySQL DB, but I have not been able to find anything that explains what I'm doing wrong. Any pointers/help will be greatly appreciated.
I then tried to add a couple new columns to the SQL query.
I used the ROW_NUMBER function to get the rownum of each returned row
I added a dummy column with a constant value for each row
Works fine in the Query Designer:
Works fine in the Preview:
Shows the new columns when published to SSRS, but still shows blank cells for the other columns:
If your problem is/was the same as mine then I think you will find that if you export your report to excel from the report-portal that all of the data that you expect to see is in fact present.
After some digging into the report properties and trying page width settings etc. I found that I had different values for the CanGrow property of the cells in the row and once I set them all to be the same -- True in my case -- then the report rendered as expected.
I am thinking that the reason that Excel showed the data is because it effectively ignores the CanGrow setting so having a mixture of them didn't matter.
I hope that this helps -- you or others who encounter it later -- as it was a really bizarre thing to encounter...

Need to write SSRS report that uses stored procedure with a pivot as a dataset but I can't get the report to be dynamic, is this even possible?

I have a bear of a problem here. The user wants a report that shows the earnings, deductions and liabilities (EDL) code of each employee or null/blank if an EDL code doesn't apply to that employee. I needed one row for each employee name and columns for each possible EDL code combination. I got that answer fixed from my previous question here:
Struggling with a dynamic pivot on multiple columns with one being concatenated
I ran into a problem where there are a potential 270 column headings (EDL code combination with "subj", "elig" or "amt" appended) but not every employee will have a value for every column and security settings lock me out of seeing 1 of the 3 payroll groups. This made my report very limited in that when I ran it I could only show on the Crystal Report the data for what columns I had at the time I created the Crystal Report. Well, the user who requested this report has access to payroll group 1 and if even one of those employees had an EDL code that I didn't have in my data when I created the Crystal Reports file then the report wasn't useful to the user. We figured a way for her to get the info she needed by her logging into SQL Server and executing the stored procedure and she did what she needed to do with the data.
Fast forwarding to today I have to create this as a report in SSRS or give detailed instructions on how she can do this in the future if need be since my contract is coming to an end. I'm not familiar with SSRS but I thought maybe that would meet her needs over Crystal Reports. However, I'm running into the same problem. When I add the stored procedure as a dataset (adding it in as text to execute, not clicking the stored procedure radio button) I only see the EDL codes from that particular query not all potential combinations. I need a way to maybe dynamically add columns to the SSRS report, does such a thing exist?

how is ssrs parameter getting set?

I have an ssrs report that uses a Shared Dataset to extract a maximum datetime value that I want to use for multiple reports. I have created a shared dataset called MaxSnapshotDateTime.rsd that uses the query:
select max(snapshot_DT) as snapshot_DT from dbo.SystemLog (nolock) where sync= 1
My report dataset Snapshotdatetime uses the shared dataset. And my parameter #snapshotdatetime takes available and default values from the Snapshotdatetime dataset. I want to be able to use this #snapshotdatetime parameter for embedded datasets.
The #snapshotdatetime parameter is the first in the list of parameters. And the Snapshotdatetime dataset is the first in the list of datasets.
When I preview the report in SSDT it displays correctly initially. But once I select View Report the snapshotdatetime parameter displays as a dropdown with "Select a Value" as the default value and my snapshot datetime available in the dropdown.
If I set my available values for the parameter to be None then I get different behaviour: the parameter appears correctly but it is not available for other dataset queries.
Unfortunately I don't have sufficient permissions for a trace. And I have been unable to replicate with another source. Can anyone shed some light on what is happening when View Report is being clicked?
I am taking a wild guess here, but I have faced such issue before and have done lot of head-scratching. Turns out there is a rdl.data file in the solution where the rdl file resides(and it gets created automatically). This is the cache file for the report. When you "Preview" a report, the data and design for the report is fetched from this cache file, not the actual dataset. Hence there are chances it might be stale.
If you really want to see the report's output, instead of previewing it, try running the report from solution. That would be much more reliable.
Hope it helps you.

MS reporting services limiting number of rows

I have a report working well where I extract the number of logins per user. Each login takes up one row on the report.
I have date parameters and my DB goes back a year. However it seems the report will only show 40/50 rows despite a report expecting to deliver, say, 250 for the amount of times I logged in.
Is there some setting in reporting services that limits the number of rows delivered. Can't find it anywhere..
Thanks.
The answer to your question: nope, as far as I know there's no real equivalent of SQL's TOP 50 statement in SSRS itself.
Some things that come to mind that may be causing your symptoms / can be investigated:
What happens if you run the query for the dataset in SSMS? Be sure to fill in the exact parameters the report's using (if any).
Run the query as a test from SSRS designer. If you're using Visual Studio: right-click the dataset and hit "Query...", then hit the red exclamation mark and fill in any parameters if needed.
Try putting a CountDistinct call (on your dataset) in a textbox somehwere in the report, by itself.
Check the filtering and grouping on your tablixes, perhaps even by looking at the XML source code for the RDL.
Show the parameters in textboxes (oldskool printf debugging! :D) to make sure they're what you expect them to be when the report's run on the Report Server. If they're not: try deleting the report on the server and re-deploying it.
Have a look at the ExecutionLog2 View in the ReportServer database, specifically the Number of Rows returned.
As mentioned in the comments by Atilla: You may also monitor exact SQL SSRS sends to server using SQL Server Profiler.

MS access reports

I created a report using wizard and while creating I selected 4 columns for ordering data in ascending orders. It asked for 4 columns and chose 4 columns and after creation I want to change the preference of the second column to other one. How can I do that??
I cannot see anything in the report query or anywhere else
Ignore any ordering in your report's query source. You can discard your ORDER BY from the query because the Access report will use whatever settings you give it for "Sorting and Grouping" instead.
In Access 2003, with your report in design view, choose View -> Sorting and Group from the Access main menu. If your version of Access is different, look for a similar option.
I should think its just as quick to re-run the whole report. However you can edit the Query that the report is built on.
Or make a query, then get the report to run from the query, this means you can easily change it.