Showing posts with label copied. Show all posts
Showing posts with label copied. Show all posts

Thursday, March 22, 2012

dataset question

Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1 and
created a new report, call it report2. When I first looked at the data tab in
VS, there was a dataset there from the original report1, call it dataset1.
Dataset1 used a different stored procedure. I created a new dataset, call it
dataset2 for the new report2.
I added the fields that I needed and put them on the report in place of the
original fields from report1. When I run the sp from the data tab all of the
correct data shows up. However, when I try to preview the report2 I get an
error message that says "The value expression for the query parameter
'@.ISRID' refers to a non-existing report parameter 'ISRID'. From the data
tab, with dataset2 showing, I click on the "..." to bring up the dataset
dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In the
dataset dropdown box, I can set the original dataset1. I'm wondering if when
I try to preview the report, it gets '@.ISRID' from the dataset1 dataset. If
so, can I safely delete dataset1? If I delete dataset1 is it deleted only for
report2 or will it also be deleted from report1 where it's still needed?
Thanks,
--
Dan D.Dan,
Here's how the parameters work. There are query parameters and report
parameters. Report parameters are what the user actually interacts with
during report execution. Most of the time, there will be a 1-to-1
relationship between the 2, but you might find a need to create a
report parameter that is not linked to a query parameter. If you wanted
to use a parameter for a report rendering option (like font color or
something), you could create a report parameter and the query would not
even know that parameter exists.
In order for the report parameter to pass its value to the query
parameter, they have to be "linked". The parameters tab when you click
'...' next to your dataset name is where you link them. On the left,
you will see the parameters used in the query, and on the right, you
assign report parameters to them.
To modify the report parameters, go to the Design view of your report,
click the Report menu, and click Report Parameters. Your query
parameter is trying to reference a report parameter that doesn't exist,
so double-check and make sure that everything is set up the way that it
should be. If there are no report parameters, create one called ISRID
and assign it the correct data type.
Hope this helps!
-Josh
Dan D. wrote:
> Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1 and
> created a new report, call it report2. When I first looked at the data tab in
> VS, there was a dataset there from the original report1, call it dataset1.
> Dataset1 used a different stored procedure. I created a new dataset, call it
> dataset2 for the new report2.
> I added the fields that I needed and put them on the report in place of the
> original fields from report1. When I run the sp from the data tab all of the
> correct data shows up. However, when I try to preview the report2 I get an
> error message that says "The value expression for the query parameter
> '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the data
> tab, with dataset2 showing, I click on the "..." to bring up the dataset
> dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In the
> dataset dropdown box, I can set the original dataset1. I'm wondering if when
> I try to preview the report, it gets '@.ISRID' from the dataset1 dataset. If
> so, can I safely delete dataset1? If I delete dataset1 is it deleted only for
> report2 or will it also be deleted from report1 where it's still needed?
> Thanks,
> --
> Dan D.|||Yes, that explanation does help. I figured out that I could delete the first
dataset without affecting the first report. I still have errors referring to
objects that were on the first report. I'm going to remove the existing
sections of the report and add them back and see if that solves the problem.
Thanks for the explanation Josh,
--
Dan D.
"Josh" wrote:
> Dan,
> Here's how the parameters work. There are query parameters and report
> parameters. Report parameters are what the user actually interacts with
> during report execution. Most of the time, there will be a 1-to-1
> relationship between the 2, but you might find a need to create a
> report parameter that is not linked to a query parameter. If you wanted
> to use a parameter for a report rendering option (like font color or
> something), you could create a report parameter and the query would not
> even know that parameter exists.
> In order for the report parameter to pass its value to the query
> parameter, they have to be "linked". The parameters tab when you click
> '...' next to your dataset name is where you link them. On the left,
> you will see the parameters used in the query, and on the right, you
> assign report parameters to them.
> To modify the report parameters, go to the Design view of your report,
> click the Report menu, and click Report Parameters. Your query
> parameter is trying to reference a report parameter that doesn't exist,
> so double-check and make sure that everything is set up the way that it
> should be. If there are no report parameters, create one called ISRID
> and assign it the correct data type.
> Hope this helps!
> -Josh
>
> Dan D. wrote:
> > Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1 and
> > created a new report, call it report2. When I first looked at the data tab in
> > VS, there was a dataset there from the original report1, call it dataset1.
> > Dataset1 used a different stored procedure. I created a new dataset, call it
> > dataset2 for the new report2.
> >
> > I added the fields that I needed and put them on the report in place of the
> > original fields from report1. When I run the sp from the data tab all of the
> > correct data shows up. However, when I try to preview the report2 I get an
> > error message that says "The value expression for the query parameter
> > '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the data
> > tab, with dataset2 showing, I click on the "..." to bring up the dataset
> > dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In the
> > dataset dropdown box, I can set the original dataset1. I'm wondering if when
> > I try to preview the report, it gets '@.ISRID' from the dataset1 dataset. If
> > so, can I safely delete dataset1? If I delete dataset1 is it deleted only for
> > report2 or will it also be deleted from report1 where it's still needed?
> >
> > Thanks,
> > --
> > Dan D.
>|||I can't get rid of the detail and group sections that refer to the original
report that I copied from. When I try to add a new section the default name
is "tbActivity" which is the name of the table in the original report. Any
idea how I can get rid of the reference to the original report so I can add
info from the new dataset and new report?
Thanks,
--
Dan D.
"Josh" wrote:
> Dan,
> Here's how the parameters work. There are query parameters and report
> parameters. Report parameters are what the user actually interacts with
> during report execution. Most of the time, there will be a 1-to-1
> relationship between the 2, but you might find a need to create a
> report parameter that is not linked to a query parameter. If you wanted
> to use a parameter for a report rendering option (like font color or
> something), you could create a report parameter and the query would not
> even know that parameter exists.
> In order for the report parameter to pass its value to the query
> parameter, they have to be "linked". The parameters tab when you click
> '...' next to your dataset name is where you link them. On the left,
> you will see the parameters used in the query, and on the right, you
> assign report parameters to them.
> To modify the report parameters, go to the Design view of your report,
> click the Report menu, and click Report Parameters. Your query
> parameter is trying to reference a report parameter that doesn't exist,
> so double-check and make sure that everything is set up the way that it
> should be. If there are no report parameters, create one called ISRID
> and assign it the correct data type.
> Hope this helps!
> -Josh
>
> Dan D. wrote:
> > Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1 and
> > created a new report, call it report2. When I first looked at the data tab in
> > VS, there was a dataset there from the original report1, call it dataset1.
> > Dataset1 used a different stored procedure. I created a new dataset, call it
> > dataset2 for the new report2.
> >
> > I added the fields that I needed and put them on the report in place of the
> > original fields from report1. When I run the sp from the data tab all of the
> > correct data shows up. However, when I try to preview the report2 I get an
> > error message that says "The value expression for the query parameter
> > '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the data
> > tab, with dataset2 showing, I click on the "..." to bring up the dataset
> > dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In the
> > dataset dropdown box, I can set the original dataset1. I'm wondering if when
> > I try to preview the report, it gets '@.ISRID' from the dataset1 dataset. If
> > so, can I safely delete dataset1? If I delete dataset1 is it deleted only for
> > report2 or will it also be deleted from report1 where it's still needed?
> >
> > Thanks,
> > --
> > Dan D.
>|||I was able to find where the reference was to the orginal report and replace
it.
--
Dan D.
"Josh" wrote:
> Dan,
> Here's how the parameters work. There are query parameters and report
> parameters. Report parameters are what the user actually interacts with
> during report execution. Most of the time, there will be a 1-to-1
> relationship between the 2, but you might find a need to create a
> report parameter that is not linked to a query parameter. If you wanted
> to use a parameter for a report rendering option (like font color or
> something), you could create a report parameter and the query would not
> even know that parameter exists.
> In order for the report parameter to pass its value to the query
> parameter, they have to be "linked". The parameters tab when you click
> '...' next to your dataset name is where you link them. On the left,
> you will see the parameters used in the query, and on the right, you
> assign report parameters to them.
> To modify the report parameters, go to the Design view of your report,
> click the Report menu, and click Report Parameters. Your query
> parameter is trying to reference a report parameter that doesn't exist,
> so double-check and make sure that everything is set up the way that it
> should be. If there are no report parameters, create one called ISRID
> and assign it the correct data type.
> Hope this helps!
> -Josh
>
> Dan D. wrote:
> > Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1 and
> > created a new report, call it report2. When I first looked at the data tab in
> > VS, there was a dataset there from the original report1, call it dataset1.
> > Dataset1 used a different stored procedure. I created a new dataset, call it
> > dataset2 for the new report2.
> >
> > I added the fields that I needed and put them on the report in place of the
> > original fields from report1. When I run the sp from the data tab all of the
> > correct data shows up. However, when I try to preview the report2 I get an
> > error message that says "The value expression for the query parameter
> > '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the data
> > tab, with dataset2 showing, I click on the "..." to bring up the dataset
> > dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In the
> > dataset dropdown box, I can set the original dataset1. I'm wondering if when
> > I try to preview the report, it gets '@.ISRID' from the dataset1 dataset. If
> > so, can I safely delete dataset1? If I delete dataset1 is it deleted only for
> > report2 or will it also be deleted from report1 where it's still needed?
> >
> > Thanks,
> > --
> > Dan D.
>|||It's been awhile but I have in the past edited the xml (the RDL file is just
XML). Be careful, you can easily destroy the report. Make a copy first. You
can edit the XML directly in VS. Layout mode, Menu View-> Code.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:856B3981-9335-42A4-BFDE-E287A29F767E@.microsoft.com...
>I can't get rid of the detail and group sections that refer to the original
> report that I copied from. When I try to add a new section the default
> name
> is "tbActivity" which is the name of the table in the original report. Any
> idea how I can get rid of the reference to the original report so I can
> add
> info from the new dataset and new report?
> Thanks,
> --
> Dan D.
>
> "Josh" wrote:
>> Dan,
>> Here's how the parameters work. There are query parameters and report
>> parameters. Report parameters are what the user actually interacts with
>> during report execution. Most of the time, there will be a 1-to-1
>> relationship between the 2, but you might find a need to create a
>> report parameter that is not linked to a query parameter. If you wanted
>> to use a parameter for a report rendering option (like font color or
>> something), you could create a report parameter and the query would not
>> even know that parameter exists.
>> In order for the report parameter to pass its value to the query
>> parameter, they have to be "linked". The parameters tab when you click
>> '...' next to your dataset name is where you link them. On the left,
>> you will see the parameters used in the query, and on the right, you
>> assign report parameters to them.
>> To modify the report parameters, go to the Design view of your report,
>> click the Report menu, and click Report Parameters. Your query
>> parameter is trying to reference a report parameter that doesn't exist,
>> so double-check and make sure that everything is set up the way that it
>> should be. If there are no report parameters, create one called ISRID
>> and assign it the correct data type.
>> Hope this helps!
>> -Josh
>>
>> Dan D. wrote:
>> > Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1
>> > and
>> > created a new report, call it report2. When I first looked at the data
>> > tab in
>> > VS, there was a dataset there from the original report1, call it
>> > dataset1.
>> > Dataset1 used a different stored procedure. I created a new dataset,
>> > call it
>> > dataset2 for the new report2.
>> >
>> > I added the fields that I needed and put them on the report in place of
>> > the
>> > original fields from report1. When I run the sp from the data tab all
>> > of the
>> > correct data shows up. However, when I try to preview the report2 I get
>> > an
>> > error message that says "The value expression for the query parameter
>> > '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the
>> > data
>> > tab, with dataset2 showing, I click on the "..." to bring up the
>> > dataset
>> > dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In
>> > the
>> > dataset dropdown box, I can set the original dataset1. I'm wondering if
>> > when
>> > I try to preview the report, it gets '@.ISRID' from the dataset1
>> > dataset. If
>> > so, can I safely delete dataset1? If I delete dataset1 is it deleted
>> > only for
>> > report2 or will it also be deleted from report1 where it's still
>> > needed?
>> >
>> > Thanks,
>> > --
>> > Dan D.
>>|||Dan,
It sounds like you are already close to where you want to be, but I'll
mention a few things.
1. If the reports are so different, just start over. If it is a simple
report, the New Report Wizard does a pretty good job.
2. I was going to suggest modifying the XML as well. (Definitely be
careful if you do this; make a backup copy before you do anything.) If
the reports are VERY similar, you can use the Find and Replace feature
to swap out field names in the XML.
3. Another option would be to give the query output fields aliases. If
you look at the query properties by clicking the '...', you can modify
the aliases in the Fields tab. This would basically rename the new
fields so that they fit right into the old report's table. Does this
make sense? If a particular table column in your report was looking for
"Fields!customer.Value", you could give the "employee" field in your
query an alias of "customer" so that you don't have to change the
table. I don't know that I would recommend this option because it is
"messy" and might be hard for the next developer to maintain, but it is
a quick fix.
4. You probably know this, but I'll mention it just in case. The names
of the report items (like tables, text boxes, group names, etc.) do not
matter. Your group section that refers to "tbActivity" is probably
fine. What you have to worry about is the value, expression, or bound
data item behind each object. That might lower the number of items that
you have to change.
-Josh
Bruce L-C [MVP] wrote:
> It's been awhile but I have in the past edited the xml (the RDL file is just
> XML). Be careful, you can easily destroy the report. Make a copy first. You
> can edit the XML directly in VS. Layout mode, Menu View-> Code.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:856B3981-9335-42A4-BFDE-E287A29F767E@.microsoft.com...
> >I can't get rid of the detail and group sections that refer to the original
> > report that I copied from. When I try to add a new section the default
> > name
> > is "tbActivity" which is the name of the table in the original report. Any
> > idea how I can get rid of the reference to the original report so I can
> > add
> > info from the new dataset and new report?
> >
> > Thanks,
> > --
> > Dan D.
> >
> >
> > "Josh" wrote:
> >
> >>
> >> Dan,
> >>
> >> Here's how the parameters work. There are query parameters and report
> >> parameters. Report parameters are what the user actually interacts with
> >> during report execution. Most of the time, there will be a 1-to-1
> >> relationship between the 2, but you might find a need to create a
> >> report parameter that is not linked to a query parameter. If you wanted
> >> to use a parameter for a report rendering option (like font color or
> >> something), you could create a report parameter and the query would not
> >> even know that parameter exists.
> >>
> >> In order for the report parameter to pass its value to the query
> >> parameter, they have to be "linked". The parameters tab when you click
> >> '...' next to your dataset name is where you link them. On the left,
> >> you will see the parameters used in the query, and on the right, you
> >> assign report parameters to them.
> >>
> >> To modify the report parameters, go to the Design view of your report,
> >> click the Report menu, and click Report Parameters. Your query
> >> parameter is trying to reference a report parameter that doesn't exist,
> >> so double-check and make sure that everything is set up the way that it
> >> should be. If there are no report parameters, create one called ISRID
> >> and assign it the correct data type.
> >>
> >> Hope this helps!
> >>
> >> -Josh
> >>
> >>
> >> Dan D. wrote:
> >> > Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1
> >> > and
> >> > created a new report, call it report2. When I first looked at the data
> >> > tab in
> >> > VS, there was a dataset there from the original report1, call it
> >> > dataset1.
> >> > Dataset1 used a different stored procedure. I created a new dataset,
> >> > call it
> >> > dataset2 for the new report2.
> >> >
> >> > I added the fields that I needed and put them on the report in place of
> >> > the
> >> > original fields from report1. When I run the sp from the data tab all
> >> > of the
> >> > correct data shows up. However, when I try to preview the report2 I get
> >> > an
> >> > error message that says "The value expression for the query parameter
> >> > '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the
> >> > data
> >> > tab, with dataset2 showing, I click on the "..." to bring up the
> >> > dataset
> >> > dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In
> >> > the
> >> > dataset dropdown box, I can set the original dataset1. I'm wondering if
> >> > when
> >> > I try to preview the report, it gets '@.ISRID' from the dataset1
> >> > dataset. If
> >> > so, can I safely delete dataset1? If I delete dataset1 is it deleted
> >> > only for
> >> > report2 or will it also be deleted from report1 where it's still
> >> > needed?
> >> >
> >> > Thanks,
> >> > --
> >> > Dan D.
> >>
> >>|||Thanks Bruce. I'll remember that for next time. I have it working now.
--
Dan D.
"Bruce L-C [MVP]" wrote:
> It's been awhile but I have in the past edited the xml (the RDL file is just
> XML). Be careful, you can easily destroy the report. Make a copy first. You
> can edit the XML directly in VS. Layout mode, Menu View-> Code.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:856B3981-9335-42A4-BFDE-E287A29F767E@.microsoft.com...
> >I can't get rid of the detail and group sections that refer to the original
> > report that I copied from. When I try to add a new section the default
> > name
> > is "tbActivity" which is the name of the table in the original report. Any
> > idea how I can get rid of the reference to the original report so I can
> > add
> > info from the new dataset and new report?
> >
> > Thanks,
> > --
> > Dan D.
> >
> >
> > "Josh" wrote:
> >
> >>
> >> Dan,
> >>
> >> Here's how the parameters work. There are query parameters and report
> >> parameters. Report parameters are what the user actually interacts with
> >> during report execution. Most of the time, there will be a 1-to-1
> >> relationship between the 2, but you might find a need to create a
> >> report parameter that is not linked to a query parameter. If you wanted
> >> to use a parameter for a report rendering option (like font color or
> >> something), you could create a report parameter and the query would not
> >> even know that parameter exists.
> >>
> >> In order for the report parameter to pass its value to the query
> >> parameter, they have to be "linked". The parameters tab when you click
> >> '...' next to your dataset name is where you link them. On the left,
> >> you will see the parameters used in the query, and on the right, you
> >> assign report parameters to them.
> >>
> >> To modify the report parameters, go to the Design view of your report,
> >> click the Report menu, and click Report Parameters. Your query
> >> parameter is trying to reference a report parameter that doesn't exist,
> >> so double-check and make sure that everything is set up the way that it
> >> should be. If there are no report parameters, create one called ISRID
> >> and assign it the correct data type.
> >>
> >> Hope this helps!
> >>
> >> -Josh
> >>
> >>
> >> Dan D. wrote:
> >> > Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1
> >> > and
> >> > created a new report, call it report2. When I first looked at the data
> >> > tab in
> >> > VS, there was a dataset there from the original report1, call it
> >> > dataset1.
> >> > Dataset1 used a different stored procedure. I created a new dataset,
> >> > call it
> >> > dataset2 for the new report2.
> >> >
> >> > I added the fields that I needed and put them on the report in place of
> >> > the
> >> > original fields from report1. When I run the sp from the data tab all
> >> > of the
> >> > correct data shows up. However, when I try to preview the report2 I get
> >> > an
> >> > error message that says "The value expression for the query parameter
> >> > '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the
> >> > data
> >> > tab, with dataset2 showing, I click on the "..." to bring up the
> >> > dataset
> >> > dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In
> >> > the
> >> > dataset dropdown box, I can set the original dataset1. I'm wondering if
> >> > when
> >> > I try to preview the report, it gets '@.ISRID' from the dataset1
> >> > dataset. If
> >> > so, can I safely delete dataset1? If I delete dataset1 is it deleted
> >> > only for
> >> > report2 or will it also be deleted from report1 where it's still
> >> > needed?
> >> >
> >> > Thanks,
> >> > --
> >> > Dan D.
> >>
> >>
>
>|||I'm over that hurdle now. And thanks for the additional information.
I'm having trouble now doing some counts. If you have a chance I have
another thread called "counting with a filter" in this same forum. I'm trying
to count a couple of different things but not having much luck. I've tried
counting in the table footer and in a group but I can't get it like I need
it. Is it possible to use a filter in a count expression (i.e.
Count(Fields!Item.Value) where Fields!Item.Value = 'FecEx')?
Thanks again for your help,
--
Dan D.
"Josh" wrote:
> Dan,
> It sounds like you are already close to where you want to be, but I'll
> mention a few things.
> 1. If the reports are so different, just start over. If it is a simple
> report, the New Report Wizard does a pretty good job.
> 2. I was going to suggest modifying the XML as well. (Definitely be
> careful if you do this; make a backup copy before you do anything.) If
> the reports are VERY similar, you can use the Find and Replace feature
> to swap out field names in the XML.
> 3. Another option would be to give the query output fields aliases. If
> you look at the query properties by clicking the '...', you can modify
> the aliases in the Fields tab. This would basically rename the new
> fields so that they fit right into the old report's table. Does this
> make sense? If a particular table column in your report was looking for
> "Fields!customer.Value", you could give the "employee" field in your
> query an alias of "customer" so that you don't have to change the
> table. I don't know that I would recommend this option because it is
> "messy" and might be hard for the next developer to maintain, but it is
> a quick fix.
> 4. You probably know this, but I'll mention it just in case. The names
> of the report items (like tables, text boxes, group names, etc.) do not
> matter. Your group section that refers to "tbActivity" is probably
> fine. What you have to worry about is the value, expression, or bound
> data item behind each object. That might lower the number of items that
> you have to change.
> -Josh
>
> Bruce L-C [MVP] wrote:
> > It's been awhile but I have in the past edited the xml (the RDL file is just
> > XML). Be careful, you can easily destroy the report. Make a copy first. You
> > can edit the XML directly in VS. Layout mode, Menu View-> Code.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> > news:856B3981-9335-42A4-BFDE-E287A29F767E@.microsoft.com...
> > >I can't get rid of the detail and group sections that refer to the original
> > > report that I copied from. When I try to add a new section the default
> > > name
> > > is "tbActivity" which is the name of the table in the original report. Any
> > > idea how I can get rid of the reference to the original report so I can
> > > add
> > > info from the new dataset and new report?
> > >
> > > Thanks,
> > > --
> > > Dan D.
> > >
> > >
> > > "Josh" wrote:
> > >
> > >>
> > >> Dan,
> > >>
> > >> Here's how the parameters work. There are query parameters and report
> > >> parameters. Report parameters are what the user actually interacts with
> > >> during report execution. Most of the time, there will be a 1-to-1
> > >> relationship between the 2, but you might find a need to create a
> > >> report parameter that is not linked to a query parameter. If you wanted
> > >> to use a parameter for a report rendering option (like font color or
> > >> something), you could create a report parameter and the query would not
> > >> even know that parameter exists.
> > >>
> > >> In order for the report parameter to pass its value to the query
> > >> parameter, they have to be "linked". The parameters tab when you click
> > >> '...' next to your dataset name is where you link them. On the left,
> > >> you will see the parameters used in the query, and on the right, you
> > >> assign report parameters to them.
> > >>
> > >> To modify the report parameters, go to the Design view of your report,
> > >> click the Report menu, and click Report Parameters. Your query
> > >> parameter is trying to reference a report parameter that doesn't exist,
> > >> so double-check and make sure that everything is set up the way that it
> > >> should be. If there are no report parameters, create one called ISRID
> > >> and assign it the correct data type.
> > >>
> > >> Hope this helps!
> > >>
> > >> -Josh
> > >>
> > >>
> > >> Dan D. wrote:
> > >> > Using SS2000 SP4, VS2003 and RS2000. I copied a report, call it report1
> > >> > and
> > >> > created a new report, call it report2. When I first looked at the data
> > >> > tab in
> > >> > VS, there was a dataset there from the original report1, call it
> > >> > dataset1.
> > >> > Dataset1 used a different stored procedure. I created a new dataset,
> > >> > call it
> > >> > dataset2 for the new report2.
> > >> >
> > >> > I added the fields that I needed and put them on the report in place of
> > >> > the
> > >> > original fields from report1. When I run the sp from the data tab all
> > >> > of the
> > >> > correct data shows up. However, when I try to preview the report2 I get
> > >> > an
> > >> > error message that says "The value expression for the query parameter
> > >> > '@.ISRID' refers to a non-existing report parameter 'ISRID'. From the
> > >> > data
> > >> > tab, with dataset2 showing, I click on the "..." to bring up the
> > >> > dataset
> > >> > dialog box. I go to the "parameters" tab but '@.ISRID' isn't there. In
> > >> > the
> > >> > dataset dropdown box, I can set the original dataset1. I'm wondering if
> > >> > when
> > >> > I try to preview the report, it gets '@.ISRID' from the dataset1
> > >> > dataset. If
> > >> > so, can I safely delete dataset1? If I delete dataset1 is it deleted
> > >> > only for
> > >> > report2 or will it also be deleted from report1 where it's still
> > >> > needed?
> > >> >
> > >> > Thanks,
> > >> > --
> > >> > Dan D.
> > >>
> > >>
>

