Crystal Reports Data being lost on export to CSV - csv

I have a report with subreports in the report and the main report - contains the formula which passes the data from the subreport to the main report -
Shared NumberVar TotalHours;
{#Count} + TotalHours;
However the data is correct in the report when I export the data to CSV - all the values return 0. Which is incorrect - Can anybody help me please to see why the data isn't exported correctly ??
Thanks so much :)

Related

SSRS Visual Studio 2015 Limitations

I am currently using Visual Studio 2015 to export a report to Excel.
The stored procedure produces the results in seconds, however returns 588,851 rows.
When I try to export this, I receive a error message of;
"An error occurred during local report processing.
An unexpected error occurred in Report Processing.
Exception of type 'System.OutOfMemoryException' was thrown."
The export works in CSV format, but I would like to automate this report and I need it to use Excel format.
The report is very basic, only showing the rows of data. No graphs or images.
I removed timing out options and I have tried running it out of hours. There is no cache or history to the report.
Has anyone got any suggestions please?
Unfortunately, there are quite a few limitations to exporting data to Excel; the characters per cell being the biggest issue (32,767).
Here's some good documentation surrounding the limitations (earlier versions of SQL Server have similar limitations):
https://learn.microsoft.com/en-us/sql/reporting-services/report-builder/exporting-to-microsoft-excel-report-builder-and-ssrs?view=sql-server-2017
I often have to add some code to SSRS to truncate any cells that exceed the character limit with something like:
=iif(Globals!RenderFormat.Name= "EXCELOPENXML" OR Globals!RenderFormat.Name = "EXCEL" OR Globals!RenderFormat.Name = "CSV",
Left([Your Field or Parameter],32745) + "...Truncated for Excel",
[Your Field or Parameter] )

add parameters in ssrs url in report viewer

Hello I have ssrs report and I want to pass parameters within URL is it possible?
report link: http://serverName/reports/reportname
it is possible when I access link like below
http://servername/ReportServer/Pages/ReportViewer.aspx%2fReportName&rs:Command=Render&ParamerterName = abc
but I want to achieve for link http://serverName/reports/reportname
can someone please help
This is a variant I use. This passes concatenated parameters/one parameter from a cell in Excel to the SSRS report (each parameter separated by "-") and opens the report in another Excel workbook. The SSRS report is coded to split the parameter into its constituent parts.
http://myserver/Pages/ReportViewer.aspx?%2fMyreports%2fmyfolders%2fmyreport&rs:Command=Render&rs:format=EXCEL&rc:target=_blank&myparam=xxxxx

SSRS throwing an error when subreports have no data

I have an SSRS master report which includes multiple sub reports (with few parameters passed from Main report, sub reports have graph and tablix)
One of the combination of parameter's on sub reports results in no results in dataset on sub-reports. I have set no data message on these individual sub reports.
The problem is that when i run the main report with this combination it doesn't display this no data message but instead throws "An internal error occurred on the report server. See the error log for more details. (rsInternalError)" message
When I run these individual reports with same combination of parameters, I get the no data message displayed correctly.
I tried my best to find solution online, but couldn't find any.
Any help would be useful. Thanks in advance!!
My sub report was not having a data-set and as a result it was throwing an error on main report.
I added a dummy data set in my sub-reports, using an existing data-source with query.
SELECT ' ' AS DUMMY
and then added text box in my sub-report to display this dummy field.
=First(Fields!DUMMY.Value, "DUMMY")
and it worked after that. Basically I am forcing SSRS to display sub-report even if there is no data.

CSV Datasource in Subreport

I'm new to JasperReports and I have a big problem inserting Subreports from CSV. I've been looking for information for 3 days and can not understand what must I do.
I have a dataset named RB1 in csv format, that I need to import to JasperReports. In the main report I have no problems, I can import it and show fields as I want.
The problem arises when I need to insert a subreport with the same database.
I create another report named SUB_1, and link it to the database RB1 as if it was an usual report, and I put the variable COLUMN_0 to be shown in the details section. I previsualize it and it is OK.
I go back to the main report and drag the item SUBREPORT to the summary section and select "select an existing report". I choose the report SUB_1 -> NEXT
I select "use same JDBC connection used to fill the master report" -> NEXT
In the Dataset Parameters I clic ADD and write:
PARAMETER NAME: COLUMN_0
PARAMETER EXPRESSION: $F{COLUMN_0}
What I'm trying to do is to link the variable COLUMN_0 of the main report with the variable COLUMN_0 in the subreport.
Now, when I try to previsualize the report, the subreport does not show.
In the Properties of the Subreport I have:
EXPRESSION: "SUB_1"
PARAMETERS MAP EXPRESSION:
CONNECTION EXPRESSION: $P{REPORT_CONNECTION}
DATA SOURCE EXPRESSION:
What am I doing wrong? I guess that many things, but could not find any answer online with this in detail in a way that I can understand it.
I solved the first part of my problem: I could print data in the subreports from the main report. Or better said, I could half-print some data.
I use an answer to the question I posted, to continue asking about this problem.
I have been thinking and looking for info and I think that the problem now could be because of the indices. The point is that when my subreport is used, there is some data that has been used by the main report, so the subreport seems not to work for the lines that were used by the main report. Is that possible?
If this is the problem, is there any way to make my subreports to work for all data and not just for the ones that are not used in the main report?
Thank you very much!!
I think I am really close to solve it thank to you :D:D

MS Access: Command button to export a report to a CSV file

I was wondering if this was possible. I have my main form with a bunch of tables on it, and then I have a report. Standard stuff there. The report is named Report1. What I was wondering, is there a way I can put a command button on my main form, that when pressed, will export Report1 onto my desktop (or wherever I specify) in a CSV format? I would like to do this in VBA if possible. I'm not sure if I could make a macro format into CSV, but I am pretty open to any suggestions. Thank you
You can export the report's data to CSV by using DoCmd.TransferText with the report's Record Source table or named query.
Take a look at this: VBA DoCmd.TransferText - exporting query to .csv with user defined file path
A report is always based on a query.
You can find your query in the properties within the Design View of your report ("RecordSource").
The best way should be to generate a query (based on your current report) and link that query to the report ("RecordSource") and to the export button (DoCmd.TransferText).
Thereby, if you want to change your report / report data, you only need to change it once.