Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Thursday, March 29, 2012

Get back data from Reports

I have just started working with RS 2005 and was wondering if / how I can do the following.

I created an asp.net website that has a report viewer to show my reports on the web.
In addition there is a page that lists all of the reports a user has access to, which is pretty much a series of links:

Report 1
Report 2
Report 3
.....

Now in my reports I generally create a grand total of one of the column and was wondering if there was some way to get that information back into an asp page, ie:

Report 1 - $125,713
Report 2 - ($23,111)
Report 3 - $1,762,142

I was thinking if there was some way to send a parameter to the report like Summary=True which would tell it to just return a XML bit of data holding the total for that report (Anything will work, doesn't have to be XML). So the page with the report links would call each of the reports.

I realize that it would probably be possible to do this through a stored procedure, but that would just create another point of maintenace. Instead I could create some function in all of my reports and have a standardized way of doing this so my webserver or database wouldnt have to be updated all the time.

Thanks, and let me know if there is any other information I can provide to make this clearer.

Try using the XML renderer. You will get a "report" which is really just an XML stream with the data. You can then XPath into it to get the values you are interested in.|||

Sounds promising. Being rather new to reports, are there any pages you can think of off hand that provide examples or explanations?

Wednesday, March 21, 2012

Generating membership number

Hi all,
I have a question about generating membership numbers on the fly when someone registers to my website.

Rather than using the auto increment field as a membership number, I would rather keep it as just as the ID for the record and I would like to have a seperate membership number that looks something similar to this...

SR357324J

This will then stay with them for the lifetime of their membership and be on their printed loyalty card.

My questions are...
1) Is there a 'good practice' for membership number format and generation?

2) If this was used as a unique field, is there a degradation in performance when looking up records due to it being alphanumeric.

I may be well off base here, however these are my thoughts so far and your opinion/help is greatly appreciated.

Thanks for your contribution.I'm not sure about #1, but as for #2: You can still use the ID to retrieve records, even if you display the manually generated membership #.

If, however, you create your clustered index on the manually generated membership # field, you can make that field the clustered index (though this may hurt performance as relates to joins with other tables).|||I'd say let the db autogenerate an ID for you and you can append the 'SR' later..you could get into locking problems and duplicate ID's sooner or later..

hth

Friday, March 9, 2012

generate table scripts

Hi

I'm developing a website using SQL Server Express 2005 and VIsual Web Developer Express, and now want to start testing my website in a live environment. Until now I have been manually creating tables on my web database to match those on my local DB, but I have so many tables I don't want to manually recreate them all again. Is there a method in SQL Server Express 2005 that will allow me to generate insert scripts for all the tables?

Cheers

Andy

This should help

http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx

|||

Download the SQL Server Database Publishing Wizard:

http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

Jos

|||

Blimey! That was quick. Thanks for the prompt responses, guys!

Friday, February 24, 2012

Generate database script does not include database role members

I have read in the connect website (https://connect.microsoft.com/
SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125021)
That this issue was resolved in SP2. I have SP2 installed and still
have the same problem.
Am I missing something ?
-Noel
I looked under Tools | Options | Scripting and expected to see a new option
there, but did not find one. :-(
FWIW, I voted "5" on both 265852 and 125021.
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
<isyourfriend@.gmail.com> wrote in message
news:1175102798.822976.257790@.n76g2000hsh.googlegr oups.com...
>I have read in the connect website (https://connect.microsoft.com/
> SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125021)
> That this issue was resolved in SP2. I have SP2 installed and still
> have the same problem.
> Am I missing something ?
> -Noel
>
|||(isyourfriend@.gmail.com) writes:
> I have read in the connect website (https://connect.microsoft.com/
> SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125021)
> That this issue was resolved in SP2. I have SP2 installed and still
> have the same problem.
> Am I missing something ?
I researched the issue and found that if you select "Script object permissions" it will script membership in user-defined roles, but not
in predefined roles like db_datawriter. I don't recall how SP1 worked;
maybe it did not script any membership at all. But in that case they
only fixed half the problem.
(And it's not intuitive that you need to select "Script object permissions".
I submitted
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=266078
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||On Mar 29, 6:18 pm, Erland Sommarskog <esq...@.sommarskog.se> wrote:
> (isyourfri...@.gmail.com) writes:
>
> I researched the issue and found that if you select "Script object permissions" it will script membership in user-defined roles, but not
> in predefined roles like db_datawriter. I don't recall how SP1 worked;
> maybe it did not script any membership at all. But in that case they
> only fixed half the problem.
> (And it's not intuitive that you need to select "Script object permissions".
> I submittedhttps://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?Fe...
> --
> Erland Sommarskog, SQL Server MVP, esq...@.sommarskog.se
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
I am totally disappointed about the way M$ is handling BUGs that were
100% non existent on previous releases.
Thanks for the feedback.
-Noel