Friday, February 24, 2012

databases disappeared but MDF, LDF still there...

I have been using SQL Server 2000 but not am not an expert on it. I recently
copied databases into a new server using Database Copy Wizard. The previous
databases were copied with no problems. The last one however, still copied
ok but the databases on the "source" server disappeared! I tried
"re-copying" same databases back into the source server but I am getting a
'name conflict' error. From my research, this meant the mdf and ldf files
are still there. Note that I "copied" and NOT "moved" these databases. Can
you please tell me how I can restore these databases? I also tried
re-creating the missing database so I can export data back into it but I got
"Error 5170: Cannot create file 'e:\data\MSSQL\...\.MDF' because it already
exists. etc" Thank you for helping.
--
_________________
Freedom is nothing else but a chance to be better. (Albert Camus)One of the reason could be, the source and the destination database file
names could be same.
When you are using copy database wizard, try to modify destination file name
to something else and then try to copy.
Hopefully, it should work.
Thanks
GYK

Friday, February 17, 2012

Database will not attach.

Hi,

We are trying to attach a Database from SQL7 to SQL2K SP3.

On SQL7

The Database was detached and the MDF copied to the New Server.

On SQL2K

We used the attach Db (in Enterprise Manager).

We get a red 'x' as normal against the logfile and noramlly it would create a new one when u proceed, but this time we are getting an error after the dialogue box asking to create a new one:

