Showing posts with label advanced. Show all posts
Showing posts with label advanced. Show all posts

Monday, March 26, 2012

How to Create Dynamic Report Using Reporting Services

Hi all,
I was wondering is Reporting Services can be used to create dynamic
report as Crystal Report Advanced Edition do? So, we can add new object
based on user requirement through coding.
For example the scenario is (with VB6):
There's 5 checkbox that's reflect 5 database field of a table that will
be choosed by user and appear at the report.
My consideration is, even though Reporting Services can be used at
Windows environment using IE control, the report must be compiled &
built, so if we... we can say... create report runtime is it possible
to do it at Reporting Services?Hi Resant,
YOu have to deploy (publish) the report on the server in order to run it.
You can create an interface that allows the user to create on the fly base on
metadata. But the preview has to come afte a publish.
see this ASP.NET demo, it may has ideas
http://www.rdlcomponents.com/ASPExamples/default.aspx
Thanks
Jerry
"Resant" wrote:
> Hi all,
> I was wondering is Reporting Services can be used to create dynamic
> report as Crystal Report Advanced Edition do? So, we can add new object
> based on user requirement through coding.
> For example the scenario is (with VB6):
> There's 5 checkbox that's reflect 5 database field of a table that will
> be choosed by user and appear at the report.
> My consideration is, even though Reporting Services can be used at
> Windows environment using IE control, the report must be compiled &
> built, so if we... we can say... create report runtime is it possible
> to do it at Reporting Services?
>|||Actually my conception exactly the same as the interface that's shown
by ASP.NET demo, I don't mind if I must learn RDL code, but could you
share how to publish the report on the server automatically (through
coding or the others) ?
I'm interested with RDL Component, how is the component work? Is it
read RDL code and change it into ASP code?
waiting for your reply...|||If you are interested in this I strongly suggest that you look at the new
report controls in the newest beta for Widbey (Visual Studio). There are two
controls: web and winform. They can work with server or work in local mode.
The best thing to understand how RS works is to go read this very good
article here:
http://www.microsoft.com/sql/reporting/techinfo/techoverview.asp
RDL stands for Report Definition Language. It is an XML document that
defines the report in a output independent manner. HTML output is just one
of the rendering outputs (RS also does PDF, Excel, etc). The spec is here:
http://www.microsoft.com/sql/reporting/techinfo/rdlspec.asp
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Resant" <resant_v@.yahoo.com> wrote in message
news:1114566998.702015.164760@.g14g2000cwa.googlegroups.com...
> Actually my conception exactly the same as the interface that's shown
> by ASP.NET demo, I don't mind if I must learn RDL code, but could you
> share how to publish the report on the server automatically (through
> coding or the others) ?
> I'm interested with RDL Component, how is the component work? Is it
> read RDL code and change it into ASP code?
> waiting for your reply...
>|||Hi Resant,
The full source code for Publish the report is there.
And the component basically convert (read/write) the XML representation
in objects/collections, in the case the programmer does not want to deal with
the RDL specification and writting raw
XML(http://www.microsoft.com/sql/reporting/techinfo/rdlspec.asp).
The ASP.NET interface helps you to select the items to be included in the
report, but its not reading or using any metadata at all.
Hopefully it help you to start.
Thanks
Jerry
--
The first RDL reader/writer of the market.
http://www.rdlcomponents.com
"Resant" wrote:
> Actually my conception exactly the same as the interface that's shown
> by ASP.NET demo, I don't mind if I must learn RDL code, but could you
> share how to publish the report on the server automatically (through
> coding or the others) ?
> I'm interested with RDL Component, how is the component work? Is it
> read RDL code and change it into ASP code?
> waiting for your reply...
>|||Hi Bruce,
Where we can find information abou the web and winform controls?
Thanks
Jerry
"Bruce L-C [MVP]" wrote:
> If you are interested in this I strongly suggest that you look at the new
> report controls in the newest beta for Widbey (Visual Studio). There are two
> controls: web and winform. They can work with server or work in local mode.
> The best thing to understand how RS works is to go read this very good
> article here:
> http://www.microsoft.com/sql/reporting/techinfo/techoverview.asp
> RDL stands for Report Definition Language. It is an XML document that
> defines the report in a output independent manner. HTML output is just one
> of the rendering outputs (RS also does PDF, Excel, etc). The spec is here:
> http://www.microsoft.com/sql/reporting/techinfo/rdlspec.asp
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Resant" <resant_v@.yahoo.com> wrote in message
> news:1114566998.702015.164760@.g14g2000cwa.googlegroups.com...
> > Actually my conception exactly the same as the interface that's shown
> > by ASP.NET demo, I don't mind if I must learn RDL code, but could you
> > share how to publish the report on the server automatically (through
> > coding or the others) ?
> >
> > I'm interested with RDL Component, how is the component work? Is it
> > read RDL code and change it into ASP code?
> >
> > waiting for your reply...
> >
>
>|||Check this related thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=8a565186-663e-48aa-b4e2-8bad3056c40f&sloc=en-us
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jerry" <Jerry@.discussions.microsoft.com> wrote in message
news:1555FEF1-AB9A-4BA1-BA38-B83C5DA7658D@.microsoft.com...
> Hi Bruce,
> Where we can find information abou the web and winform controls?
> Thanks
> Jerry
> "Bruce L-C [MVP]" wrote:
>> If you are interested in this I strongly suggest that you look at the new
>> report controls in the newest beta for Widbey (Visual Studio). There are
>> two
>> controls: web and winform. They can work with server or work in local
>> mode.
>> The best thing to understand how RS works is to go read this very good
>> article here:
>> http://www.microsoft.com/sql/reporting/techinfo/techoverview.asp
>> RDL stands for Report Definition Language. It is an XML document that
>> defines the report in a output independent manner. HTML output is just
>> one
>> of the rendering outputs (RS also does PDF, Excel, etc). The spec is
>> here:
>> http://www.microsoft.com/sql/reporting/techinfo/rdlspec.asp
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Resant" <resant_v@.yahoo.com> wrote in message
>> news:1114566998.702015.164760@.g14g2000cwa.googlegroups.com...
>> > Actually my conception exactly the same as the interface that's shown
>> > by ASP.NET demo, I don't mind if I must learn RDL code, but could you
>> > share how to publish the report on the server automatically (through
>> > coding or the others) ?
>> >
>> > I'm interested with RDL Component, how is the component work? Is it
>> > read RDL code and change it into ASP code?
>> >
>> > waiting for your reply...
>> >
>>|||I've answer of my question with :
http://weblogs.sqlteam.com/tarad/archive/2005/01/05/3944.aspx
So by struggling with RDL writing & reading + publish automatically you
can build your dynamic report.sql

Wednesday, March 21, 2012

How to create a trigger to update a field

Hi -

I know my way around VS but I am just exploring "advanced" SQL Server 2005 and have run into a challenge which I think a trigger could solve, but I am not sure and also don't know how to set that up. So any help or links to tutorials are highly appreciated.

Here is the challenge: I have a table with a number of fields, among them RequestID (bigint) and Booktime (datetime). What I would like to happen is whenever someone writes a value different from NULL into RequestID, Booktime gets set to the current timestamp. When RequestID gets set to NULL, Booktime gets set to NULL.

Is there a way to do this with a trigger (or an otherwise elegant way)?

Thanks in advance for ANY help or ideas.


Oliver

Why do you need a trigger for that? Cant your application/stored proc handle the logic? Triggers are generally a maintenance nightmare (IMHO). You have to use them cautiously if you have to.

|||

Thanks for the advice. Oliver

|||

I agree with ndinakar, stay away from triggers.

Your best bet is to handle the logic in your app or stored proc. For a stored procedure you could handle it as so

Create Procedure dbo.myUpdateProc( @.fieldIdentityint, @.RequestIDbigint =NULL)If @.RequestIDISNOT NULLBegin Update <table>set RequestID = @.RequestID, Booktime =GetDate()where = @.fieldIdentityEnd

sql