Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Wednesday, March 28, 2012

How to show new Columns when user clicks on a cell in a report ?

Hi,
I have a requirement in my project which specifies that when the user clicks
on the drill down(or a cell), the report should show new columns which
basically describes the details of the drilldown action. Is it possible to
show new columns on drill down ? Currenlty Iam using Jump to Report
navigation property to show the details in a new report. Basically I want
new columns(which describe the cell clicked, for eg if the cell clicked is
total of all payments, I want to show details of the payment when user
clicks on it ) when user clicks on the cell. If I use drill down then all
detail columns are blank befor drill down action. Can anyone help me in
doing this ?
--
Thanks,
RKOn Oct 16, 3:59 pm, "S V Ramakrishna"
<ramakrishna.seeth...@.translogicsys.com> wrote:
> Hi,
> I have a requirement in my project which specifies that when the user clicks
> on the drill down(or a cell), the report should show new columns which
> basically describes the details of the drilldown action. Is it possible to
> show new columns on drill down ? Currenlty Iam using Jump to Report
> navigation property to show the details in a new report. Basically I want
> new columns(which describe the cell clicked, for eg if the cell clicked is
> total of all payments, I want to show details of the payment when user
> clicks on it ) when user clicks on the cell. If I use drill down then all
> detail columns are blank befor drill down action. Can anyone help me in
> doing this ?
> --
> Thanks,
> RK
Hi!
whene you use navigation and jum to report ,you can see parameters in
front of this,you must difine parameter in the second report and in
first report in property -navigation-parameter ,you choose your
parameter and fill your parameter with one field of dataset .
Regards.

Monday, March 26, 2012

How to share dataset after it was created within the report

Is there a way to share the dataset with the other reports once it was
created in once of the reports in the same project? Right now, we are
copying the same dataset from one to the others...
BrianI'm not sure if you want to pull out data from a created report, then
use that in the others.
Or, if you already have that data, and want to feed it into 5 reports?
I'm new to RS, and the only way I have used it sofar is setting up the
connections, parameters, then querying it through IIS. I myself am
wondering if I can take a Dataset (received through MSMQ), then tell a
Report 'use this data', then send it off to a printer (pdf etc).|||It looks like the solution to my problem will be to use the RS viewer
controls in VS.net 2005. Basically if it works the way I believe I can
get a dataset, then apply that to a number of reports, save them off to
PDF, then I am done.

Monday, March 19, 2012

How to set up an .mdf db?

Would someone please take a minute to give me a step by step how to add an .mdf db to a web app(VS 2k5 Pro with SSE)?

Only one app in the project intended as a complete sample solution to be zipped and distributed to people who would have a similar VS setup. The idea is the recipients to be able to open the .mdf (or the pages using it) right out of the box without having to go to hell and back. The .mdf included in the App_Data and the connection specified in the web.config. All ready to just unzip and go.

Obviously, it would have to be sql authentication.
Say user: johndoe/ pw: 123456

Amazing how the db connection process still has a way of bringing otherwise intelligent people to their knees.

TIA

Step 1 - New web Site :-)

Step 2 - Open Server Explorer (Ctrl W,L)

Step 3 - Right Click Data Connections and Choose Add Connection

Step 4 - Change the Data Source to be a Microsoft Sql Server Database File using the Change button

Step 5 - Use the Browse button to create a new MDF file in your App_Data folder.

Step 6 - Now you should get a dialog asking if you want to create the file. Press Yes and you should now have a Data Connection in server explorer which you can use.

Hope that helps

|||

Forgot to say that between step 5 and 6 you should select SQL authentication instead of windows authentication.

|||

Hi James,

Thanks for taking the time. I also thought that is what it takes before I started playing with SSE.
The steps you listed only work for windows authentication mode. If I select SQL authentication I get an arror:

Login failed for user '<mylogin>'. The user is not associated with a trusted SQL Server connection.

I tried all kinds of<mylogin>values Administrator, the current login, totally nonexistent names... They all give the same error. The idea is to put in a username/pw that have nothing to do with my machine. Isn't that the point of file based db (unless we are expected to deploy on the dev machine)? Anyway, it rejects all of them indiscriminately.

Back in sql 2k, this error was associated with not setting up globally the authentication mode of the server instance to either mixed or just sql.

With SSE there is no concept of multiple instances or global server settings for authentication, like with the full versions. I had installed VS a couple of months ago and there is no place in the options that shows the current configuration. So I uninstalled SSE just to go through the install all over again. Well, it just rolled along automatically. I didn't see anywhere during the install to set up the server. I assumed that was being done at the file level, as the GUI suggests.


