Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Friday, March 30, 2012

How to scheduling Report

Hi Friends

How to generate the Report every month automatically.with out endusers explicitly .

Regards

Raju

Hello Raju,

Take a look at Subscriptions in Books Online.

Hope this helps.

Jarret

How to schedule report to run

Hello.
On a monthly basis I need to run a report. The report takes three
parameters: A customer ID, a Month, and a Year.
I want to run this report for every customer in our database and save each
report as a PDF on disk. Then I will store a link to the report in the
customer's "file".
Can this be done? How?
Thanks in advance,
MikeLook up Data-Driven Subscriptions in the docs. That'll be your starting
point. The link part is easy. :)
"MikeL" <MichaelLopez@.inds.com> wrote in message
news:OROPI5hOFHA.3808@.TK2MSFTNGP14.phx.gbl...
> Hello.
> On a monthly basis I need to run a report. The report takes three
> parameters: A customer ID, a Month, and a Year.
> I want to run this report for every customer in our database and save each
> report as a PDF on disk. Then I will store a link to the report in the
> customer's "file".
> Can this be done? How?
> Thanks in advance,
> Mike
>

Wednesday, March 28, 2012

how to scale the paper size?

Hi All,
I have a report which is A3 size , when it print out i wanna to fit into A3
size.
Is that possible to do in reporting service?
Cheers
NickThere is a PageSize property on the report (under the Layout tab). Set this
to the appropriate width and height.
"Nick" wrote:
> Hi All,
> I have a report which is A3 size , when it print out i wanna to fit into A3
> size.
> Is that possible to do in reporting service?
> Cheers
> Nick|||Thanks, David,
how about if i wanna pring out to fit into A4 paper.
Cheers
Nick
"David" wrote:
> There is a PageSize property on the report (under the Layout tab). Set this
> to the appropriate width and height.
> "Nick" wrote:
> > Hi All,
> >
> > I have a report which is A3 size , when it print out i wanna to fit into A3
> > size.
> >
> > Is that possible to do in reporting service?
> >
> > Cheers
> >
> > Nick

How to save the parameters to a RS report

I have several RS reports which have a number of parameters like
Company Code, Plant, Movement type, GL Accounts, Period, Material type,
Material,etc.
Sometimes each user runs the report with the same selection except that
they change something like the period for which the report is run. Is
there a way we can provide a mechanism to the users to save the
parameters for the reports and retrieve the parameter settings for a
report and modify and run them. We can do this in Business objects.
Thanks
Kareni think you are looking for the subscriptions feature in Report Manager.
Click on a report. Next click "subscriptions" near the top. You can now
setup a subscription with different parameters.
Taz
"KarenM" <karenmiddleol@.yahoo.com> wrote in message
news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
>I have several RS reports which have a number of parameters like
> Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> Material,etc.
> Sometimes each user runs the report with the same selection except that
> they change something like the period for which the report is run. Is
> there a way we can provide a mechanism to the users to save the
> parameters for the reports and retrieve the parameter settings for a
> report and modify and run them. We can do this in Business objects.
> Thanks
> Karen
>|||Hi Tarun,
No I know of subscriptions that is when I expect the report to run in
background. What I am looking for is if users run the same report many
times with a specific parameters it is not convenient for them to type
them everytime they would like to save the parameters and retrieve and
use them
Thanks
Karen
Tarun Mistry wrote:
> i think you are looking for the subscriptions feature in Report Manager.
> Click on a report. Next click "subscriptions" near the top. You can now
> setup a subscription with different parameters.
> Taz
>
> "KarenM" <karenmiddleol@.yahoo.com> wrote in message
> news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
> >I have several RS reports which have a number of parameters like
> > Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> > Material,etc.
> >
> > Sometimes each user runs the report with the same selection except that
> > they change something like the period for which the report is run. Is
> > there a way we can provide a mechanism to the users to save the
> > parameters for the reports and retrieve the parameter settings for a
> > report and modify and run them. We can do this in Business objects.
> >
> > Thanks
> > Karen
> >|||This is not a feature that is included in the product.
We created a system that did this. The first step is that you have to
create your own Visual Studio application that you will use for
reporting, probably including a ReportViewer control.
You would create your own fields on the screen to accept these
parameters.
Then you would have to create a system for saving the reports.
We collected all the paramters into an xml string and saved it to a
table, along with a userID and a name the user gave to the particular
parameter set.
KarenM wrote:
> Hi Tarun,
> No I know of subscriptions that is when I expect the report to run in
> background. What I am looking for is if users run the same report many
> times with a specific parameters it is not convenient for them to type
> them everytime they would like to save the parameters and retrieve and
> use them
> Thanks
> Karen
> Tarun Mistry wrote:
> > i think you are looking for the subscriptions feature in Report Manager.
> >
> > Click on a report. Next click "subscriptions" near the top. You can now
> > setup a subscription with different parameters.
> >
> > Taz
> >
> >
> > "KarenM" <karenmiddleol@.yahoo.com> wrote in message
> > news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
> > >I have several RS reports which have a number of parameters like
> > > Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> > > Material,etc.
> > >
> > > Sometimes each user runs the report with the same selection except that
> > > they change something like the period for which the report is run. Is
> > > there a way we can provide a mechanism to the users to save the
> > > parameters for the reports and retrieve the parameter settings for a
> > > report and modify and run them. We can do this in Business objects.
> > >
> > > Thanks
> > > Karen
> > >|||That is exactly what we are after. Could you kindly share the code for
the same. It is such a vital requirement for users I am surprised that
Microsoft missed including this in one of the RS support packs.
Thanks
Karen
cowznofsky wrote:
> This is not a feature that is included in the product.
> We created a system that did this. The first step is that you have to
> create your own Visual Studio application that you will use for
> reporting, probably including a ReportViewer control.
> You would create your own fields on the screen to accept these
> parameters.
> Then you would have to create a system for saving the reports.
> We collected all the paramters into an xml string and saved it to a
> table, along with a userID and a name the user gave to the particular
> parameter set.
> KarenM wrote:
> > Hi Tarun,
> >
> > No I know of subscriptions that is when I expect the report to run in
> > background. What I am looking for is if users run the same report many
> > times with a specific parameters it is not convenient for them to type
> > them everytime they would like to save the parameters and retrieve and
> > use them
> >
> > Thanks
> > Karen
> > Tarun Mistry wrote:
> > > i think you are looking for the subscriptions feature in Report Manager.
> > >
> > > Click on a report. Next click "subscriptions" near the top. You can now
> > > setup a subscription with different parameters.
> > >
> > > Taz
> > >
> > >
> > > "KarenM" <karenmiddleol@.yahoo.com> wrote in message
> > > news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
> > > >I have several RS reports which have a number of parameters like
> > > > Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> > > > Material,etc.
> > > >
> > > > Sometimes each user runs the report with the same selection except that
> > > > they change something like the period for which the report is run. Is
> > > > there a way we can provide a mechanism to the users to save the
> > > > parameters for the reports and retrieve the parameter settings for a
> > > > report and modify and run them. We can do this in Business objects.
> > > >
> > > > Thanks
> > > > Karen
> > > >

