I want to make a report on crystal report using ASP.Net MVC application. I am retrieving data from the database (MySql) stored procedure and load in the dataset.
I want to show the data specific format which I attached, Report template snippet. enter image description here
This is my query result which I load in the dataset: enter image description here
This is my crystal report result show. enter image description here
Note: Segment 1 and Segment 2 are N number of columns in the database for example if the database has only one Segment then Segment one with respective column () will show.
Related
I am using Access 2010 and have used a sub-report in the main report. The main report comes out fine, but the date range parameter (Between [enter start date] And [enter end date]) has been asked twice, one time for the main report and another time for the sub report.
I would like to parse the parameter only once. I followed below method mentioned in one of the article, but the numbers are wrong since the sub report takes only very first date from the result and parse it to the sub report(instead of parsing both "From" and "To" values.
Please help to enter the date range just one time.
I have followed:
You need to put your parameter in the query behind your main report and make it come out as a field:
SELECT YearParam:[Enter Year], <<Other Fields Here>> FROM <<Table NAME>>
Then on the main report, place a textbox in the Report Header with a control source of the field name (YearParam) and name the textbox (txtYearParam, for example).
Now, on each of the queries behind your sub-reports (or on the report filter) make it look at the main report textbox using the following syntax:
Reports!ReportName.txtYearParam
Article link.
Running the Databus server from the command line I have successfully uploaded timeseries data via curl, and am able to query the same data with the api. I'm unable to view any of the data in the table in the UI. After selecting "My Databus" -> Tables is says "You do not belong to any groups that have tables yet. Add some groups, then tables!!!". Navigating to the Database and selecting the table -> chart no data comes back there either.
I have noticed that the query it issues is from a recent time range, while the data I loaded is for an earlier time period. Is there a default way to show the most recent data available in a table?
Is your table type relational or stream? If relational, what is the primary key?
If time series, this url will give you the last 10 values because of the parameter 10 and reverse=true.
http://[yourhost]/api/firstvaluesV1/10/rawdataV1/[yourtablename]?reverse=true
If relational table, you can retreive all values like so
http://[yourhost]/api/getdataV1/select+c+from+[yourtablename]+as+c
replace either urls [yourhost] and [yourtablename] values.
We do not use the tables page much. It is better to click in the specific database as in My Databus -> Databases and then click on the database that has your table. We are about to add a view data link in there showing most recent 1000 values or something like that. There is already a view chart which shows most recent 2 hours(again, we want to change that to most recent 1000 data points instead as well).
I am using report viewer (.rdlc report) to print a normal sales receipt in ASP.net project.
I used text boxes in my report to show data. If I send a single receipt details to the report it prints it well and it is working normally.
My question is, what do I need to do if I want to print 2 or more than 1 receipts with same functionality or with same report. In other words, if I send 10 receipt IDs to the form it should result in a report with those number of prints or receipts in the report viewer.
Is it possible through report viewer, or do I need some other technology?
I generate the datasource with all the information from all receipts.
In .Rdlc I use a row group (group by IDRECEIPT).
I put the Dataset Fields into a rectangle and select the option add page break after
It sounds like you need a List control in your report.
See Adding a List.
You will need to set up your report/DataSet to have a parameter that takes multiple receipt ID values.
The List will repeat for each row in the DataSet, i.e. if there are ten receipts the objects in the List object (textboxes, etc) will repeat for each receipt row.
It will be one report but will have a repeated section for each receipt.
I am using asp.net and mysql. In Rdlc report i can't able to display the Date.
First of all it gives an error Like Can't able to convert mysql date to system.date. so i add Allow Zero Datetime=true; in connection string. now the report shows...
But its display #Error in the Report column.
DataSet Name is - mcubicDataSet.xsd
DataDable Name is - fo_reserv
Preview Data in VS2010 : -
Rdlc report :-
There are two instances when this happened to me, and 3 solutions
The rdlc report is bound to a dataset that is generated by Visual Studio through your MySql connector. Sometimes the dataset that is created has date columns with the MySqlDateTime instead of the default System.DateTime.
To see this Open Your Report.rdlc, then view report data (Ctrl+Alt+D) to see the dataSet, right click for properties then check the datatypes in the columns.
Go to the file that represents the data source where the dataset comes from and open the designer file in the coding window. In my case mine is called pos_dbDataSet.xsd, with a designer file called pos_dbDataSet.Designer.cs Once you open it you can do a string replacement (Ctrl + H) on the date dataTypes find: MySql.Data.Types.MySqlDateTime relpace with: System.DateTime .
Be careful to Replace all in the Current Document ONLY. Though this change may not refrect on your report dataset, the report should run.
2. Use the DataSource Configuration Wizard to rebuild the DataSource/Datasets.
(Less likely) The rdlc report uses the date formats of your operating system, hence there might be a conflict between the MySql format and the OS format. What resolved the issue for me was changing my datetime formats on the Calender or Region settings of my computer to better match the database formats. I was using UK formats and changed to US formats.
Calender/Format Settings
Change the fieldtype in database from datetime to text . this error occours because of fieldtype mismatch .
I'm currently working on an ASP.Net WebForms application that allows a user to select an item from a list, which ultimately results in a SSRS report being shown, using Report Viewer 2010 (in server mode). The report has been coded with a parameter #id to allow the report to display the correct data for the selected item.
The reports dataset can return multiple rows where some of the data is displayed in a summary area at the top (not in the header section) for example a textbox would have the expression =FIRST(Fields!Address.Value, "dsMain"). The data returned is denormalized so Address will always be the same value. Which is why using FIRST() works. And the rest of the data is shown in a Tablix with grouping applied etc.
But now I'm looking to change this so users can select multiple items and therefore effectively show the report multiple times, but shown in the same report viewer control. The main requirement is to batch print the reports, so showing it in one report view control is important to allow for one click printing of everything.
Now because I didn't design the report in the first place and because its fairly complex in its layout and the sql that is executed; the sql is geared towards running for one id and not a list of them. I'm looking for options to not have to rewrite the report or the sql.
Is it possible to give the report viewer the id parameter as a list and let the report viewer execute same report for each id passed? - I know report parameter can accept multiple values but this isn't the same since the report will unintelligently pass the first value to my stored procedure but not repeat the report for the other values. Perhaps there's a setting in the report designer that allows it to repeat if it is passed multiple values?
Can someone suggest something else to get this working? Or is my only option to extend the report and sql to accept multiple id's and effectively redesign the report?
Thanks any suggestions or help with this.
The answer is to use sub-reports.
Create a new report that takes a list of ids as a multi valued parameter.
Use that parameter as the dataset for a list control.
Have a subreport inside the list. Report inside the list is your original report.
You can then pass each element of your dataset(your list of parameters) as parameter to the your sub-report.
SSRS will repeat it as your want.