Error 1813: Could not open new database 'dbname'. CREATE DATABASE is aborted.

Device activation error. The physical file name 'd:\mssql7\data\dbname.ldf' maybe incorrect.

The path is where the logfile resided on the old server.

Regards

John.

Hi,

It seems your old database have mutiple LDF files. If you have mutilple LDF files missed out you will not be able to use the procedure sp_attach_single_file_db (or through Enterprise Manager) to attach the MDF file alone.

A solution for this is:

1. Create a new database with the same name and same MDF and LDF files

2. Stop sql server and rename the existing MDF to a new one and copy the original MDF to this location and delete

the LDF files.

3. STart SQL Server

4. Now your database will be marked suspect

5. Update the sysdatabases to update to Emergency mode. This will not use LOG files

update sysdatabases set status=32768 where name ='dbname'

6. Restart sql server. now the database will be in emergency mode

7. Now execute the undocumented DBCC to create a log file

DBCC REBUILDLOG(dbname,'c:\dbname.ldf')

8. Execute sp_resetstatus <dbname>

9. Restart SQL server and see the database is online.

|||Check if this path "'d:\mssql7\data\dbname.ldf'" exists in your new server or else point this one to a valid path.
|||

This usually happens when SQL Server is unable to create the log file with the same full name. Is 'd:\mssql7\data\dbname.ldf' a valid path in the new machine? I recommend always copying the log file with the database, otherwise the database may not be able to recover. You can use the following SP to attach the database in the new location:

sp_attach_db 'dbname', 'new_path_to_mdf', 'new_path_to_ldf'

Thanks,

Fabricio.

Database will not attach.

Hi,

We are trying to attach a Database from SQL7 to SQL2K SP3.

On SQL7

The Database was detached and the MDF copied to the New Server.

On SQL2K

We used the attach Db (in Enterprise Manager).

We get a red 'x' as normal against the logfile and noramlly it would create a new one when u proceed, but this time we are getting an error after the dialogue box asking to create a new one:

Error 1813: Could not open new database 'dbname'. CREATE DATABASE is aborted.

Device activation error. The physical file name 'd:\mssql7\data\dbname.ldf' maybe incorrect.

The path is where the logfile resided on the old server.

Regards

John.

Hi,

It seems your old database have mutiple LDF files. If you have mutilple LDF files missed out you will not be able to use the procedure sp_attach_single_file_db (or through Enterprise Manager) to attach the MDF file alone.

A solution for this is:

1. Create a new database with the same name and same MDF and LDF files

2. Stop sql server and rename the existing MDF to a new one and copy the original MDF to this location and delete

the LDF files.

3. STart SQL Server

4. Now your database will be marked suspect

5. Update the sysdatabases to update to Emergency mode. This will not use LOG files

update sysdatabases set status=32768 where name ='dbname'

6. Restart sql server. now the database will be in emergency mode

7. Now execute the undocumented DBCC to create a log file

DBCC REBUILDLOG(dbname,'c:\dbname.ldf')

8. Execute sp_resetstatus <dbname>

9. Restart SQL server and see the database is online.

|||Check if this path "'d:\mssql7\data\dbname.ldf'" exists in your new server or else point this one to a valid path.
|||

This usually happens when SQL Server is unable to create the log file with the same full name. Is 'd:\mssql7\data\dbname.ldf' a valid path in the new machine? I recommend always copying the log file with the database, otherwise the database may not be able to recover. You can use the following SP to attach the database in the new location:

sp_attach_db 'dbname', 'new_path_to_mdf', 'new_path_to_ldf'

Thanks,

Fabricio.