Showing posts with label dataset. Show all posts
Showing posts with label dataset. Show all posts

Tuesday, March 27, 2012

can we do string manipulation on a parameter?

I populated a parameter list with dataset.
The parameter @.type_year has items look like
"plan_2000" or "Actual_2000".
Now my question is, if we can use some string function targeting @.type_year in the query.
something like "select ..... from ... where
year=getyear(@.type_year) and type=gettype(@.type_year)" ?
Please let me know if you know the feasibility. Thanks.
Sincerelyyou can. regarding your SQL database its easier to do.
for example in SQL Serbver, you can create 2 functions to extract the year
part or the type part of your parameter. (using the SQL substring function)
but I recommand to use 2 parameters
* 1 for the year
* 1 for the type
"Frank RS" <FrankRS@.discussions.microsoft.com> a écrit dans le message de
news:2B0E0EA7-2955-4B9A-BEFA-053ECA609CB9@.microsoft.com...
> I populated a parameter list with dataset.
> The parameter @.type_year has items look like
> "plan_2000" or "Actual_2000".
> Now my question is, if we can use some string function targeting
@.type_year in the query.
> something like "select ..... from ... where
> year=getyear(@.type_year) and type=gettype(@.type_year)" ?
> Please let me know if you know the feasibility. Thanks.
>
> Sincerely

Sunday, March 25, 2012

Can we capture DataSet?

hi,
I would like to use the generated dataset in rdl file to generate
charts(third party component) if needed, As of now just the report is
displayed with out any graph.
In order to achieve this i have to capture the dataset (mdx query) through
custom code or any other means which will allow me to use the same dataset to
populate the chart if required.
Any examples would be very useful.
Many ThanksThis is hard to achieve within RS 2000.
RS 2005 will have a new CustomReportItem feature which will expose the
(processed, RDL grouped, filtered, sorted) data to a custom processing
control which can then generate an image/chart from the data.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"VP" <VP@.discussions.microsoft.com> wrote in message
news:A8F4ADE7-66B4-46C6-87A0-263FDAE43DFD@.microsoft.com...
> hi,
> I would like to use the generated dataset in rdl file to generate
> charts(third party component) if needed, As of now just the report is
> displayed with out any graph.
> In order to achieve this i have to capture the dataset (mdx query) through
> custom code or any other means which will allow me to use the same dataset
> to
> populate the chart if required.
> Any examples would be very useful.
> Many Thanks
>|||Thanks for the information.
VP
"Robert Bruckner [MSFT]" wrote:
> This is hard to achieve within RS 2000.
> RS 2005 will have a new CustomReportItem feature which will expose the
> (processed, RDL grouped, filtered, sorted) data to a custom processing
> control which can then generate an image/chart from the data.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "VP" <VP@.discussions.microsoft.com> wrote in message
> news:A8F4ADE7-66B4-46C6-87A0-263FDAE43DFD@.microsoft.com...
> > hi,
> >
> > I would like to use the generated dataset in rdl file to generate
> > charts(third party component) if needed, As of now just the report is
> > displayed with out any graph.
> > In order to achieve this i have to capture the dataset (mdx query) through
> > custom code or any other means which will allow me to use the same dataset
> > to
> > populate the chart if required.
> > Any examples would be very useful.
> >
> > Many Thanks
> >
> >
>
>

Can We assign DataSet object to Object Type

Hi Friends,

I am having a Package scope variable DS of type system.object .In the Script Component which accept this variable as ReadWrite type I am Making the following assignment.

Public Overrides Sub PostExecute()

Variables.DsReport = DsReport // DsReport is a Data Set Object Created and Populated inside the script Component

End Sub

I am getting error while doing this sort of assignment.

Please help me to solve this problem

Regards,

Mahe

Which error do you get?

-Tom

Thursday, March 22, 2012

Can Use Fieids of diffirent datasets in a matrix ?