How to Save Report Parameters

I am trying to design a C# .NET web application that allows the user to run
a report, then save the report parameters so that when they open it again,
they get the same parameters with refreshed data.
I think my design should go something like this:
1) Render the report using the web service
2) make a button or something for the user to save the report
3) When the user clicks the save report button, call a web service method to
retrieve the report ParameterValue[] collection of parameter values that
were last used to run the report.
4) Save the ParameterValue[] collection into a DB table
5) when the user goes back to the report, load the ParameterValue[]
collection back from the DB table and render the report with the saved
parameters
How do I accomplish step (3)'
I looked at the ReportingService.GetReportParameters Method, but it does not
return the parameter values! It just returns a collection of ReportParameter
objects, which have no properties for the current values of a report. This
is just a listing of report parameters defined for a report, not what their
current values are in the current session.
The only methods that return a ParameterValue[] collection are the
GetDataDrivenSubscriptionProperties and GetSubscriptionProperties methods.
Does this mean I have to create a subscription before I can retrieve the
values?
I also see that the Render method does return a ParameterValue[] collection
as an output parameter, but only if the report is being rendered as a Report
History Snapshot! Do I have to create a snapshot every time just to store
the report parameters?
The only other thing I can think of is to write my own code to display the
parameters and code my own "view report" button, so that I can manually
store the parameter values... I don't want to resort to this!! :-P
Please point me in the right direction, and I will follow up.
MalikTry this (I'm using VB.Net syntax)
Dim ReportParameters(Number of Parameters defined in your report) as
ParameterValue
Dim iCount as Integer
'Retrieve your parameter values from the database.
'Assume two parameters from this example.
For iCount = 1 to ReportParameters.Length
ReportParameters(iCount - 1) = New ParameterValue
Select Case iCount
Case 1
ReportParameters(iCount - 1).Name = "The name of your report parameter
defined in your report"
ReportParameters(iCount - 1).value = "Value from your database"
Case 2
ReportParameters(iCount - 1).Name = "The name of your report parameter
defined in your report"
ReportParameters(iCount - 1).value = "Value from your database"
End Select
Next
Once you have defined all of your report parameters, you can use
ReportParameters in the render method, and your report will have the last
values that were used in the report you are viewing.
"Abdul Malik Said" wrote:
> I am trying to design a C# .NET web application that allows the user to run
> a report, then save the report parameters so that when they open it again,
> they get the same parameters with refreshed data.
> I think my design should go something like this:
> 1) Render the report using the web service
> 2) make a button or something for the user to save the report
> 3) When the user clicks the save report button, call a web service method to
> retrieve the report ParameterValue[] collection of parameter values that
> were last used to run the report.
> 4) Save the ParameterValue[] collection into a DB table
> 5) when the user goes back to the report, load the ParameterValue[]
> collection back from the DB table and render the report with the saved
> parameters
> How do I accomplish step (3)'
> I looked at the ReportingService.GetReportParameters Method, but it does not
> return the parameter values! It just returns a collection of ReportParameter
> objects, which have no properties for the current values of a report. This
> is just a listing of report parameters defined for a report, not what their
> current values are in the current session.
> The only methods that return a ParameterValue[] collection are the
> GetDataDrivenSubscriptionProperties and GetSubscriptionProperties methods.
> Does this mean I have to create a subscription before I can retrieve the
> values?
> I also see that the Render method does return a ParameterValue[] collection
> as an output parameter, but only if the report is being rendered as a Report
> History Snapshot! Do I have to create a snapshot every time just to store
> the report parameters?
> The only other thing I can think of is to write my own code to display the
> parameters and code my own "view report" button, so that I can manually
> store the parameter values... I don't want to resort to this!! :-P
> Please point me in the right direction, and I will follow up.
> Malik
>
>|||Mike,
Thanks a lot for your help.
I guess I was not clear in my stating of "Step 3", which was to determine
which parameters the user last used to run the report. By this, I meant to
say:
How can I programmatically get from the report object model which parameters
were last used to run the report? I have to get these first before I can
store them in the database. Retrieving them and reconstituting them is not
difficult after they are saved. The problem is, how do I find the values in
the first place?
Here is a better description:
The user clicks "View Report" from the parameters toolbar
The user clicks "Save Report" button which I have made elsewhere on the page
In the code for the "Save Report" button, how do I reference the parameter
values that were last chosen? I need to get these values from the report
first, before I can store them in the database. This is what I don't know
how to do.
Any more help would be greatly appreciated.
Malik
"Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
news:B8C4E6E5-5AA7-4D8F-8CB3-2B01387392B4@.microsoft.com...
> Try this (I'm using VB.Net syntax)
> Dim ReportParameters(Number of Parameters defined in your report) as
> ParameterValue
> Dim iCount as Integer
> 'Retrieve your parameter values from the database.
> 'Assume two parameters from this example.
> For iCount = 1 to ReportParameters.Length
> ReportParameters(iCount - 1) = New ParameterValue
> Select Case iCount
> Case 1
> ReportParameters(iCount - 1).Name = "The name of your report
parameter
> defined in your report"
> ReportParameters(iCount - 1).value = "Value from your database"
> Case 2
> ReportParameters(iCount - 1).Name = "The name of your report
parameter
> defined in your report"
> ReportParameters(iCount - 1).value = "Value from your database"
> End Select
> Next
> Once you have defined all of your report parameters, you can use
> ReportParameters in the render method, and your report will have the last
> values that were used in the report you are viewing.
> "Abdul Malik Said" wrote:
> > I am trying to design a C# .NET web application that allows the user to
run
> > a report, then save the report parameters so that when they open it
again,
> > they get the same parameters with refreshed data.
> >
> > I think my design should go something like this:
> >
> > 1) Render the report using the web service
> > 2) make a button or something for the user to save the report
> > 3) When the user clicks the save report button, call a web service
method to
> > retrieve the report ParameterValue[] collection of parameter values that
> > were last used to run the report.
> > 4) Save the ParameterValue[] collection into a DB table
> > 5) when the user goes back to the report, load the ParameterValue[]
> > collection back from the DB table and render the report with the saved
> > parameters
> >
> > How do I accomplish step (3)'
> >
> > I looked at the ReportingService.GetReportParameters Method, but it does
not
> > return the parameter values! It just returns a collection of
ReportParameter
> > objects, which have no properties for the current values of a report.
This
> > is just a listing of report parameters defined for a report, not what
their
> > current values are in the current session.
> >
> > The only methods that return a ParameterValue[] collection are the
> > GetDataDrivenSubscriptionProperties and GetSubscriptionProperties
methods.
> > Does this mean I have to create a subscription before I can retrieve the
> > values?
> >
> > I also see that the Render method does return a ParameterValue[]
collection
> > as an output parameter, but only if the report is being rendered as a
Report
> > History Snapshot! Do I have to create a snapshot every time just to
store
> > the report parameters?
> >
> > The only other thing I can think of is to write my own code to display
the
> > parameters and code my own "view report" button, so that I can manually
> > store the parameter values... I don't want to resort to this!! :-P
> >
> > Please point me in the right direction, and I will follow up.
> >
> > Malik
> >
> >
> >|||Hi Malik,
I've just completed an application which does exactly what you are
trying to do :) Mine does a little more like managing subscriptions,
schedules etc but the viewing and saving of the report/params is the
core of my app. I can't share the code as it's a commercial app but
will gladly help out with snippets etc :)
I did it the following way:
1/ Reports are already on the server so I loop through the selected
report and obtain all the params for that report. I then
enable/disable webusercontrols for each of the params on screen.
see code below to get the params from a report (formatting screwed by
newsreader :( )
private void GetSpecificReportParameters(string report)
{
if(rs == null) rs = new ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
ReportParameter[] parameters parameters =rs.GetReportParameters(report, null, false, null, null);
if (parameters != null)
{
string []nameArray = new string[50];
int i = 0;
foreach (ReportParameter rp in parameters)
{
// this is each of the names banged into an array
nameArray[i] = rp.Name;
i++;
}
// now loop through em and switch on/off the correct params
foreach (string str in nameArray)
{
if(str == null) // nothing so carry on
continue;
if(str.ToString() == "SurnameFrom")
{
SurnameWebUserControl.Visible = true;
}
// etc etc for all params found
}
}
}
2/ now i've got all the params for the report and the relevant
controls to fill in these params, my user can now set their params and
click on either View or Save report.
View builds up a string from the webusercontrols, appending the &
after each param & then passing this into the ReportViewer control on
the form.
Save does the same building of the string but instead of rendering to
the ReportViewer control, it simply saves to a database field along
with the path to the report i.e. heres one I've just created:
/Reports/MyReport&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false&SurnameFrom=SMITH&SurnameTo=SMITH
When I recall the saved report, I simply pass that line in as the URL
prefixing the server address to it - then it's passed to the
ReportViewer control to render to screen.
Very simple and works very well - hope it makes sense to you. The
major advantage of this mechanism is that all we need to do is upload
a new report with params, the application will not need recompilation
in order to deal with the params (as long as no new params have been
added that the previous app knows nothing of!)
Si
On Fri, 20 Aug 2004 10:30:45 +0100, "Abdul Malik Said"
<diplacusis@.hotmNOSPAMail.com> wrote:
>Mike,
>Thanks a lot for your help.
>I guess I was not clear in my stating of "Step 3", which was to determine
>which parameters the user last used to run the report. By this, I meant to
>say:
>How can I programmatically get from the report object model which parameters
>were last used to run the report? I have to get these first before I can
>store them in the database. Retrieving them and reconstituting them is not
>difficult after they are saved. The problem is, how do I find the values in
>the first place?
>Here is a better description:
>The user clicks "View Report" from the parameters toolbar
>The user clicks "Save Report" button which I have made elsewhere on the page
>In the code for the "Save Report" button, how do I reference the parameter
>values that were last chosen? I need to get these values from the report
>first, before I can store them in the database. This is what I don't know
>how to do.
>Any more help would be greatly appreciated.
>Malik
>|||Hi Si,
That is a good way to solve this problem. If I understand what you are
doing, then it seems like you are basically writing your own code to replace
the parameter toolbar. This way, you know exactly what the values of the
controls are when the user clicks "save".
I could write a solution like this, but I was hoping there was a way of
doing it without developing code to replace the parameter selection toolbar.
Since there is already a parameter toolbar, I would like to use it. This
way, any report could be added to my application, since I wouldn't have to
assume anything about parameters.
I am currently trying to see if there is anything in the client-side
javascript generated for the report that will help me. I can see the current
report parameters there, but I am still trying to figure out how to retrieve
them properly...
Anyway, all of this has helped me think through my design, so many thanks
for your ideas.
Malik
"Si" <no@.spam.thanks> wrote in message
news:l9nbi052eoggh9ucpro71t1t72lbnou72i@.4ax.com...
> Hi Malik,
> I've just completed an application which does exactly what you are
> trying to do :) Mine does a little more like managing subscriptions,
> schedules etc but the viewing and saving of the report/params is the
> core of my app. I can't share the code as it's a commercial app but
> will gladly help out with snippets etc :)
> I did it the following way:
> 1/ Reports are already on the server so I loop through the selected
> report and obtain all the params for that report. I then
> enable/disable webusercontrols for each of the params on screen.
> see code below to get the params from a report (formatting screwed by
> newsreader :( )
> private void GetSpecificReportParameters(string report)
> {
> if(rs == null) rs = new ReportingService();
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> ReportParameter[] parameters parameters => rs.GetReportParameters(report, null, false, null, null);
> if (parameters != null)
> {
> string []nameArray = new string[50];
> int i = 0;
> foreach (ReportParameter rp in parameters)
> {
> // this is each of the names banged into an array
> nameArray[i] = rp.Name;
> i++;
> }
> // now loop through em and switch on/off the correct params
> foreach (string str in nameArray)
> {
> if(str == null) // nothing so carry on
> continue;
> if(str.ToString() == "SurnameFrom")
> {
> SurnameWebUserControl.Visible = true;
> }
> // etc etc for all params found
> }
> }
> }
>
> 2/ now i've got all the params for the report and the relevant
> controls to fill in these params, my user can now set their params and
> click on either View or Save report.
> View builds up a string from the webusercontrols, appending the &
> after each param & then passing this into the ReportViewer control on
> the form.
> Save does the same building of the string but instead of rendering to
> the ReportViewer control, it simply saves to a database field along
> with the path to the report i.e. heres one I've just created:
>
/Reports/MyReport&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false&Su
rnameFrom=SMITH&SurnameTo=SMITH
> When I recall the saved report, I simply pass that line in as the URL
> prefixing the server address to it - then it's passed to the
> ReportViewer control to render to screen.
> Very simple and works very well - hope it makes sense to you. The
> major advantage of this mechanism is that all we need to do is upload
> a new report with params, the application will not need recompilation
> in order to deal with the params (as long as no new params have been
> added that the previous app knows nothing of!)
> Si
>
>
>
> On Fri, 20 Aug 2004 10:30:45 +0100, "Abdul Malik Said"
> <diplacusis@.hotmNOSPAMail.com> wrote:
> >Mike,
> >
> >Thanks a lot for your help.
> >
> >I guess I was not clear in my stating of "Step 3", which was to determine
> >which parameters the user last used to run the report. By this, I meant
to
> >say:
> >
> >How can I programmatically get from the report object model which
parameters
> >were last used to run the report? I have to get these first before I can
> >store them in the database. Retrieving them and reconstituting them is
not
> >difficult after they are saved. The problem is, how do I find the values
in
> >the first place?
> >
> >Here is a better description:
> >
> >The user clicks "View Report" from the parameters toolbar
> >The user clicks "Save Report" button which I have made elsewhere on the
page
> >
> >In the code for the "Save Report" button, how do I reference the
parameter
> >values that were last chosen? I need to get these values from the report
> >first, before I can store them in the database. This is what I don't know
> >how to do.
> >
> >Any more help would be greatly appreciated.
> >
> >Malik
> >|||No probs,
I still have the param toolbar there, it's just hidden using the
rc:Parameters=false tag in the url.
I understand what you are trying to achive but from my limited
understanding, it's currently not possible as there is no statefull
save of the params once the report is generated, only beforehand.
Si
On Fri, 20 Aug 2004 12:52:22 +0100, "Abdul Malik Said"
<diplacusis@.hotmNOSPAMail.com> wrote:
>Hi Si,
>That is a good way to solve this problem. If I understand what you are
>doing, then it seems like you are basically writing your own code to replace
>the parameter toolbar. This way, you know exactly what the values of the
>controls are when the user clicks "save".
>I could write a solution like this, but I was hoping there was a way of
>doing it without developing code to replace the parameter selection toolbar.
>Since there is already a parameter toolbar, I would like to use it. This
>way, any report could be added to my application, since I wouldn't have to
>assume anything about parameters.
>I am currently trying to see if there is anything in the client-side
>javascript generated for the report that will help me. I can see the current
>report parameters there, but I am still trying to figure out how to retrieve
>them properly...
>Anyway, all of this has helped me think through my design, so many thanks
>for your ideas.
>Malik
>|||If you come up with an elegant solution to this problem, I'd love to
hear about it (i.e. please share it with the group). We would also
very much like to be able to save and restore parameters without
reinventing the wheel (a.k.a. the parameter selection toolbar :-)
Brad.
On Fri, 20 Aug 2004 12:52:22 +0100, "Abdul Malik Said"
<diplacusis@.hotmNOSPAMail.com> wrote:
>Hi Si,
>That is a good way to solve this problem. If I understand what you are
>doing, then it seems like you are basically writing your own code to replace
>the parameter toolbar. This way, you know exactly what the values of the
>controls are when the user clicks "save".
>I could write a solution like this, but I was hoping there was a way of
>doing it without developing code to replace the parameter selection toolbar.
>Since there is already a parameter toolbar, I would like to use it. This
>way, any report could be added to my application, since I wouldn't have to
>assume anything about parameters.
>I am currently trying to see if there is anything in the client-side
>javascript generated for the report that will help me. I can see the current
>report parameters there, but I am still trying to figure out how to retrieve
>them properly...
>Anyway, all of this has helped me think through my design, so many thanks
>for your ideas.
>Malik
>"Si" <no@.spam.thanks> wrote in message
>news:l9nbi052eoggh9ucpro71t1t72lbnou72i@.4ax.com...
>> Hi Malik,
>> I've just completed an application which does exactly what you are
>> trying to do :) Mine does a little more like managing subscriptions,
>> schedules etc but the viewing and saving of the report/params is the
>> core of my app. I can't share the code as it's a commercial app but
>> will gladly help out with snippets etc :)
>> I did it the following way:
>> 1/ Reports are already on the server so I loop through the selected
>> report and obtain all the params for that report. I then
>> enable/disable webusercontrols for each of the params on screen.
>> see code below to get the params from a report (formatting screwed by
>> newsreader :( )
>> private void GetSpecificReportParameters(string report)
>> {
>> if(rs == null) rs = new ReportingService();
>> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
>> ReportParameter[] parameters parameters =>> rs.GetReportParameters(report, null, false, null, null);
>> if (parameters != null)
>> {
>> string []nameArray = new string[50];
>> int i = 0;
>> foreach (ReportParameter rp in parameters)
>> {
>> // this is each of the names banged into an array
>> nameArray[i] = rp.Name;
>> i++;
>> }
>> // now loop through em and switch on/off the correct params
>> foreach (string str in nameArray)
>> {
>> if(str == null) // nothing so carry on
>> continue;
>> if(str.ToString() == "SurnameFrom")
>> {
>> SurnameWebUserControl.Visible = true;
>> }
>> // etc etc for all params found
>> }
>> }
>> }
>>
>> 2/ now i've got all the params for the report and the relevant
>> controls to fill in these params, my user can now set their params and
>> click on either View or Save report.
>> View builds up a string from the webusercontrols, appending the &
>> after each param & then passing this into the ReportViewer control on
>> the form.
>> Save does the same building of the string but instead of rendering to
>> the ReportViewer control, it simply saves to a database field along
>> with the path to the report i.e. heres one I've just created:
>>
>/Reports/MyReport&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false&Su
>rnameFrom=SMITH&SurnameTo=SMITH
>> When I recall the saved report, I simply pass that line in as the URL
>> prefixing the server address to it - then it's passed to the
>> ReportViewer control to render to screen.
>> Very simple and works very well - hope it makes sense to you. The
>> major advantage of this mechanism is that all we need to do is upload
>> a new report with params, the application will not need recompilation
>> in order to deal with the params (as long as no new params have been
>> added that the previous app knows nothing of!)
>> Si
>>
>>
>>
>> On Fri, 20 Aug 2004 10:30:45 +0100, "Abdul Malik Said"
>> <diplacusis@.hotmNOSPAMail.com> wrote:
>> >Mike,
>> >
>> >Thanks a lot for your help.
>> >
>> >I guess I was not clear in my stating of "Step 3", which was to determine
>> >which parameters the user last used to run the report. By this, I meant
>to
>> >say:
>> >
>> >How can I programmatically get from the report object model which
>parameters
>> >were last used to run the report? I have to get these first before I can
>> >store them in the database. Retrieving them and reconstituting them is
>not
>> >difficult after they are saved. The problem is, how do I find the values
>in
>> >the first place?
>> >
>> >Here is a better description:
>> >
>> >The user clicks "View Report" from the parameters toolbar
>> >The user clicks "Save Report" button which I have made elsewhere on the
>page
>> >
>> >In the code for the "Save Report" button, how do I reference the
>parameter
>> >values that were last chosen? I need to get these values from the report
>> >first, before I can store them in the database. This is what I don't know
>> >how to do.
>> >
>> >Any more help would be greatly appreciated.
>> >
>> >Malik
>> >
>|||Unfortunately, I have hit the wall with this one. The last hope was to use
the current URL that can be found in the client-side javascript generated
by the report server. However, I hear from microsoft that these variables
are for their internal use only, and could change in the future.
Since I don't want my reports to stop working when v2 is released, I can't
do that! :-@. I have given up hope for an "elegant solution".
I have looked at the SOAP method of integration as well as the URL method,
and it is just not possible to save report parameters as selected by the
user! The only way you can save them is if you re-invent your own parameter
inputs! And keep in mind that a complete integration solution should be able
to accept any possible combination of report parameters!
I think this is another oversight in the design of this product from
microsoft. They have specially designed ways to cache report data, saving
history, etc... But what about the more common case of wanting fresh data
for the same parameters? I am amazed that they did not think of this...
Malik
"Abdul Malik Said" <diplacusis@.hotmNOSPAMail.com> wrote in message
news:uMytSxqhEHA.3992@.TK2MSFTNGP11.phx.gbl...
> Hi Si,
> That is a good way to solve this problem. If I understand what you are
> doing, then it seems like you are basically writing your own code to
replace
> the parameter toolbar. This way, you know exactly what the values of the
> controls are when the user clicks "save".
> I could write a solution like this, but I was hoping there was a way of
> doing it without developing code to replace the parameter selection
toolbar.
> Since there is already a parameter toolbar, I would like to use it. This
> way, any report could be added to my application, since I wouldn't have to
> assume anything about parameters.
> I am currently trying to see if there is anything in the client-side
> javascript generated for the report that will help me. I can see the
current
> report parameters there, but I am still trying to figure out how to
retrieve
> them properly...
> Anyway, all of this has helped me think through my design, so many thanks
> for your ideas.
> Malik
> "Si" <no@.spam.thanks> wrote in message
> news:l9nbi052eoggh9ucpro71t1t72lbnou72i@.4ax.com...
> > Hi Malik,
> >
> > I've just completed an application which does exactly what you are
> > trying to do :) Mine does a little more like managing subscriptions,
> > schedules etc but the viewing and saving of the report/params is the
> > core of my app. I can't share the code as it's a commercial app but
> > will gladly help out with snippets etc :)
> >
> > I did it the following way:
> >
> > 1/ Reports are already on the server so I loop through the selected
> > report and obtain all the params for that report. I then
> > enable/disable webusercontrols for each of the params on screen.
> > see code below to get the params from a report (formatting screwed by
> > newsreader :( )
> >
> > private void GetSpecificReportParameters(string report)
> > {
> > if(rs == null) rs = new ReportingService();
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> >
> > ReportParameter[] parameters parameters => > rs.GetReportParameters(report, null, false, null, null);
> >
> > if (parameters != null)
> > {
> > string []nameArray = new string[50];
> > int i = 0;
> > foreach (ReportParameter rp in parameters)
> > {
> > // this is each of the names banged into an array
> > nameArray[i] = rp.Name;
> > i++;
> > }
> >
> > // now loop through em and switch on/off the correct params
> > foreach (string str in nameArray)
> > {
> > if(str == null) // nothing so carry on
> > continue;
> >
> > if(str.ToString() == "SurnameFrom")
> > {
> > SurnameWebUserControl.Visible = true;
> > }
> > // etc etc for all params found
> > }
> > }
> > }
> >
> >
> > 2/ now i've got all the params for the report and the relevant
> > controls to fill in these params, my user can now set their params and
> > click on either View or Save report.
> >
> > View builds up a string from the webusercontrols, appending the &
> > after each param & then passing this into the ReportViewer control on
> > the form.
> >
> > Save does the same building of the string but instead of rendering to
> > the ReportViewer control, it simply saves to a database field along
> > with the path to the report i.e. heres one I've just created:
> >
> >
>
/Reports/MyReport&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false&Su
> rnameFrom=SMITH&SurnameTo=SMITH
> >
> > When I recall the saved report, I simply pass that line in as the URL
> > prefixing the server address to it - then it's passed to the
> > ReportViewer control to render to screen.
> >
> > Very simple and works very well - hope it makes sense to you. The
> > major advantage of this mechanism is that all we need to do is upload
> > a new report with params, the application will not need recompilation
> > in order to deal with the params (as long as no new params have been
> > added that the previous app knows nothing of!)
> >
> > Si
> >
> >
> >
> >
> >
> >
> >
> > On Fri, 20 Aug 2004 10:30:45 +0100, "Abdul Malik Said"
> > <diplacusis@.hotmNOSPAMail.com> wrote:
> >
> > >Mike,
> > >
> > >Thanks a lot for your help.
> > >
> > >I guess I was not clear in my stating of "Step 3", which was to
determine
> > >which parameters the user last used to run the report. By this, I meant
> to
> > >say:
> > >
> > >How can I programmatically get from the report object model which
> parameters
> > >were last used to run the report? I have to get these first before I
can
> > >store them in the database. Retrieving them and reconstituting them is
> not
> > >difficult after they are saved. The problem is, how do I find the
values
> in
> > >the first place?
> > >
> > >Here is a better description:
> > >
> > >The user clicks "View Report" from the parameters toolbar
> > >The user clicks "Save Report" button which I have made elsewhere on the
> page
> > >
> > >In the code for the "Save Report" button, how do I reference the
> parameter
> > >values that were last chosen? I need to get these values from the
report
> > >first, before I can store them in the database. This is what I don't
know
> > >how to do.
> > >
> > >Any more help would be greatly appreciated.
> > >
> > >Malik
> > >
>sql

How to save item description?

Those anybody know how to save description of any item (report, model or datasource) programmatically without saving directly to ReportServer DB in Catalog table? I'm working with RS Web Service but i can't find solution for saving only item description.

You can create a property with the name "Description" and include that in the set of optional properties when you publish the report using CreateReport():

ReportingService2005 rs2005 = new ReportingService2005();

rs2005.UseDefaultCredentials = true;

Property description = new Property();

description.Name = "Description";

description.Value = "This is a super cool report!";

byte[] reportDefinition = File.ReadAllBytes(@."e:\testreports\r1.rdl");

rs2005.CreateReport("r1", "/", true, reportDefinition, new Property[] { description });

Monday, March 26, 2012

how to save expression

Hi,
I am new to RS. in Crystal Report, i can create a formula then save it. So
it can be used later. In RS, how can I save an expression and use it later?
Thx.You can create an embedded VB.NET function which will be visible in the
report it is saved (see Report Properties - > Code tab) or you can create an
external .NET assembly which can be shared by all reports.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Mia" <Mia@.discussions.microsoft.com> wrote in message
news:F4516C1C-0F54-42CD-BEF8-5115097DBFB1@.microsoft.com...
> Hi,
> I am new to RS. in Crystal Report, i can create a formula then save it. So
> it can be used later. In RS, how can I save an expression and use it
> later?
> Thx.

How To Run the report on a schedule and save as .html

Rather than have the SQL Server hit many times during the day when
people look at the report,
I was wondering how to run the report once, at night, and save the
output as html
Then, when users look at the report during the day, they see the
static results of the over night run.
Faster response, less load on the SQL Server.
Perhaps it is already there and I just need the current vocabulary.
IanOyou have 2 options
schedule and delivery (like sending an email with the report as PDf or HTML)
report snapshot (the report is generated 1 time and RS keep the result and
display the latest snapshot instead of reading the database again)
hit the subscription or history button when you are in a report in report
server (http://localhost/reports)
"IanO" <IanONet@.gmail.com> wrote in message
news:1178673504.082329.323830@.h2g2000hsg.googlegroups.com...
> Rather than have the SQL Server hit many times during the day when
> people look at the report,
> I was wondering how to run the report once, at night, and save the
> output as html
> Then, when users look at the report during the day, they see the
> static results of the over night run.
> Faster response, less load on the SQL Server.
> Perhaps it is already there and I just need the current vocabulary.
> IanO
>|||Apart from these two options there is one more called "Null Delivery"
basically it is used for running the report first and keeping in the cache.
so next time it access from the cache, ofcourse you dont change anything.. so
this will be a faster method since it keeps it in the cache. But watch out
for ways cache expires.
Amarnath
"Jeje" wrote:
> you have 2 options
> schedule and delivery (like sending an email with the report as PDf or HTML)
> report snapshot (the report is generated 1 time and RS keep the result and
> display the latest snapshot instead of reading the database again)
> hit the subscription or history button when you are in a report in report
> server (http://localhost/reports)
>
> "IanO" <IanONet@.gmail.com> wrote in message
> news:1178673504.082329.323830@.h2g2000hsg.googlegroups.com...
> > Rather than have the SQL Server hit many times during the day when
> > people look at the report,
> > I was wondering how to run the report once, at night, and save the
> > output as html
> >
> > Then, when users look at the report during the day, they see the
> > static results of the over night run.
> > Faster response, less load on the SQL Server.
> >
> > Perhaps it is already there and I just need the current vocabulary.
> >
> > IanO
> >
>sql

Friday, March 23, 2012

How to run the crystal report

Hi !
i am new to the crystal report.
can u help me?
how to run the crystal report?
tell me the procedure detail
rgds
anitaHi!

1) Insert the Crystal Report Runtime Control Properties from Project Properties.

2) Add the New Crystal Report using Project Explorer. when u click right button it will be displayed.

3) Choose the Report type in Crystal Report Gallery

