RDLC create table without Dataset - asp.net-mvc

I have refereed this Question which is same like this but it is not active and doesn't include solution.
I have a MVC application in which i can generate blank report in pdf format.I have a Report_Name.rdlc report file and added a Table just to see how it looks when i generate report. I don't have any data set so i cancelled option asking for dataset.
Now it gives me error :
Error 3 The tablix ‘Tablix8’ is in the report body but the report has no dataset. Data regions are not allowed in reports without datasets.
I don't want any dataset to bind with my table. i just want to make a table in rdlc report & run my mvc application to see how it looks.
any suggestion ?

You have to assign a dataset to a tablix, there is no way around it. Just create a dummy dataset that only returns one field with no data; maybe the SQL could be SELECT GETDATE() AS blah (if you are using SQL Server). Set the dummy dataset as the dataset for the tablix, and do what you need to with it.

Related

Getting "Trial 0 encounter error with message: Must be at least 2. Parameter name: numClasses" Using VS 2019 Model Builder

I'm new to Machine Learning and ML.Net (both from a coding and model builder perspective). I've written code to train and predict (relatively simple examples against our data) but but thought it would be best to use the Model Builder since it picks the appropriate models to train.
I'm using the Data Classification scenario in the model builder. I have a dataset (from SQL Server) that successfully trains but I wanted to use a different version of the dataset (same schema, different data). When creating this other dataset, I now get the error "Trial 0 encounter error with message: Must be at least 2" and I've not been able to find any information about the error. I've compared the two datasets (column types, null values, checked the Advanced data options to make sure they are the same) - original one that trains and the new one that throws this exception and they appear to be identical other than the data itself.
I went as far as using Telerik JustDecompile to see where in the ML code (Microsoft.ML.Trainers - LinearMulticlassModelParametersBase) this error was being thrown from. I understand there are 2 different types of data classification scenarios - Binary and Multi class. I have a column defined as the label that should be either 1 or 0.
I appreciate any help. Hopefully someone can point me in the right direction. I've been analyzing the dataset that works and the one that doesn't for a # of days and cannot find the difference. Does the model use different algorithms based on the actual data being trained even when the schema is the same?
I'm going to try using these same 2 datasets through code (not using the model builder).
Thanks.
Tom
Did your label column have more than two categories in the original dataset?
It's possible your multiclass trainer requires at least 3 categories.
As for the selection of algorithms, the model builder picks one based on accuracy metrics by using the AutoML class. But you can just try out different ones in code. Once you have selected one in code it will use that specific algorithm. If you use the model builder you will get different algorithms depending on the dataset you give it.
For example you can just change your pipeline from this:
var pipeline = ctx.Transforms.Text
.FeaturizeText("Features", nameof(SentimentIssue.Text))
.Append(ctx.BinaryClassification.Trainers
.LbfgsLogisticRegression("Label", "Features"));
To this:
var pipeline = ctx.Transforms.Text
.FeaturizeText("Features", nameof(SentimentIssue.Text))
.Append (ctx.BinaryClassification.Trainers
.SdcaLogisticRegression();
Or even just run the new data through the model builder again and see which trainer it picks.
I got the exact same error message.
I fixed it by doing these things:
In the Model Builder > Data > Advanced Data Options. Make sure to set the Label as Binary as shown in the screenshot.
Restart Visual Studio a lot.
In the SQL to pull the CSV from SQL Server, I did an ORDER BY NEWID() to provide a random distribution of the data set. I don't know if that matters.

Data Studio query error when using Big Query view that joins tables

I've created a view to join two tables in Big Query. When I use that view as a data source in Data Studio I get a configuration error. The query used to create the view looks like this:
SELECT emp.name, emp.gender, emp.age, pay.salary
FROM [project:doug.employees] as emp
JOIN [project:doug.payrates] as pay on emp.name = pay.name
Within Big Query the view works as expected. I can query it without any problems. If I try to use the view directly as a data source in Data Studio, I get the following error as soon as I drop a report control on the page or view the report.
There`s a query error.
Field 't0.gender' not found; did you mean 'emp.Gender'?
Error ID: b07b8f27
I also tried using a custom query of the view as a data source. The custom query is...
select * from [project:doug.employee_salaries_view]
That gives me the following error.
There`s a query error.
Field 't0.emp_name' not found; did you mean 'emp.Name'?
Error ID: 98782922
Which is identical but has a different error number.
I've been able to use tables and views that do not involve joins as data sources without any problems.
Finally, all the queries in use are using Legacy SQL in Big Query.
Is there some trick to using Big Query views that join other tables as a source in Data Studio?
Please try the following syntax for the view:
SELECT emp.name as _name, emp.gender as _gender, emp.age as _age, pay.salary as _salary
FROM [project:doug.employees] as emp
JOIN [project:doug.payrates] as pay on emp.name = pay.name
There's an automatic renaming that happens in BigQuery for fields that use dot notation. Sometimes, when called from other tools, such as Tableau or Data Studio, it causes problems.
I already made it!
In my case, was a field format. In the two tables the format of the field has to be the same, for example: User id (numeric) in table 1, User code (text) in table 2. Must change "User code" from text to numeric to match with table 1.
Also, i suggest to add some filters previously to the tables to reduce the calculation time of the queries.

Delphi ADO error "Multi-Step operation generated errors. check each status value" when opening DBF file with memo type

I'm building a simple delphi program to transfer data from dbf file into sql server. The dbf file it self contain a memo field which data is saved on .fpt file. When i try to open it with ADOQuery, when I tried to scroll down to the next row, I got an error message
Multi-step operation generated errors. check each status value
this is my connection string and query syntax
Provider=VFPOLEDB.1;Data Source=D:\LEARNING CENTER\DATSPP;Mode=Share Deny None;Extended Properties="";User ID="";Password="";Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE;DSN=""
select * from dpb.dbf
even when i'm not running the program and try to scroll the dbgrid, i also get this error.
can someone possibly tell me where i'm doing wrong?
"Multi-Step" errors are not a problem with one cause but a generalised report of some deeper problem arising from a huge number of possible causes. The sources of these problems will vary hugely by database type and provider involved.
In this situation I would break the problem down into separately testable steps.
First, simplify the query. Modify it so that it returns only a single, specific column into your grid (not the memo). If that works then keep adding columns to your query and grid, one by one, until the problem occurs. Then focus on what it might be about the column that triggers the issue.
(It may not occur at all; the issue might be due to the use of select * in the first place)
If you cannot return even a single column into your grid, then take the grid itself out of the equation. Simply return a value into a field and scroll through the results one record at a time in that field.
If that works then you can focus on how the grid behaviour might be involved.
The problem may be caused by the way the grid and the data source are attempting to navigate through the result set. If you've eliminated other possible explanations then you might investigate retrieving your entire query result into a TClientDataSet (or other in-memory dataset).
If you can do that then you can attach your grid to that in-memory dataset.
Unfortunately none of the above are guaranteed to be an answer to your specific problem, but hopefully may set you on the track to finding that answer.

clonedataset with source in dsInsert/dsEdit state

My understanding is that clonedatasets share the same data with their source dataset.
When I clone a dataset in insert mode the clone is in browse mode and cant access any field values already set in the source dataset. Is it possible to access the new record from the clone to adjust any of its field values without triggering events such as OnDataChange/OnUpdateData?
using Delphi 7/2010, dbExpress and MySQL.
While a dataset is in insert/edit mode the field values are only stored in the local buffers of the dataset. The Data property from TClientDataSet holding the complete table is only updated when Post is called. That is why there is no access from any cloned dataset to any unposted records.

Reportviewer layout issue

I have a report viewer in with two different datasets and i have two different tables each table gets information from a dataset.
I would like the layout to be as the following for an example:
Dataset 1 (Class)
Dataset 2 (Subclass)
My current reports returns all classes (from dataset 1) then shows the subclasses (from dataset 2) Is there a way in which i can show data from the two different datasets together?
I have two different Lists each referring to a dataset and within them are tables with the appropriate tables.
Took the advice of others and combined both stored procedures into one and in the report viewer i used the filters feature to show different data in different tables.

Resources