Can Use Fieids of diffirent datasets in a matrix ? SUM(Fields!a.value) is invalid?
Field a is in the other dataset!No, fields from multiple datasets are not allowed in a single dataregion. This would require a cross-dataset join, which is not supported. It is something we would like to add at some point in the future.|||The last message on this thread is from late 2005. Has this feature (cross-dataset join) being supported now? Thanks|||This relates to a similar post of mine...

Is it not possible to dynamically decide which dataset a table will use ?

sql

Can Use Fieids of diffirent datasets in a matrix ?

Can Use Fieids of diffirent datasets in a matrix ? SUM(Fields!a.value) is invalid?
Field a is in the other dataset!No, fields from multiple datasets are not allowed in a single dataregion. This would require a cross-dataset join, which is not supported. It is something we would like to add at some point in the future.|||The last message on this thread is from late 2005. Has this feature (cross-dataset join) being supported now? Thanks|||This relates to a similar post of mine...

Is it not possible to dynamically decide which dataset a table will use ?

Tuesday, March 20, 2012

Can this be done?

Hello,

I have been trying to figure out what seems to be a simple task:

I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.

I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?

I also tried this: The below code sets the value for MYTEXTBOX. If the value in “MyField” of my dataset = “0.0”, I want MYTEXTBOX to hold the value of “MyRelatedField” (so another field within the same row of my dataset). Otherwise, DO NOTHING!!!!!, but because all functions MUST return a value, I attempted to return the value of MYTEXTBOX—hence setting it equal to what it already is, but this give me #ERROR!

=iif(Fields!MyField.Value = "0.0",Fields!MyRelatedField.Value, ReportItems!MYTEXTBOX.Value)

I have read the wrox reporting service book from front to back, and what seems like pie is giving me a grief—any help, link or advice would be so much appreciated!...much thanks, John

It could be done through some custom code. Store the data set element access code in a little class and refer it from the report

http://msdn2.microsoft.com/en-us/library/ms155798.aspx

|||

Johnny606 wrote:

I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.

I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?


What about saving the first dataset into a multivalue report parameter (make it internal or hidden if you do not want users to see it)
Make a 2nd dataset that selects top 3 from the multivalue parameter.

The textfield value should then be something like =Last(Fields!<nameOfField>.Value, "<name of 1st dataset>")

That way you have not changed the first dataset and you get the correct value in your text box

I cannot test it at the moment so it might not work (I'm in the middle of installing the SP2 CTP and have a little time for surfing while it's doing its thing) :-)

Can this be done?

