Showing posts with label generate. Show all posts
Showing posts with label generate. Show all posts

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
> >
> >
>
>

Tuesday, March 20, 2012

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
> >

Monday, March 19, 2012

Can the usage of a Cursor dynamically generate a query statement?

Hi,
As far as my understanding goes, cursors can be used to fill in variables as
it iterates through a pre-defined hardcoded query.
Would like to know if I can make a dynamic query within a cursor and
subsequently
pump values obtained from this dynamic query into their respective variables
.
Appreciate any form of reply! Thanks!
An extract of the code (it doesn't run):
DECLARE Scursor CURSOR FOR
SELECT isnull(@.account_colname, '')
, isnull(@.trans_date_colname, '')
, isnull(@.trans_time_colname, '')
, isnull(@.trans_type_colname, '')
, isnull(@.auxtrc_colname, '')
, isnull(@.auxtrc_colname, '')
, isnull(@.ref_no_colname, '')
, isnull(@.ref_no_colname, '')
, isnull(@.amount_colname, '')
, isnull(@.teller_colname, '')
, isnull(@.teller_colname, '')
, isnull(@.seq_colname, '')
-- ,ROWIDTOCHAR(rowid) --ROWID
FROM isnull(@.source_tabname, '')
WHERE isnull(CASE @.mode_day_all WHEN 'DAY' THEN @.p_trans_date END, '') +
isnull(@.erritx_colname, '') = isnull(@.erritx_flag, '')
AND isnull(@.contra_colname, '') IS NULL
OPEN ScursorHi Arthur,
The dynamic queries will be executed in a seperate memory space so u will
not be able to access any of the local variables. This holds good for your
cursors as well. u ll not be able to call them within your D-SQL.
rgds,
anu
"Arthur" wrote:

> Hi,
> As far as my understanding goes, cursors can be used to fill in variables
as
> it iterates through a pre-defined hardcoded query.
> Would like to know if I can make a dynamic query within a cursor and
> subsequently
> pump values obtained from this dynamic query into their respective variabl
es.
> Appreciate any form of reply! Thanks!
> An extract of the code (it doesn't run):
> DECLARE Scursor CURSOR FOR
> SELECT isnull(@.account_colname, '')
> , isnull(@.trans_date_colname, '')
> , isnull(@.trans_time_colname, '')
> , isnull(@.trans_type_colname, '')
> , isnull(@.auxtrc_colname, '')
> , isnull(@.auxtrc_colname, '')
> , isnull(@.ref_no_colname, '')
> , isnull(@.ref_no_colname, '')
> , isnull(@.amount_colname, '')
> , isnull(@.teller_colname, '')
> , isnull(@.teller_colname, '')
> , isnull(@.seq_colname, '')
> -- ,ROWIDTOCHAR(rowid) --ROWID
> FROM isnull(@.source_tabname, '')
> WHERE isnull(CASE @.mode_day_all WHEN 'DAY' THEN @.p_trans_date END, '') +
> isnull(@.erritx_colname, '') = isnull(@.erritx_flag, '')
> AND isnull(@.contra_colname, '') IS NULL
> OPEN Scursor
>
>|||Why cursors? Why dynamic SQL? Both are things that you should try to
avoid.
If you need more help, please specify your actual problem:
http://www.aspfaq.com/etiquette.asp?id=5006
--
David Portas
SQL Server MVP
--|||The answer is yes, and the question is why do you want to do this?. Try
finding a set based solution to the problem and leave cursors as the last
resource in your pocket.
Example:
use northwind
go
declare @.my_cursor cursor
declare @.sql nvarchar(4000)
declare @.sd datetime
declare @.ed datetime
declare @.order_id int
declare @.order_date datetime
set @.sd = '19960101'
set @.ed = '19970101'
set @.sql = N'set @.c = cursor local fast_forward for select orderid,
orderdate from dbo.orders where orderdate >= '''
set @.sql = @.sql + convert(char(8), @.sd, 112) + N''' and orderdate < ''' +
convert(char(8), @.ed, 112) + N''''
set @.sql = @.sql + N'; open @.c'
execute sp_executesql @.sql, N'@.c cursor output', @.c = @.my_cursor output
if cursor_status('variable', '@.my_cursor') = 1
begin
while 1 = 1
begin
fetch next from @.my_cursor into @.order_id, @.order_date
if @.@.error <> 0 or @.@.fetch_status <> 0 break
select @.order_id, @.order_date
end
end
close @.my_cursor
deallocate @.my_cursor
go
The Curse and Blessings of Dynamic SQL
http://www.sommarskog.se/dynamic_sql.html
AMB
"Arthur" wrote:

> Hi,
> As far as my understanding goes, cursors can be used to fill in variables
as
> it iterates through a pre-defined hardcoded query.
> Would like to know if I can make a dynamic query within a cursor and
> subsequently
> pump values obtained from this dynamic query into their respective variabl
es.
> Appreciate any form of reply! Thanks!
> An extract of the code (it doesn't run):
> DECLARE Scursor CURSOR FOR
> SELECT isnull(@.account_colname, '')
> , isnull(@.trans_date_colname, '')
> , isnull(@.trans_time_colname, '')
> , isnull(@.trans_type_colname, '')
> , isnull(@.auxtrc_colname, '')
> , isnull(@.auxtrc_colname, '')
> , isnull(@.ref_no_colname, '')
> , isnull(@.ref_no_colname, '')
> , isnull(@.amount_colname, '')
> , isnull(@.teller_colname, '')
> , isnull(@.teller_colname, '')
> , isnull(@.seq_colname, '')
> -- ,ROWIDTOCHAR(rowid) --ROWID
> FROM isnull(@.source_tabname, '')
> WHERE isnull(CASE @.mode_day_all WHEN 'DAY' THEN @.p_trans_date END, '') +
> isnull(@.erritx_colname, '') = isnull(@.erritx_flag, '')
> AND isnull(@.contra_colname, '') IS NULL
> OPEN Scursor
>
>

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
>