Update of SSRS DataSets Data - ssrs-2008

I generated a report using a table 't' which has two columns ID,Name I generated a Report which displays the Table t Using SSRS My problem is After generation of report i have inserted one more record into table t but the new record which i have inserted is not viewed in the report , how to update the datasets data so that it reflects new changes in table t

Related

Unable to skip a line from Excel while doing copy activity in azure data factory

I have a excel Column as a source in Copy Activity. I need to map the columns from source to sink (MS SQL Server).
I have one constraint, whenever I have a blank row in the excel source I should Stop the copy Activity.
I want to copy all the column data before the blank row, and ignore what ever after the blank row.
For example if I have this dataset:
A
B
ABC
DEF
HIJ
KLM
NOP
QRS
Then the first two rows should be imported and the last two rows should not be imported.
What should I do?
In an ADF pipeline there are limited options for working with the contents of datasets (you can add cols, remove cols, etc) but modifying the rows themselves is hard. You can do it with dataflows but as your sink is mssqlserver then you can use row_number() to find any empty rows and keep the rows up to the blank row.
The process is:
Create a staging table which is the same as the target table but includes a row column that is defined row INT IDENTITY(1,1) NOT NULL
Truncate the staging table
Write the data to a staging table
From the staging table write to the main table using the insert query:
SELECT * FROM staging_table
WHERE rowid <
(SELECT
COALESCE(MIN(rowid), (SELECT MAX(rowid)+1 FROM staging_table)) FROM staging_table WHERE a IS NULL)

Apending the new data from the MainTable into existing table in the database

There is Main Table called "maintable" which is updated every day and I created another table "subtable" subsetting the "maintable" from the query results. Both table has date column so now I want to append the new data that has been updated into maintable into subtable by running the same query but for only those days which "subtable" dosent have the days' data.
Sample query to create the subtable:
CREATE TABLE subtable
AS ( SELECT date ,(sp-cp) AS pft FROM maintable
)
Now I want to run this query again so the data updated in the main table should updated in the subtable also and here I don’t want to drop the existing subtable and create another instead I want to update the new results to subtable with only that data which is not present in subtable.
If I run the same query again it throws an error, saying the table already exists.

crystal reports, populating a column

I have a crystal report which fetches data from a table. It is then displayed in a tablular format. Now I want to add a new column in the report. The values for the new column will be based on the values of an already existing column which is getting populated from the table. The relation is based between the tables.
For eg:
Currently crystal report fetches data from XYZ table. The values of columns column1 and column2 are displayed in the report. Now I am adding a new field in crystal report to be displayed. The values for this field is obtained from a column of another table, say column3 of table ABC. Table ABC has column3 and column4. The relation will be like, i have to select ABC.column3 where XYZ.column2=ABC.column4.
How to achieve this in crystal report.
Thanks in advance
In the report creation wizard, select both your XYZ and ABC tables, similar to this
Then in the next step, setup the relation [XYZ.column2=ABC.column4], similar to this
Now in the next step, select all the columns you want to display from both tables, similar to this
That should take care of your requirement.

Insert data into SQl Server Database using ADO.Net Dataset

I have a small database with a table with 2 columns (ID and Name)
I have an ASP.Net form that i want to input an ID and a Name and upon clicking the button, it will insert rows into the database
I want to do this using a dataset. Meaning, I want to add the rows first into a ado.net dataset. Once I have the dataset with its table and rows, I want to insert data into the SQL Server 2008 database using SQLDataAdpater.
I can manually create a DS and add rows in it
How do I accomplish inserting data to database with the dataset I created?
Maybe this will help you
HOW TO: Implement a DataSet SELECT INTO Helper Class in Visual C# .NET
http://support.microsoft.com/kb/326009/en

Table alias and datatables

I am triying to fill a report with datatables. The report has two tables which are
he same but with diferent alias. In c# I create a datatable for one of them with the records that must be shown and another datatable with the other table info. Crystal only gets info from the first datatable to fill the two tables so the shown data is wrong. Can I fill the two tables that are the same but diferent alias with two diferent datatables?
This is the same problem that I wrote yesterday but simplier.
Thanks for all,
Crystal Reports does support duplicate tables with aliases.
The problem may be the link. If your trying to display the two tables on the report both there's no JOIN or WHERE statement.
The table would need a link with itself. Here's a link to a tutorial on join a table to itself
select * from tbl1 as child join tbl1 as parent on parent.primarykey = child.foreignkey;