Something just doesn't add up.

|||

Rob

All becomes clear. The default setup for VS2005 Express is to only support windows authentication. The setup doesn't allow you to change this during the graphic stage, you have to start setup with the correct command switch. The good news is that you can change it to mixed mode with a bit of registry hacking.

See thisknowledge base. Hopefully that should get you on the way.

Cheers

|||

Thanks James.

This only partly solves the problem. The recipients of the sample project will also face an issue connecting.

Am I misunderstanding the puspose of .mdf files? They do not seem to be transportable databases from one machine to another like Access. I can't expect everyone I send a sample project to hack their registry, just to try the sample. Most installs out there are exactly like mine - done from the setup media, thus default windows authentication mode. Why did they even bother showing the other modes in the GUI?

If I have to hack the registry to get a basic functionality I am by definition misusing the ptoduct. What is the right way to accomplish this, what I thought was a simple and popular, task? Namely to send a one page example along with a db all packaged together?

Using Access instead is not the same. Many features are different.Embedding SSE is a huge job too, and not really pertinent to web apps anyway.

|||

I only mentioned the registry hack for your machine.

If you install SQL Server Express with the switch SECURITYMODE=SQL then it will be in Mixed mode authentication.

Then you can ship the mdf file. This article has a good story about how to embed Server 2005 with your app -http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/EmSQLExCustApp.asp

Cheers

James

|||

Yes, I am aware of this article about embedding. As I said it is not straight forward and it does not pertain to the simple scenario I describe.

OK. Clean new xp sp2 OS install.
Clean new NAMED instance SSE install with mixed authentication mode specified at setup.

I still get the exact same error, if I try to create a new .mdf with sql authenitcation.

What gives?

|||

1) New website.

2) Right click "App_data" in solution explorer.

3) Click "Add new item"

4) Click "SQL Database".

5) Click "Ok".

Is there something wrong with this particular setup that isn't working for you?

If you then drag a SqlDataSource to your webpage, and select the connection property, one of the entries in the dropdown should be "database.mdf", select that. If you then go to the .aspx source, you should see that the connection string it is using is:

ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"

There is no mention of the machine name, or the project directory in there, and you can just .zip the project folder, give it to someone else, and they can use it immediately.

|||

ok. So an .mdf with just windows authentication works on any machine it is on.

I still have to digest the sucurity implications, but for now insecure is exactly what I need so ticket closed!

Thanks to everybody.

|||

I recently re-installed visual studio 2005. Since that time I have not been able to connect to .mdf files or create them in the App_Data directory. I receive the "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." error. Anybody have any ideas as to what is causing this?

Thanks

How to set the ReportPath for the reportviewer control

In my solution I've got 2 projects. ABCWeb is my website and ABCReports is a Report Server project.

In ABCWeb I have an aspx page that has a single reportviewer control on it which is intended to display the various reports that are in ABCReports . I am not using the Reports Server. I just simply want to set the property of the reportviewer control under LocalReport.ReportPath to the location of the report in ABCReports .