I have to generate a 2-part report like this:
part 1: A summary (just a table) with each row being a row in the
dataset. This could be 500 or so rows.
part 2: A detail where each page is equal to a row in the dataset
(same dataset).
The trick part is this. The summary MUST be on letter-size paper.
The detail part MUST be on legal size paper. They MUST be in the same
print job - not 2 separate reports (maybe a subreport?)
I assume I must have a report (summary) which contains a subreport
(detail) and then render it as a PDF.
Any ideas/infoi/suggestions GREATLY appreciated.
DBcan u show a sketch of how you want your report to be..
check if document map serves your purpose'
"DaveB" <dbraseth@.comcast.net> wrote in message
news:e573af22.0409161853.30e2d6ba@.posting.google.com...
>I have to generate a 2-part report like this:
> part 1: A summary (just a table) with each row being a row in the
> dataset. This could be 500 or so rows.
> part 2: A detail where each page is equal to a row in the dataset
> (same dataset).
> The trick part is this. The summary MUST be on letter-size paper.
> The detail part MUST be on legal size paper. They MUST be in the same
> print job - not 2 separate reports (maybe a subreport?)
> I assume I must have a report (summary) which contains a subreport
> (detail) and then render it as a PDF.
> Any ideas/infoi/suggestions GREATLY appreciated.
> DB|||hi Dave,
i have the same problem. please let me know if you find a solution.
Thanks, Mirela
"DaveB" wrote:
> I have to generate a 2-part report like this:
> part 1: A summary (just a table) with each row being a row in the
> dataset. This could be 500 or so rows.
> part 2: A detail where each page is equal to a row in the dataset
> (same dataset).
> The trick part is this. The summary MUST be on letter-size paper.
> The detail part MUST be on legal size paper. They MUST be in the same
> print job - not 2 separate reports (maybe a subreport?)
> I assume I must have a report (summary) which contains a subreport
> (detail) and then render it as a PDF.
> Any ideas/infoi/suggestions GREATLY appreciated.
> DB
>|||"avnrao" <avn@.newsgroups.com> wrote in message news:<uq2KJhHnEHA.3324@.TK2MSFTNGP15.phx.gbl>...
> can u show a sketch of how you want your report to be..
> check if document map serves your purpose'
>
> "DaveB" <dbraseth@.comcast.net> wrote in message
> news:e573af22.0409161853.30e2d6ba@.posting.google.com...
> >I have to generate a 2-part report like this:
> >
> > part 1: A summary (just a table) with each row being a row in the
> > dataset. This could be 500 or so rows.
> >
> > part 2: A detail where each page is equal to a row in the dataset
> > (same dataset).
> >
> > The trick part is this. The summary MUST be on letter-size paper.
> > The detail part MUST be on legal size paper. They MUST be in the same
> > print job - not 2 separate reports (maybe a subreport?)
> >
> > I assume I must have a report (summary) which contains a subreport
> > (detail) and then render it as a PDF.
> >
> > Any ideas/infoi/suggestions GREATLY appreciated.
> >
> > DB
Good idea - but I'm not sure how to sketch it in text. Ideas?|||I don't think that you can change page size from page to page but I am not
100% sure. You could do a quick check, create a subreport and make it legal
and put it on a report that is letter size. I think this is the key issue.
Otherwise, what you are going to have to do is do a lot of it your self with
a front end that you integrate with Report Services using web services
integration.
Bruce L-C
"DaveB" <dbraseth@.comcast.net> wrote in message
news:e573af22.0409170553.329ce3ea@.posting.google.com...
> "avnrao" <avn@.newsgroups.com> wrote in message
news:<uq2KJhHnEHA.3324@.TK2MSFTNGP15.phx.gbl>...
> > can u show a sketch of how you want your report to be..
> > check if document map serves your purpose'
> >
> >
> > "DaveB" <dbraseth@.comcast.net> wrote in message
> > news:e573af22.0409161853.30e2d6ba@.posting.google.com...
> > >I have to generate a 2-part report like this:
> > >
> > > part 1: A summary (just a table) with each row being a row in the
> > > dataset. This could be 500 or so rows.
> > >
> > > part 2: A detail where each page is equal to a row in the dataset
> > > (same dataset).
> > >
> > > The trick part is this. The summary MUST be on letter-size paper.
> > > The detail part MUST be on legal size paper. They MUST be in the same
> > > print job - not 2 separate reports (maybe a subreport?)
> > >
> > > I assume I must have a report (summary) which contains a subreport
> > > (detail) and then render it as a PDF.
> > >
> > > Any ideas/infoi/suggestions GREATLY appreciated.
> > >
> > > DB
> Good idea - but I'm not sure how to sketch it in text. Ideas?|||OK - here's the compromise...
2 reports.
each is rendered to a blank form and turned into an inline pdf.
the user (at this point) must print them in order
When using the subreport approach, it looked like the sub inherited the
margins of the main (maybe I'm doing it wrong) - so that was not useful for
me.
HTH
"Mirela" wrote:
> hi Dave,
> i have the same problem. please let me know if you find a solution.
> Thanks, Mirela
> "DaveB" wrote:
> > I have to generate a 2-part report like this:
> >
> > part 1: A summary (just a table) with each row being a row in the
> > dataset. This could be 500 or so rows.
> >
> > part 2: A detail where each page is equal to a row in the dataset
> > (same dataset).
> >
> > The trick part is this. The summary MUST be on letter-size paper.
> > The detail part MUST be on legal size paper. They MUST be in the same
> > print job - not 2 separate reports (maybe a subreport?)
> >
> > I assume I must have a report (summary) which contains a subreport
> > (detail) and then render it as a PDF.
> >
> > Any ideas/infoi/suggestions GREATLY appreciated.
> >
> > DB
> >

Sunday, March 11, 2012

Can SSRS use an ASP.NET dataset?

We find that quite often we have devoted a great deal of work in our asp.net
application to generate just the right dataset. Now we want to produce a
report from it. Is there any way just to pass our existing dataset to
reporting services instead of having to re-inquire, re-filter, re-join, etc?
thanks,
THI Tim,
> We find that quite often we have devoted a great deal of work in our
asp.net
> application to generate just the right dataset. Now we want to produce a
> report from it. Is there any way just to pass our existing dataset to
> reporting services instead of having to re-inquire, re-filter, re-join,
etc?
Yes, I have solved the same question.
I have implemented a custom RS DataExtension. The DataExtension use a
System.Data.Dataset as data source.
At report design time I use an XML file to load schema and sample data.
When I must cosume the report from my ASP.NET application I use
ReportingServices web service (render method) and I pass my dataset as
parameters... I pass dataset as XML String: your custom DataExtension must
be able to treat it.
The dataset must have a compatible schema with dataset you have used to
design report.
You can find a sample of DataExtension implementation in your folder
"C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\Samples\Extensions\FsiDataExtension".
HTH M.rkino
--
Marco Barzaghi - [MVP - MCP]
http://mvp.support.microsoft.com - http://italy.mvps.org
UGIDotNet - User Group Italiano .NET, http://www.ugidotnet.org
Read my WebLog: http://www.ugidotnet.org/436.blog|||Marco has a good solution if you must do it this way. But look at the hoops
to go through. First you have to write a data extension (although this could
be done just once). But then look at what you have to do with every report
you want to do. You have to have an xml defining the schema with some sample
data. This will definitely affect productivity in creating reports plus it
raises the skill level necessary to create reports. My feeling is that a
better direction to take is to put the logic into a stored procedure. If you
have code that ends up with a dataset in your asp application then someone
can easily look at it and create a stored procedure. I have been doing that
some when taking reports written in C. Although, when people work in
something like C, C#, VB they don't tend to solve the solution in a set
based manner so sometimes you are better off to totally rewrite the logic.
Anyway, once it is in a stored procedure then both your asp application and
RS can use it. RS supports stored procedures quite well (at least with SQL
Server, I have tried unsuccessfully with Sybase 11.x). My guess is the
effort to encapsulate the logic into a stored procedure will be no greater
than going through the hoops for a data extension. Once Yukon comes out then
this would be even easier to port your code to a stored procedure but for
now you would need to use T-SQL.
Now, in some cases you can not use a stored procedure easily in which case
Marco's solution is a very elegant one.
Bruce L-C
"Tim Seaburn" <tims@.removespamexcite.com> wrote in message
news:OIwXtK1WEHA.2852@.TK2MSFTNGP12.phx.gbl...
> We find that quite often we have devoted a great deal of work in our
asp.net
> application to generate just the right dataset. Now we want to produce a
> report from it. Is there any way just to pass our existing dataset to
> reporting services instead of having to re-inquire, re-filter, re-join,
etc?
> thanks,
> T
>

Saturday, February 25, 2012

Can someone please tell me how to go about changiing a datasource/dataset schema?

I have managed to cobble up a VS2005 PPC app that has 10 or so tables in it. Of course when I started binding to the tables in my app, pretty soon I ran into an error I had made defining a datatype for a column in one table. Single instead of string. I have spent most of the day trying to modify something to change this column datatype. No luck.

1. Seems you cannot edit the schema in VS2005 to modify the datatype. After messing around, now the project will not open at all.

2. Cannot get the ADS wizard to go anymore, so cannot make .mdb schema change and pull down updated column/table.

3. Thought SQL Server 2005 had a tool you could just open up a .sdf file and change the schema. No luck. At least no intuitive way showed itself after I installed it.

4. Thought SQL Server Express Editition could open such a .sdf file and modify it so installed it. Again, could not figure out how this works either.

I suppose I could start over from scratch and create a new app datasource/dataset in VS2005, but I have done that so many times before, I am getting crabby thinking about doing it again. There must be a better way? Isn't there?

Thank you.

I think I finally have stumbled upon e a crude method to accomplish a change in a sdf file included in a VS project.

0. Assuming there is a Data Connection to the sdf file:

1. I either create a new table in the open the table to edit the table schema.

2. If I want to add or rename a column name, I have to delete all columns down to the insertion point, then add the new column. The data types can be changed at any time. Then one has to add back the columns that were deleted.

3. Close the VS project.

4. Go the to Project directory and copy the sdf file.

5. Reopen the VS project.

6. Delete the Data Connection to the sdf file. If the sdf still exists in the project tree delete it. If the dataset.xsd still exists in the project tree, delete it.

7. Close the project, reopen it.

8. Rename the copied sdf file back to the desired sdf file name.

9. Use the Data->Add New Data Source dialog wizard to browse to the sdf file (the renamed copy).

10. Select tables checkbox.

11. VS wizard should add back in the sdf file Data Connection back into your project, ask you if you want to include the sdf in your project and builds the dataset.xsd objects.

Seems like SQL Svr Management Studio running can interfere.

Remember to check the "Copy to" the device settings.

THere is no doubt a more streamlined way to accomplish an sdf edit but I sure do not know of one.

Can someone please tell me how to go about changiing a datasource/dataset schema?

I have managed to cobble up a VS2005 PPC app that has 10 or so tables in it. Of course when I started binding to the tables in my app, pretty soon I ran into an error I had made defining a datatype for a column in one table. Single instead of string. I have spent most of the day trying to modify something to change this column datatype. No luck.

1. Seems you cannot edit the schema in VS2005 to modify the datatype. After messing around, now the project will not open at all.

2. Cannot get the ADS wizard to go anymore, so cannot make .mdb schema change and pull down updated column/table.

3. Thought SQL Server 2005 had a tool you could just open up a .sdf file and change the schema. No luck. At least no intuitive way showed itself after I installed it.

4. Thought SQL Server Express Editition could open such a .sdf file and modify it so installed it. Again, could not figure out how this works either.

I suppose I could start over from scratch and create a new app datasource/dataset in VS2005, but I have done that so many times before, I am getting crabby thinking about doing it again. There must be a better way? Isn't there?

Thank you.

I think I finally have stumbled upon e a crude method to accomplish a change in a sdf file included in a VS project.

0. Assuming there is a Data Connection to the sdf file:

1. I either create a new table in the open the table to edit the table schema.

2. If I want to add or rename a column name, I have to delete all columns down to the insertion point, then add the new column. The data types can be changed at any time. Then one has to add back the columns that were deleted.

3. Close the VS project.

4. Go the to Project directory and copy the sdf file.

5. Reopen the VS project.

6. Delete the Data Connection to the sdf file. If the sdf still exists in the project tree delete it. If the dataset.xsd still exists in the project tree, delete it.

7. Close the project, reopen it.

8. Rename the copied sdf file back to the desired sdf file name.

9. Use the Data->Add New Data Source dialog wizard to browse to the sdf file (the renamed copy).

10. Select tables checkbox.

11. VS wizard should add back in the sdf file Data Connection back into your project, ask you if you want to include the sdf in your project and builds the dataset.xsd objects.

Seems like SQL Svr Management Studio running can interfere.

Remember to check the "Copy to" the device settings.

THere is no doubt a more streamlined way to accomplish an sdf edit but I sure do not know of one.