Showing posts with label datasource. Show all posts
Showing posts with label datasource. Show all posts

Monday, March 12, 2012

Problem with Expression for a added field in datasource.

I added a new field to my datasource called "TotalCostAssum". The expression for the datasource is as follows:

Iif(Previous(Fields!PNumber.Value) = Nothing Or Previous(Fields!PNumber.Value) <> Fields!PNumber.Value, Fields!TotalCost, 0)

But this expression gave me trouble. I even couldn't go to the Preview page because every time when I clicked the Preview button, the Visual Studio.NET was shut down by asking me if I need to send error report to Microsoft. When I got rid of the above expression, everything is fine. I was wondering if that's because the word "Previous" is not allowed here. But I have to access the previous data row to determine the value here. I was bothered by this the whole morning and couldn't get any hint by searching on the internet. Any anybody help me out? Thanks in advance.

Mistake. The above expression is for the field that I manually added to the dataset.

Wednesday, March 7, 2012

Problem with Deletecomand attribute of asp:sqldatasource

Greetings everyone. I'm trying to set up a GridView that makes use of an SQL Datasource. All commands (update,select,delete) are set within the tag's attributes but when i hit the Delete Trigger it returns that the id variable is undeclared.

<asp:SqlDataSource
ID="KevinDataSource"
ConnectionString="Server=overmind;Database=kevin_bonis;User=sa;Password="
SelectCommand="SELECT * FROM Accesorii"
UpdateCommand="Update Accesorii SET nume_accesoriu=@.nume_accesoriu,
articol=@.articol,
cantitate=@.cantitate,
trimis_bolla=@.trimis_bolla,
bolla=@.bolla,
data_trimitere=@.data_trimitere,
intors=@.intors,
data_intoarcere=@.data_intoarcere WHERE id=@.id"
DeleteCommand="DELETE FROM Accesorii WHERE id = @.id"
runat="server" /
What could be the problem with this? I'll appreciate any help i can get.
Thanks alot, Allyrion

Hi Allyrion,

did you set the datakeynames property for Gridview?

Lan

Monday, February 20, 2012

Problem with datasource on Report Builder

I've got a strange problem with ReportBuilder. I've created a DataSource name Config and a Model name Customers. We been using this model for month and everything was working fine. Now when we try to create a new report we cannot run it. When Report Builder is running i select the "Customer" model. Then i put some fields on the report. When i try to run it i've got an error saying that it cannot create the command for datasource1. What i don't understand is why the error occured in Datasource1 and not in my datasource config ?

When i open the Report Manger and click on the model "Customer" the datasource use by this model is Config. So the problem is not because they're is a mistake in the configuration. I've tried to rebuild my model and datasource then deployed them but i still have the same problem.

Any idea of what the problem is ? I can't figure outThis is the exact error i get:

An error has occurred during report processing. (rsProcessingAborted)
Cannot create command for datasource1. (rsErrorCreatingCommand)
An

attempt has been made to use a data extension 'SQL' that is not

registered for this report server. (rsSemanticQueryExtensionNotFound)|||

Can you please try restarting your IISservices (an iisreset on the Webserver hosting reporting services) to see if you get a different behavior?

Thank you.

Ramu_MSFT

This posting is provided "AS IS" with no warranties, and confers no rights.
.

|||Thanks ! I've tried to restart IIS and reboot our server but we still have the same problem.