I keep getting this error no matter how I try to reference it.

  • An error occurred during local report processing.
  • The report definition for report '/ABCReports/Reports/rptNoticeOfDecision.rdl' has not been specified
  • Could not find a part of the path 'C:\ABCReports\Reports\rptNoticeOfDecision.rdl'.

    what am I doing wrong

    try something like this

    RVcl.LocalReport.ReportPath ="ABCReports/Reports/rptNoticeOfDecision.rdl";

    -remove the first /

    I assume ABCreports is a sub folder of the application root

  • Monday, March 12, 2012

    How to set SQL Server and VS default folder paths?

    Ive just installed VS2005 Pro and SQL Server Developer edition.

    Now I want to set the default paths for project, templates, settings. But I want for both VS and SQL files.

    For example, right now the default folders for SQL Studio are:

    .\My Documents\SQL Server Management Studio\Projects

    .\My Documents\SQL Server Management Studio\Settings

    .\My Documents\SQL Server Management Studio\Templates

    .\My Documents\SQL Server Management Studio\Backup Files

    ... and so on.

    For VS Studio:

    .\My Documents\Visual Studio 2005\Projects

    .\My Documents\Visual Studio 2005\Templates

    .\My Documents\Visual Studio 2005\Code Snippets

    ... and so on.

    I would like for all sub-folders(from SQL Server and VS) to be in one same folder(Development), for example:

    .\My Documents\Development\Projects

    .\My Documents\Development\Settings

    .\My Documents\Development\Templates

    .\My Documents\Development\Backup Files

    .\My Documents\Development\Code Snippets

    ... and so on.

    I have tried changing in each application′s options the default path for each one, pointing to each folder I listed above.

    My problem is that both VS and SQL Server still keeps creating folders in the old locations, for example: ".\My Documents\SQL Server Management Studio\Projects". This example happens when I create a new query, and try to save it, it automatically creates that folder.

    It only works for a few of them, like the settings folder. Ive managed to create a single folder for SQL and VS setting files.

    Is there a way I can join both Application folders? I want to keep both projects files in one folder, both setting files in one folder, and so on...

    I hope I explained well my situation.

    Thanks!

    In VS 2005 you can change default directories by going to Tools >> Options menu then selecting Projects and Solutions.

    In SQL Management Studio I believe it opens your last known file path you opened.

    Justin King
    |||SQL Server Managemetn Studio does not retain your file location between sessions. As far as I can tell there is no way to change this and the MS help facility neither confirms nor denies this assumption.
    |||

    So its not possible to change that?

    Ive changed all places in the registry (all the keys I think might change that)
    Still it creates the folders. Are there other places I can change that?

    Thanks for the help.

    Friday, March 9, 2012

    How to set ReportViewer DataSource to a Custom Collection in Another Project

    I have a web site that uses a business logic layer (BLL) and a data access layer (DAL). The BLL is in a separate project. The DAL is in a separate project. The web site has a reference to the BLL project and the BLLproject has a reference to the DAL project. Just to learn how to use the reportviewer control I used the server explorer to create a web datasource based directly on a stored procedure and everything works just fine. However, now I want to reportviewer to be based on a method in my BLL project. My problem is that the web data source window only shows those methods that have not paramenters. I want it to show CovAdm.BLL.InitialInspectionMgr.LoadDataTableForParcelID which has one parameter for ParcelID and returns a datatable. How do I get this method to show up under the CovAdm.BLL item in the web data sources window?

    I found what I think is a simpler and better solution, especially because the reportviewer control seems be a long way from WYSIWYG. My solution doesn't use a report viewer control at all. Here's what I did.

    My web page has a formview control with a "Report" button. The formview control itemcommand event checks for which button has been clicked and executes the following code behind for the Report button:
    ' get the data
    Dim bll As New CovAdm.BLL.InitialInspectionMgr
    Dim col As CovAdm.BLL.InitialInspectionCollection
    Dim lngParcelID As Long = MySession.ParcelSearchResultDetailParcelID(Session)
    col = bll.LoadForParcelID(lngParcelID, "ParcelID", "ASC")
    ' use the default file name for cases that have no file name
    ' use a physical path because local reports don't work with virtual paths
    For Each ii As CovAdm.BLL.InitialInspection In col
    If String.IsNullOrEmpty(ii.FQPhotoFileName) Then
    Dim str As String = AppConfigurationMgr.PhotoNotAvailableRelativeFile()
    str = Server.MapPath(str)
    ii.FQPhotoFileName = str
    End If
    Next
    ' set up the report
    Dim lr As New Microsoft.Reporting.WebForms.LocalReport
    lr.ReportPath = Server.MapPath("~/Home/Report/rptInitialInspection.rdlc")
    lr.EnableExternalImages = True
    lr.DataSources.Clear()
    ' make sure we use the correct data source name
    Dim rds As New Microsoft.Reporting.WebForms.ReportDataSource("dsrptInitialInspection_dtrptInitialInspection", col)
    lr.DataSources.Add(rds)
    ' show the file dialog for opening or saving the pdf verion of the report
    Utility.ShowLocalReport(Response, lr)

    The code from my Utility class is shown below:
    Public Shared Sub ShowLocalReport _
    ( _
    ByVal vResponse As System.Web.HttpResponse, _
    ByVal vlr As Microsoft.Reporting.WebForms.LocalReport _
    )
    '
    ' Aruments
    ' ========
    ' vResponse - HttpResponse object from calling page
    ' vlr - LocalReport object from calling page
    '
    ' the procedure is currently limited to PDF format
    Dim strFormat As String = "PDF"
    Dim strMimeType As String = Nothing
    Dim strEncoding As String = Nothing
    Dim strFileExt As String = Nothing
    ' the default filename for saving will be the name if the rdlc file
    Dim strFileName As String = System.IO.Path.GetFileNameWithoutExtension(vlr.ReportPath)
    Dim astrStream() As String
    Dim aWarning() As Microsoft.Reporting.WebForms.Warning
    Dim aBytes As Byte()
    ' render the report
    aBytes = vlr.Render(strFormat, Nothing, strMimeType, strEncoding, strFileExt, astrStream, aWarning)
    ' show the open / save dialog
    vResponse.Clear()
    vResponse.ContentType = "application/" & strFormat
    vResponse.AddHeader("content-disposition", "attachment; filename=" & strFileName & "." & strFileExt)
    vResponse.BinaryWrite(aBytes)
    vResponse.End()
    End Sub

    Wednesday, March 7, 2012

    How to set MS Access as Data Flow Destination

    I can't seem to find a way to make the Data Flow Destination in a Business Intelligence Visual Studion Project output an MDB file for Microsoft Access.

    Hi Bart,

    Data flow destination can be used to output to MDB file for Microsoft Access.

    In the OLE DB "Connection Manager: Select "Microsoft Jet 4.0 OLE DB Provider" for the Provider field.
    Click on the "Browse" Button next for the "Database File Name" property and Select an existing Microsoft Access Database file. and close that window.

    In the OLE DB Destination Editor - for the "Name of the table or the view" property click on "New" and it will show the table format for the imported table in access database.

    Thanks,
    Loonysan

    |||

    Yes - its possible.

    In the "OLE DB Destination Editor" Window - Click "New" for OLEDB Connection Manager.
    In the "Connection Manager" Window - Select "Microsoft Jet 4.0 OLE DB Provider".
    Select an existing Access Database file using the "Browse" button for "Database File Name and close the "Configure OLE DB Connection Manager" window.

    In the "OLE DB Destination Editor" - Click "New" for "Name of the table or the view" - it will show the table structure of the imported data. Make changes to the table / column names if required.

    Clcik on "Mappings" and check the default mapping for the imported columns. Click OK.

    You should be good to go from here

    Thanks,
    Loonysan

    Friday, February 24, 2012

    How to set a photo path when creating table

    Hi all,
    I am doing a project which need to use Microsoft SQL Server 2000 as my
    database. Now, I am creating a table, that I need to put in a photo.
    So, I am facing a problem of setting the photo path. Can u all give me
    some help on it. Thks.
    Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    Interface. So, I need to do the database linking between my database in
    SQL Server to VB. Can I have the sample code which can do the linking
    part. Thks.
    Whats photo path?
    If you are trying to save an image, use image datatype. or keep it in a
    particular folder in server and update the location in database.
    Use connection string,
    "Driver={SQL Server};Server=ServerName;Database=pubs;Uid=sa;Pwd =asdasd;"
    Thanks,
    Sree
    [Please specify the version of Sql Server as we can save one thread and time
    asking back if its 2000 or 2005]
    "jyetying" wrote:

    > Hi all,
    > I am doing a project which need to use Microsoft SQL Server 2000 as my
    > database. Now, I am creating a table, that I need to put in a photo.
    > So, I am facing a problem of setting the photo path. Can u all give me
    > some help on it. Thks.
    > Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    > Interface. So, I need to do the database linking between my database in
    > SQL Server to VB. Can I have the sample code which can do the linking
    > part. Thks.
    >
    |||Have a look at this.
    http://support.microsoft.com/kb/194975/en-us
    Hilary Cotter
    Director of Text Mining and Database Strategy
    RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
    This posting is my own and doesn't necessarily represent RelevantNoise's
    positions, strategies or opinions.
    Looking for a SQL Server replication book?
    http://www.nwsu.com/0974973602.html
    Looking for a FAQ on Indexing Services/SQL FTS
    http://www.indexserverfaq.com
    "jyetying" <yam_jyet_ying@.hotmail.com> wrote in message
    news:1158310229.209741.157910@.p79g2000cwp.googlegr oups.com...
    > Hi all,
    > I am doing a project which need to use Microsoft SQL Server 2000 as my
    > database. Now, I am creating a table, that I need to put in a photo.
    > So, I am facing a problem of setting the photo path. Can u all give me
    > some help on it. Thks.
    > Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    > Interface. So, I need to do the database linking between my database in
    > SQL Server to VB. Can I have the sample code which can do the linking
    > part. Thks.
    >

    How to set a photo path when creating table

    Hi all,
    I am doing a project which need to use Microsoft SQL Server 2000 as my
    database. Now, I am creating a table, that I need to put in a photo.
    So, I am facing a problem of setting the photo path. Can u all give me
    some help on it. Thks.
    Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    Interface. So, I need to do the database linking between my database in
    SQL Server to VB. Can I have the sample code which can do the linking
    part. Thks.Whats photo path?
    If you are trying to save an image, use image datatype. or keep it in a
    particular folder in server and update the location in database.
    Use connection string,
    "Driver={SQL Server};Server=ServerName;Database=pubs;
    Uid=sa;Pwd=asdasd;
    "
    Thanks,
    Sree
    [Please specify the version of Sql Server as we can save one thread and
    time
    asking back if its 2000 or 2005]
    "jyetying" wrote:

    > Hi all,
    > I am doing a project which need to use Microsoft SQL Server 2000 as my
    > database. Now, I am creating a table, that I need to put in a photo.
    > So, I am facing a problem of setting the photo path. Can u all give me
    > some help on it. Thks.
    > Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    > Interface. So, I need to do the database linking between my database in
    > SQL Server to VB. Can I have the sample code which can do the linking
    > part. Thks.
    >|||Have a look at this.
    http://support.microsoft.com/kb/194975/en-us
    Hilary Cotter
    Director of Text Mining and Database Strategy
    RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
    This posting is my own and doesn't necessarily represent RelevantNoise's
    positions, strategies or opinions.
    Looking for a SQL Server replication book?
    http://www.nwsu.com/0974973602.html
    Looking for a FAQ on Indexing Services/SQL FTS
    http://www.indexserverfaq.com
    "jyetying" <yam_jyet_ying@.hotmail.com> wrote in message
    news:1158310229.209741.157910@.p79g2000cwp.googlegroups.com...
    > Hi all,
    > I am doing a project which need to use Microsoft SQL Server 2000 as my
    > database. Now, I am creating a table, that I need to put in a photo.
    > So, I am facing a problem of setting the photo path. Can u all give me
    > some help on it. Thks.
    > Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    > Interface. So, I need to do the database linking between my database in
    > SQL Server to VB. Can I have the sample code which can do the linking
    > part. Thks.
    >

    How to set a photo path when creating table

    Hi all,
    I am doing a project which need to use Microsoft SQL Server 2000 as my
    database. Now, I am creating a table, that I need to put in a photo.
    So, I am facing a problem of setting the photo path. Can u all give me
    some help on it. Thks.
    Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    Interface. So, I need to do the database linking between my database in
    SQL Server to VB. Can I have the sample code which can do the linking
    part. Thks.Whats photo path?
    If you are trying to save an image, use image datatype. or keep it in a
    particular folder in server and update the location in database.
    Use connection string,
    "Driver={SQL Server};Server=ServerName;Database=pubs;Uid=sa;Pwd=asdasd;"
    --
    Thanks,
    Sree
    [Please specify the version of Sql Server as we can save one thread and time
    asking back if its 2000 or 2005]
    "jyetying" wrote:
    > Hi all,
    > I am doing a project which need to use Microsoft SQL Server 2000 as my
    > database. Now, I am creating a table, that I need to put in a photo.
    > So, I am facing a problem of setting the photo path. Can u all give me
    > some help on it. Thks.
    > Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    > Interface. So, I need to do the database linking between my database in
    > SQL Server to VB. Can I have the sample code which can do the linking
    > part. Thks.
    >|||Have a look at this.
    http://support.microsoft.com/kb/194975/en-us
    --
    Hilary Cotter
    Director of Text Mining and Database Strategy
    RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
    This posting is my own and doesn't necessarily represent RelevantNoise's
    positions, strategies or opinions.
    Looking for a SQL Server replication book?
    http://www.nwsu.com/0974973602.html
    Looking for a FAQ on Indexing Services/SQL FTS
    http://www.indexserverfaq.com
    "jyetying" <yam_jyet_ying@.hotmail.com> wrote in message
    news:1158310229.209741.157910@.p79g2000cwp.googlegroups.com...
    > Hi all,
    > I am doing a project which need to use Microsoft SQL Server 2000 as my
    > database. Now, I am creating a table, that I need to put in a photo.
    > So, I am facing a problem of setting the photo path. Can u all give me
    > some help on it. Thks.
    > Besides that, I am using Visual Basic 6.0 to do my GUI, Graphic User
    > Interface. So, I need to do the database linking between my database in
    > SQL Server to VB. Can I have the sample code which can do the linking
    > part. Thks.
    >