4)Click the Project Button and Select the ODBC or OLEDB for your database.

5) And follow the continued.

6) then run your project.

Dim Report As New CrystalReport1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub

Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth

End Sub|||I have example code in my signature - "VB6/Crystal Report Ex."

Wednesday, March 21, 2012

How to run a report from webform ........URGENT

Hi,

I am using SSRS 2000 and VS2003.I am new to SSRS.I have to generate a report on button click event.I have to pass parameters(values from textbox,dropdown) to the report.I am a little confused like how to call report from webpage and how to pass web page control values as parameters.Please guide me.Thank you.

hi use reportviewer control. Its easy. For more details see abt this control in MSDN

|||

Hi,

I serached in MSDN.I didn't get how to get REPORTVIEWER control in webform.I don't see any built in reportviewer in VS2003.Can you please guide me how to add that control to my webpage (TOOLBOX).Thank you

|||

hi sure,

But I have office only on Monday. So will let u know then... my id issivaatzenith@.gmail.com. Pls ping to this id... I will let u know

|||

Hi,

Sure I will mail you.I have few more doubts.Thank you.

|||

hi hope this link will solve ur problem

http://www.codeproject.com/sqlrs/SQLRSViewer.asp

sql

How to run a database report?

Is there anyone who knows how to create a database report in SQL server 2000 after we run queries?
Thanks for helpto create something pretty you need to use a reporting tool like sql reporting services or crystal or access or you can DIY with a programming language like ASP.|||Is there anyone who knows how to create a database report in SQL server 2000 after we run queries?
Thanks for help

There are really a boat load of different ways to do different things...maybe if you clue us in on what you want to do we could probably suggest something

M$ Access best feature, in my opinion, is reporting.|||M$ Access best feature, in my opinion, is reporting.Could not agree more wholeheartedly or with greater vigour.|||to create something pretty you need to use a reporting tool like sql reporting services or crystal or access or you can DIY with a programming language like ASP.

I agree with you. In your opinion, SQL reporting services is a good tool to create a database report in SQL queries compared to other ones?
Thanks|||the setup for SQL Server Reporting Services 2000 can be an adventure. I have set it up on a few client sites and done a a couple of setups in house and it never goes right the first time and the problem with the setup has been different everytime.

However, the one time I setup SQL Reporting Services 2005 all I had to do was hit a checkbox during the SQL Server 2005 setup and everything worked out of the box. I was shocked.

The other upside to SQL RS, is that it will not cost you anything if it is installed on the same machine as SQL Server. The drawbacks to this are you will have IIS on your DB box and it violates the best practice of having your application code and your DB server on different machine.|||the setup for SQL Server Reporting Services 2000 can be an adventure. I have set it up on a few client sites and done a a couple of setups in house and it never goes right the first time and the problem with the setup has been different everytime.

However, the one time I setup SQL Reporting Services 2005 all I had to do was hit a checkbox during the SQL Server 2005 setup and everything worked out of the box. I was shocked.

The other upside to SQL RS, is that it will not cost you anything if it is installed on the same machine as SQL Server. The drawbacks to this are you will have IIS on your DB box and it violates the best practice of having your application code and your DB server on different machine.

Seems i've been lucky with Reporting services. Istruggled in first installation only. For other attempts i had a cakewalk...|||But doesn't every business person want their reports in Excel?|||Seems i've been lucky with Reporting services. Istruggled in first installation only. For other attempts i had a cakewalk...

do deal with one internal homogeneous envrionment or do you deploy to various customers where things are different everytime?|||Not sure if you care, but RS sucks if you have to generate localized reports, even on 2005.|||I have not written a "report" in a few years. I have report writers for that. All I do these days is fix the nastiest problems.|||I had to maintain all the reports in SSMS until yukon was released, so I know painfully well that RS 2005 doesn't support localization :)

I don't write reports anymore either thankfully. Those rdl files were pretty nasty looking!|||But doesn't every business person want their reports in Excel?RS will gleefully deliver reports as XLS files.

-PatP|||Not sure if you care, but RS sucks if you have to generate localized reports, even on 2005.Interesting point of view, can you elaborate a bit? I agree that RS can't deal well with poorly constructed queries that pre-localize the data, but I've never had a problem with simply retrieving the data via a query then allowing RS to present it. I've actually found the RS makes it much easier for me to deliver localized reports (with the exception of one other enterprise grade reporting tool, with an enterprise grade price tag).

-PatP|||are you saying you are able to build a single report and have it render properly in multiple languages?

I am pretty sure that's not possible with the WinForms ReportViewer (which is what I had to use, the one in the Microsoft.Reporting.Winforms namespace). RDL files don't use resx files to store strings like a regular localized winform would, so they can't be localized easily.

It may be different if you host your reports on a RS server, which it sounds like you were doing.

I couldn't do that because SSMS needs to carry its reports around with it, and can't depend on a RS instance being installed somewhere. So maybe it's not that RS itself sucks, it's that Microsoft.Reporting.Winforms.ReportViewer sucks (at least when it comes to localization. otherwise it's ok) :)|||This is my first time to try to create the database report (the sample posted on web site) but I had the problem to deploy the report, when I click F5, it showed the error messages:
"No Report Server was found at http://localhost/ReportServerDB"

even though I already registered the ASP.net and checked IIS to see if it is running.
Also, after installation I clicked Report Manager I saw the error messages of this page like this:

Server Error in '/Reports' Application.
--------------------

Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportManager\bin" is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportManager\bin" is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportManager\bin" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalGetFileDirectoryNames( String fullPath, String userPath, Boolean file) +229
System.IO.Directory.InternalGetDirectories(String path, String userPath, String searchPattern) +24
System.IO.Directory.GetDirectories(String path, String searchPattern) +477
Microsoft.ReportingServices.Diagnostics.Localizati on.GetInstalledCultures()
Microsoft.ReportingServices.Diagnostics.Localizati on..cctor()

[TypeInitializationException: The type initializer for "Microsoft.ReportingServices.Diagnostics.Localizati on" threw an exception.]
Microsoft.ReportingServices.Diagnostics.Localizati on.SetCultureFromPriorityList(String[] localeList) +0
Microsoft.ReportingServices.UI.GlobalApp.Applicati on_BeginRequest(Object sender, EventArgs e)
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.Execute() +60
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +87

Please show me how to solve the problem.
Thank you for your time.|||this looks like a permissions issue.

when you log into http://<yourservername>/Reports on the properties tab do you see your windows user name or a group you are a part of? Depending on how this is setup will determine what IIS settings you will need.|||this looks like a permissions issue.

when you log into http://<yourservername>/Reports on the properties tab do you see your windows user name or a group you are a part of? Depending on how this is setup will determine what IIS settings you will need.

No, I don't see any user name or group on the properties tab.

Friday, March 9, 2012

How to retrieve Top 3 records in the group level

Hi all,

I have a report which is grouped by a field called R_ID, which gives me a list of records for each R_ID. So here is the thing, I want to get only top 3 records for each R_ID. Is there any way to do this thing in the report level. I tried it from the query level, but the result is not like what I wanted.

Please let me know if some body has any idea.

Thx.

Doing this in a report wouldn′t be the best way as you would get all the data from the server and then only would display a part of it. better filter the data on the server and send only back the appropiate results, then you would have no problem on the client / reporting service. Anway, if you want to do this, you might have a look at the RowNumber() property in Reporting Services. You could set the Visibility of the row to Visible=True if the RowNumber("GroupName") equals or is less than 3 =IIF(Rownumber("GroupName") <= 3;True;False)

Doing this on the server depends on which server version you are using. SQL Server 2005 probably would enable you to use ROW_NUMBER() on the server side. SQL Server 2k does not implement this new function, so you would have to use something else instead.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Friday, February 24, 2012

How to retrieve a report in SQL Reporting Server

Is there a way to read the rdl file that is already deployed on the Report
Server to modify it? I have some reports on RS but don't have the original
rdl file.
Thanks
AyadAyad,
Open Report Manager (http://localhost/reports), select your report and
click the 'Properties' tab. You'll see a section on the page called
"Report Definition". Click the Edit link and you'll have the RDL.
Andy Potter|||To extract multiple disparate reports at the same time you could also use
Reporting Services Scripter
http://www.sqldbatips.com/showarticle.asp?ID=62
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"Ayad" <ashammout1@.hotmail.com> wrote in message
news:O5WPL1LDGHA.740@.TK2MSFTNGP12.phx.gbl...
> Is there a way to read the rdl file that is already deployed on the Report
> Server to modify it? I have some reports on RS but don't have the original
> rdl file.
> Thanks
> Ayad
>

Sunday, February 19, 2012

how to restrict SQL running thread

Hi,
We have a big report running on SQLRS2000+SP2. The report has multiple
datasets and queries. When report starts running, the database server it
connects to run query and pull data will start 33 threads and immediately
reach 100% CPU usage for all 8 CPUs. Databases is over 1TB and sets on EMC
SAN. There is no blocking during report generation. There is no sub-report,
so I assume there is only one DB connection.
We are wondering is it possible to restrict the number of threads
instantiated or is it possible to serialize the report generation, only run
1 thread at a time. Please help.
Jasonyou can set the maxdop option in your queries to limit the number of CPU
used during the execution of the query.
select ... from ... option (maxdop 1)
this reduce the number of CPU used in a parrallel query
the maxdop option can be setup at the server level instead-of the query
level; but not recommanded until you suffer performance issues
test the query, reducing the maxdop can reduce the query performance.
if the query takes 1min instead-of 10sec. the user will not be happy!
why its a problem for you if the queries use all the CPU?
"Jason Wang" <aa@.aa.com> wrote in message
news:eSLkGBeRGHA.5108@.TK2MSFTNGP09.phx.gbl...
> Hi,
> We have a big report running on SQLRS2000+SP2. The report has multiple
> datasets and queries. When report starts running, the database server it
> connects to run query and pull data will start 33 threads and immediately
> reach 100% CPU usage for all 8 CPUs. Databases is over 1TB and sets on EMC
> SAN. There is no blocking during report generation. There is no
> sub-report, so I assume there is only one DB connection.
> We are wondering is it possible to restrict the number of threads
> instantiated or is it possible to serialize the report generation, only
> run 1 thread at a time. Please help.
> Jason
>