CR report connStr

Discussion in 'ASP .Net' started by Paulo, Oct 8, 2007.

  1. Paulo

    Paulo Guest

    Hi, how can I pass the ConnectionString from web.config to a CR report?

    Thanks!
     
    Paulo, Oct 8, 2007
    #1
    1. Advertising

  2. Paulo

    sloan Guest

    Dim connectionStrings As ConnectionStringSettingsCollection =
    ConfigurationManager.ConnectionStrings

    Dim connection As ConnectionStringSettings
    For Each connection In connectionStrings



    Dim connectionStringName As String = connection.Name
    Dim connectionString As String = connection.ConnectionString
    Dim providerName As String = connection.ProviderName

    Debug.Print(connectionStringName)
    Next connection




    "Paulo" <> wrote in message
    news:...
    > Hi, how can I pass the ConnectionString from web.config to a CR report?
    >
    > Thanks!
    >
     
    sloan, Oct 8, 2007
    #2
    1. Advertising

  3. Paulo

    sloan Guest

    You're missing the point.


    // set report's dataset
    report.SetDataSource(ds);

    You give it an already populated dataset.

    the CR should NOT know anything about a db connection string.


    You need to write some kind of code to populate the dataset.





    "sloan" <> wrote in message
    news:...
    >
    > Dim connectionStrings As ConnectionStringSettingsCollection =
    > ConfigurationManager.ConnectionStrings
    >
    > Dim connection As ConnectionStringSettings
    > For Each connection In connectionStrings
    >
    >
    >
    > Dim connectionStringName As String = connection.Name
    > Dim connectionString As String = connection.ConnectionString
    > Dim providerName As String = connection.ProviderName
    >
    > Debug.Print(connectionStringName)
    > Next connection
    >
    >
    >
    >
    > "Paulo" <> wrote in message
    > news:...
    >> Hi, how can I pass the ConnectionString from web.config to a CR report?
    >>
    >> Thanks!
    >>

    >
    >
     
    sloan, Oct 8, 2007
    #3
  4. sloan, thanks the help...

    I designed a CR report from wizard and I had to set a database connection to
    make the report: groups, displayed fields, tests, etc. when I click Preview
    Report it shows fine... beautiful... but how will I deploy on the server ? I
    have to pass the sql server connstr from web.config...

    Im using the code: report.SetDataSource(ds); but the aspx shows me a default
    box form to fill the properties like database, userid, pwd, etc... maybe Im
    not setting some property, something like that... what do you think ?

    About deploying I need to copy the CR dlls to the bin folder?

    thanks man!

    "sloan" <> escreveu na mensagem
    news:...
    >
    > You're missing the point.
    >
    >
    > // set report's dataset
    > report.SetDataSource(ds);
    >
    > You give it an already populated dataset.
    >
    > the CR should NOT know anything about a db connection string.
    >
    >
    > You need to write some kind of code to populate the dataset.
    >
    >
    >
    >
    >
    > "sloan" <> wrote in message
    > news:...
    >>
    >> Dim connectionStrings As ConnectionStringSettingsCollection =
    >> ConfigurationManager.ConnectionStrings
    >>
    >> Dim connection As ConnectionStringSettings
    >> For Each connection In connectionStrings
    >>
    >>
    >>
    >> Dim connectionStringName As String = connection.Name
    >> Dim connectionString As String = connection.ConnectionString
    >> Dim providerName As String = connection.ProviderName
    >>
    >> Debug.Print(connectionStringName)
    >> Next connection
    >>
    >>
    >>
    >>
    >> "Paulo" <> wrote in message
    >> news:...
    >>> Hi, how can I pass the ConnectionString from web.config to a CR report?
    >>>
    >>> Thanks!
    >>>

    >>
    >>

    >
    >
     
    Paulo Roberto, Oct 8, 2007
    #4
  5. Paulo

    shh Guest

    http://www.codeproject.com/useritems/CreatingCrystalReports.asp

    Follow the instructions at the link. Which involved creating a
    dataset, before working with CR.

    What you describe below is the "pull", because you're adding
    connection strings, select queries, etc, etc.

    This is the exact thing I said is a dangerous slope.

    Go through the instructions (at the link), and don't just download
    the code and run it.
    Go through the directions yourself.









    On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    > sloan, thanks the help...
    >
    > I designed a CR report from wizard and I had to set a database connection to
    > make the report: groups, displayed fields, tests, etc. when I click Preview
    > Report it shows fine... beautiful... but how will I deploy on the server ? I
    > have to pass the sql server connstr from web.config...
    >
    > Im using the code: report.SetDataSource(ds); but the aspx shows me a default
    > box form to fill the properties like database, userid, pwd, etc... maybe Im
    > not setting some property, something like that... what do you think ?
    >
    > About deploying I need to copy the CR dlls to the bin folder?
    >
    > thanks man!
    >
    > "sloan" <> escreveu na mensagemnews:...
    >
    >
    >
    > > You're missing the point.

    >
    > > // set report's dataset
    > > report.SetDataSource(ds);

    >
    > > You give it an already populated dataset.

    >
    > > the CR should NOT know anything about a db connection string.

    >
    > > You need to write some kind of code to populate the dataset.

    >
    > > "sloan" <> wrote in message
    > >news:...

    >
    > >> Dim connectionStrings As ConnectionStringSettingsCollection =
    > >> ConfigurationManager.ConnectionStrings

    >
    > >> Dim connection As ConnectionStringSettings
    > >> For Each connection In connectionStrings

    >
    > >> Dim connectionStringName As String = connection.Name
    > >> Dim connectionString As String = connection.ConnectionString
    > >> Dim providerName As String = connection.ProviderName

    >
    > >> Debug.Print(connectionStringName)
    > >> Next connection

    >
    > >> "Paulo" <> wrote in message
    > >>news:...
    > >>> Hi, how can I pass the ConnectionString from web.config to a CR report?

    >
    > >>> Thanks!
     
    shh, Oct 9, 2007
    #5
  6. Thanks sloan, but on the article I see that was created a .xsd schema...
    must it be created just to design the CR (fields, sqls, grouping, etc...)?

    and what is: myDataReport myDataReport = new myDataReport();

    myDataReport is a class? how can it be accessed?

    thanks again man!


    "shh" <> escreveu na mensagem
    news:...
    >
    > http://www.codeproject.com/useritems/CreatingCrystalReports.asp
    >
    > Follow the instructions at the link. Which involved creating a
    > dataset, before working with CR.
    >
    > What you describe below is the "pull", because you're adding
    > connection strings, select queries, etc, etc.
    >
    > This is the exact thing I said is a dangerous slope.
    >
    > Go through the instructions (at the link), and don't just download
    > the code and run it.
    > Go through the directions yourself.
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    >> sloan, thanks the help...
    >>
    >> I designed a CR report from wizard and I had to set a database connection
    >> to
    >> make the report: groups, displayed fields, tests, etc. when I click
    >> Preview
    >> Report it shows fine... beautiful... but how will I deploy on the server
    >> ? I
    >> have to pass the sql server connstr from web.config...
    >>
    >> Im using the code: report.SetDataSource(ds); but the aspx shows me a
    >> default
    >> box form to fill the properties like database, userid, pwd, etc... maybe
    >> Im
    >> not setting some property, something like that... what do you think ?
    >>
    >> About deploying I need to copy the CR dlls to the bin folder?
    >>
    >> thanks man!
    >>
    >> "sloan" <> escreveu na
    >> mensagemnews:...
    >>
    >>
    >>
    >> > You're missing the point.

    >>
    >> > // set report's dataset
    >> > report.SetDataSource(ds);

    >>
    >> > You give it an already populated dataset.

    >>
    >> > the CR should NOT know anything about a db connection string.

    >>
    >> > You need to write some kind of code to populate the dataset.

    >>
    >> > "sloan" <> wrote in message
    >> >news:...

    >>
    >> >> Dim connectionStrings As ConnectionStringSettingsCollection =
    >> >> ConfigurationManager.ConnectionStrings

    >>
    >> >> Dim connection As ConnectionStringSettings
    >> >> For Each connection In connectionStrings

    >>
    >> >> Dim connectionStringName As String = connection.Name
    >> >> Dim connectionString As String =
    >> >> connection.ConnectionString
    >> >> Dim providerName As String = connection.ProviderName

    >>
    >> >> Debug.Print(connectionStringName)
    >> >> Next connection

    >>
    >> >> "Paulo" <> wrote in message
    >> >>news:...
    >> >>> Hi, how can I pass the ConnectionString from web.config to a CR
    >> >>> report?

    >>
    >> >>> Thanks!

    >
    >
     
    Paulo Roberto, Oct 9, 2007
    #6
  7. Paulo

    sloan Guest

    The xsd provides two things.

    First, the thing to design the report off of.
    Second, the thing to put the data into (in a specfic format).

    Whenever you create a report , you call it something.

    EmployeeByDepartmentReport (.rpt). This becomes a real "object", that you
    can instantiate.

    So if you did a "Add New Item", "Crystal Report", and named it
    "EmployeeByDepartmentReport" (.rpt), then you'll have this code.

    EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport ();
    // as in myDataReport myDataReport = new myDataReport();


    Here is another walk thru, from Crystal Reports itself:

    http://resources.businessobjects.co...rd&dnlPath=rtm_reportingoffadonetdatasets.pdf


    The most important lines of that KB are:



    EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport();


    EmployeeDS ds = SomeMethodYouCreateToMakeAnEmployeeDS();



    /* Use Report Engine object model to pass populated dataset
    to report */
    empDeptRpt.SetDataSource (ds);



    //CrystalReportViewer1 is the CR Viewer you "drag" onto the webform
    /* bind report object with data to the Web Forms Viewer */
    CrystalReportViewer1.ReportSource = empDeptRpt;



    YOU STILL NEED TO LOOK AT THE KB and go through it, do not rely upon my code
    (immediatly above).
    I am just pointing out the important aspects/lines of the code.


    "Paulo Roberto" <> wrote in message
    news:...
    > Thanks sloan, but on the article I see that was created a .xsd schema...
    > must it be created just to design the CR (fields, sqls, grouping, etc...)?
    >
    > and what is: myDataReport myDataReport = new myDataReport();
    >
    > myDataReport is a class? how can it be accessed?
    >
    > thanks again man!
    >
    >
    > "shh" <> escreveu na mensagem
    > news:...
    >>
    >> http://www.codeproject.com/useritems/CreatingCrystalReports.asp
    >>
    >> Follow the instructions at the link. Which involved creating a
    >> dataset, before working with CR.
    >>
    >> What you describe below is the "pull", because you're adding
    >> connection strings, select queries, etc, etc.
    >>
    >> This is the exact thing I said is a dangerous slope.
    >>
    >> Go through the instructions (at the link), and don't just download
    >> the code and run it.
    >> Go through the directions yourself.
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >> On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    >>> sloan, thanks the help...
    >>>
    >>> I designed a CR report from wizard and I had to set a database
    >>> connection to
    >>> make the report: groups, displayed fields, tests, etc. when I click
    >>> Preview
    >>> Report it shows fine... beautiful... but how will I deploy on the server
    >>> ? I
    >>> have to pass the sql server connstr from web.config...
    >>>
    >>> Im using the code: report.SetDataSource(ds); but the aspx shows me a
    >>> default
    >>> box form to fill the properties like database, userid, pwd, etc... maybe
    >>> Im
    >>> not setting some property, something like that... what do you think ?
    >>>
    >>> About deploying I need to copy the CR dlls to the bin folder?
    >>>
    >>> thanks man!
    >>>
    >>> "sloan" <> escreveu na
    >>> mensagemnews:...
    >>>
    >>>
    >>>
    >>> > You're missing the point.
    >>>
    >>> > // set report's dataset
    >>> > report.SetDataSource(ds);
    >>>
    >>> > You give it an already populated dataset.
    >>>
    >>> > the CR should NOT know anything about a db connection string.
    >>>
    >>> > You need to write some kind of code to populate the dataset.
    >>>
    >>> > "sloan" <> wrote in message
    >>> >news:...
    >>>
    >>> >> Dim connectionStrings As ConnectionStringSettingsCollection =
    >>> >> ConfigurationManager.ConnectionStrings
    >>>
    >>> >> Dim connection As ConnectionStringSettings
    >>> >> For Each connection In connectionStrings
    >>>
    >>> >> Dim connectionStringName As String = connection.Name
    >>> >> Dim connectionString As String =
    >>> >> connection.ConnectionString
    >>> >> Dim providerName As String = connection.ProviderName
    >>>
    >>> >> Debug.Print(connectionStringName)
    >>> >> Next connection
    >>>
    >>> >> "Paulo" <> wrote in message
    >>> >>news:...
    >>> >>> Hi, how can I pass the ConnectionString from web.config to a CR
    >>> >>> report?
    >>>
    >>> >>> Thanks!

    >>
    >>

    >
    >
     
    sloan, Oct 9, 2007
    #7
  8. Paulo

    Paulo Guest

    thanks, but when I rename the rpt file does not show as you said:
    EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport ();

    the CR article tells us to type: "public CustomerSales oRpt = null" wich
    CustomerSales is the name of file, but when hit Ctrl+F5 the VS stops: "The
    type or namespace could not be found"...

    What can be the problem?

    thanks sloan!

    "sloan" <> escreveu na mensagem
    news:%...
    >
    > The xsd provides two things.
    >
    > First, the thing to design the report off of.
    > Second, the thing to put the data into (in a specfic format).
    >
    > Whenever you create a report , you call it something.
    >
    > EmployeeByDepartmentReport (.rpt). This becomes a real "object", that you
    > can instantiate.
    >
    > So if you did a "Add New Item", "Crystal Report", and named it
    > "EmployeeByDepartmentReport" (.rpt), then you'll have this code.
    >
    > EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport ();
    > // as in myDataReport myDataReport = new myDataReport();
    >
    >
    > Here is another walk thru, from Crystal Reports itself:
    >
    > http://resources.businessobjects.co...rd&dnlPath=rtm_reportingoffadonetdatasets.pdf
    >
    >
    > The most important lines of that KB are:
    >
    >
    >
    > EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport();
    >
    >
    > EmployeeDS ds = SomeMethodYouCreateToMakeAnEmployeeDS();
    >
    >
    >
    > /* Use Report Engine object model to pass populated dataset
    > to report */
    > empDeptRpt.SetDataSource (ds);
    >
    >
    >
    > //CrystalReportViewer1 is the CR Viewer you "drag" onto the webform
    > /* bind report object with data to the Web Forms Viewer */
    > CrystalReportViewer1.ReportSource = empDeptRpt;
    >
    >
    >
    > YOU STILL NEED TO LOOK AT THE KB and go through it, do not rely upon my
    > code (immediatly above).
    > I am just pointing out the important aspects/lines of the code.
    >
    >
    > "Paulo Roberto" <> wrote in message
    > news:...
    >> Thanks sloan, but on the article I see that was created a .xsd schema...
    >> must it be created just to design the CR (fields, sqls, grouping,
    >> etc...)?
    >>
    >> and what is: myDataReport myDataReport = new myDataReport();
    >>
    >> myDataReport is a class? how can it be accessed?
    >>
    >> thanks again man!
    >>
    >>
    >> "shh" <> escreveu na mensagem
    >> news:...
    >>>
    >>> http://www.codeproject.com/useritems/CreatingCrystalReports.asp
    >>>
    >>> Follow the instructions at the link. Which involved creating a
    >>> dataset, before working with CR.
    >>>
    >>> What you describe below is the "pull", because you're adding
    >>> connection strings, select queries, etc, etc.
    >>>
    >>> This is the exact thing I said is a dangerous slope.
    >>>
    >>> Go through the instructions (at the link), and don't just download
    >>> the code and run it.
    >>> Go through the directions yourself.
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    >>>> sloan, thanks the help...
    >>>>
    >>>> I designed a CR report from wizard and I had to set a database
    >>>> connection to
    >>>> make the report: groups, displayed fields, tests, etc. when I click
    >>>> Preview
    >>>> Report it shows fine... beautiful... but how will I deploy on the
    >>>> server ? I
    >>>> have to pass the sql server connstr from web.config...
    >>>>
    >>>> Im using the code: report.SetDataSource(ds); but the aspx shows me a
    >>>> default
    >>>> box form to fill the properties like database, userid, pwd, etc...
    >>>> maybe Im
    >>>> not setting some property, something like that... what do you think ?
    >>>>
    >>>> About deploying I need to copy the CR dlls to the bin folder?
    >>>>
    >>>> thanks man!
    >>>>
    >>>> "sloan" <> escreveu na
    >>>> mensagemnews:...
    >>>>
    >>>>
    >>>>
    >>>> > You're missing the point.
    >>>>
    >>>> > // set report's dataset
    >>>> > report.SetDataSource(ds);
    >>>>
    >>>> > You give it an already populated dataset.
    >>>>
    >>>> > the CR should NOT know anything about a db connection string.
    >>>>
    >>>> > You need to write some kind of code to populate the dataset.
    >>>>
    >>>> > "sloan" <> wrote in message
    >>>> >news:...
    >>>>
    >>>> >> Dim connectionStrings As ConnectionStringSettingsCollection =
    >>>> >> ConfigurationManager.ConnectionStrings
    >>>>
    >>>> >> Dim connection As ConnectionStringSettings
    >>>> >> For Each connection In connectionStrings
    >>>>
    >>>> >> Dim connectionStringName As String = connection.Name
    >>>> >> Dim connectionString As String =
    >>>> >> connection.ConnectionString
    >>>> >> Dim providerName As String = connection.ProviderName
    >>>>
    >>>> >> Debug.Print(connectionStringName)
    >>>> >> Next connection
    >>>>
    >>>> >> "Paulo" <> wrote in message
    >>>> >>news:...
    >>>> >>> Hi, how can I pass the ConnectionString from web.config to a CR
    >>>> >>> report?
    >>>>
    >>>> >>> Thanks!
    >>>
    >>>

    >>
    >>

    >
    >
     
    Paulo, Oct 9, 2007
    #8
  9. Paulo

    sloan Guest

    You don't rename the file

    //but when I rename the rpt file //end quote

    .........

    When you add the file, it gets added as Something.rpt (I think that's the
    extension)

    but somewhere (under the covers), there is an object of that name.


    I'd start with the KB on how to do it, and work up from there, instead of
    taking your already existing report.

    Learn the fundamentals with the KB example, when move up from there.




    "Paulo" <> wrote in message
    news:...
    > thanks, but when I rename the rpt file does not show as you said:
    > EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport ();
    >
    > the CR article tells us to type: "public CustomerSales oRpt = null" wich
    > CustomerSales is the name of file, but when hit Ctrl+F5 the VS stops: "The
    > type or namespace could not be found"...
    >
    > What can be the problem?
    >
    > thanks sloan!
    >
    > "sloan" <> escreveu na mensagem
    > news:%...
    >>
    >> The xsd provides two things.
    >>
    >> First, the thing to design the report off of.
    >> Second, the thing to put the data into (in a specfic format).
    >>
    >> Whenever you create a report , you call it something.
    >>
    >> EmployeeByDepartmentReport (.rpt). This becomes a real "object", that
    >> you can instantiate.
    >>
    >> So if you did a "Add New Item", "Crystal Report", and named it
    >> "EmployeeByDepartmentReport" (.rpt), then you'll have this code.
    >>
    >> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport
    >> ();
    >> // as in myDataReport myDataReport = new myDataReport();
    >>
    >>
    >> Here is another walk thru, from Crystal Reports itself:
    >>
    >> http://resources.businessobjects.co...rd&dnlPath=rtm_reportingoffadonetdatasets.pdf
    >>
    >>
    >> The most important lines of that KB are:
    >>
    >>
    >>
    >> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport();
    >>
    >>
    >> EmployeeDS ds = SomeMethodYouCreateToMakeAnEmployeeDS();
    >>
    >>
    >>
    >> /* Use Report Engine object model to pass populated dataset
    >> to report */
    >> empDeptRpt.SetDataSource (ds);
    >>
    >>
    >>
    >> //CrystalReportViewer1 is the CR Viewer you "drag" onto the webform
    >> /* bind report object with data to the Web Forms Viewer */
    >> CrystalReportViewer1.ReportSource = empDeptRpt;
    >>
    >>
    >>
    >> YOU STILL NEED TO LOOK AT THE KB and go through it, do not rely upon my
    >> code (immediatly above).
    >> I am just pointing out the important aspects/lines of the code.
    >>
    >>
    >> "Paulo Roberto" <> wrote in message
    >> news:...
    >>> Thanks sloan, but on the article I see that was created a .xsd schema...
    >>> must it be created just to design the CR (fields, sqls, grouping,
    >>> etc...)?
    >>>
    >>> and what is: myDataReport myDataReport = new myDataReport();
    >>>
    >>> myDataReport is a class? how can it be accessed?
    >>>
    >>> thanks again man!
    >>>
    >>>
    >>> "shh" <> escreveu na mensagem
    >>> news:...
    >>>>
    >>>> http://www.codeproject.com/useritems/CreatingCrystalReports.asp
    >>>>
    >>>> Follow the instructions at the link. Which involved creating a
    >>>> dataset, before working with CR.
    >>>>
    >>>> What you describe below is the "pull", because you're adding
    >>>> connection strings, select queries, etc, etc.
    >>>>
    >>>> This is the exact thing I said is a dangerous slope.
    >>>>
    >>>> Go through the instructions (at the link), and don't just download
    >>>> the code and run it.
    >>>> Go through the directions yourself.
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    >>>>> sloan, thanks the help...
    >>>>>
    >>>>> I designed a CR report from wizard and I had to set a database
    >>>>> connection to
    >>>>> make the report: groups, displayed fields, tests, etc. when I click
    >>>>> Preview
    >>>>> Report it shows fine... beautiful... but how will I deploy on the
    >>>>> server ? I
    >>>>> have to pass the sql server connstr from web.config...
    >>>>>
    >>>>> Im using the code: report.SetDataSource(ds); but the aspx shows me a
    >>>>> default
    >>>>> box form to fill the properties like database, userid, pwd, etc...
    >>>>> maybe Im
    >>>>> not setting some property, something like that... what do you think ?
    >>>>>
    >>>>> About deploying I need to copy the CR dlls to the bin folder?
    >>>>>
    >>>>> thanks man!
    >>>>>
    >>>>> "sloan" <> escreveu na
    >>>>> mensagemnews:...
    >>>>>
    >>>>>
    >>>>>
    >>>>> > You're missing the point.
    >>>>>
    >>>>> > // set report's dataset
    >>>>> > report.SetDataSource(ds);
    >>>>>
    >>>>> > You give it an already populated dataset.
    >>>>>
    >>>>> > the CR should NOT know anything about a db connection string.
    >>>>>
    >>>>> > You need to write some kind of code to populate the dataset.
    >>>>>
    >>>>> > "sloan" <> wrote in message
    >>>>> >news:...
    >>>>>
    >>>>> >> Dim connectionStrings As ConnectionStringSettingsCollection
    >>>>> >> =
    >>>>> >> ConfigurationManager.ConnectionStrings
    >>>>>
    >>>>> >> Dim connection As ConnectionStringSettings
    >>>>> >> For Each connection In connectionStrings
    >>>>>
    >>>>> >> Dim connectionStringName As String = connection.Name
    >>>>> >> Dim connectionString As String =
    >>>>> >> connection.ConnectionString
    >>>>> >> Dim providerName As String = connection.ProviderName
    >>>>>
    >>>>> >> Debug.Print(connectionStringName)
    >>>>> >> Next connection
    >>>>>
    >>>>> >> "Paulo" <> wrote in message
    >>>>> >>news:...
    >>>>> >>> Hi, how can I pass the ConnectionString from web.config to a CR
    >>>>> >>> report?
    >>>>>
    >>>>> >>> Thanks!
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    sloan, Oct 9, 2007
    #9
  10. Paulo

    Paulo Guest

    sloan, I found the article below, the user is having the same problem as
    mine

    http://aspalliance.com/776_Creating_Dynamic_DataSets_for_Crystal_Reports_in_ASPNET_20.1

    but on the end to solve his problem he creates a xml file... do you think it
    is the solution?

    "but somewhere (under the covers), there is an object of that name."

    Where? not in my VS 2005 web-form...

    thanks man!

    "sloan" <> escreveu na mensagem
    news:...
    > You don't rename the file
    >
    > //but when I rename the rpt file //end quote
    >
    > ........
    >
    > When you add the file, it gets added as Something.rpt (I think that's the
    > extension)
    >
    > but somewhere (under the covers), there is an object of that name.
    >
    >
    > I'd start with the KB on how to do it, and work up from there, instead of
    > taking your already existing report.
    >
    > Learn the fundamentals with the KB example, when move up from there.
    >
    >
    >
    >
    > "Paulo" <> wrote in message
    > news:...
    >> thanks, but when I rename the rpt file does not show as you said:
    >> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport
    >> ();
    >>
    >> the CR article tells us to type: "public CustomerSales oRpt = null" wich
    >> CustomerSales is the name of file, but when hit Ctrl+F5 the VS stops:
    >> "The type or namespace could not be found"...
    >>
    >> What can be the problem?
    >>
    >> thanks sloan!
    >>
    >> "sloan" <> escreveu na mensagem
    >> news:%...
    >>>
    >>> The xsd provides two things.
    >>>
    >>> First, the thing to design the report off of.
    >>> Second, the thing to put the data into (in a specfic format).
    >>>
    >>> Whenever you create a report , you call it something.
    >>>
    >>> EmployeeByDepartmentReport (.rpt). This becomes a real "object", that
    >>> you can instantiate.
    >>>
    >>> So if you did a "Add New Item", "Crystal Report", and named it
    >>> "EmployeeByDepartmentReport" (.rpt), then you'll have this code.
    >>>
    >>> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport
    >>> ();
    >>> // as in myDataReport myDataReport = new myDataReport();
    >>>
    >>>
    >>> Here is another walk thru, from Crystal Reports itself:
    >>>
    >>> http://resources.businessobjects.co...rd&dnlPath=rtm_reportingoffadonetdatasets.pdf
    >>>
    >>>
    >>> The most important lines of that KB are:
    >>>
    >>>
    >>>
    >>> EmployeeByDepartmentReport empDeptRpt = new
    >>> EmployeeByDepartmentReport();
    >>>
    >>>
    >>> EmployeeDS ds = SomeMethodYouCreateToMakeAnEmployeeDS();
    >>>
    >>>
    >>>
    >>> /* Use Report Engine object model to pass populated dataset
    >>> to report */
    >>> empDeptRpt.SetDataSource (ds);
    >>>
    >>>
    >>>
    >>> //CrystalReportViewer1 is the CR Viewer you "drag" onto the webform
    >>> /* bind report object with data to the Web Forms Viewer */
    >>> CrystalReportViewer1.ReportSource = empDeptRpt;
    >>>
    >>>
    >>>
    >>> YOU STILL NEED TO LOOK AT THE KB and go through it, do not rely upon my
    >>> code (immediatly above).
    >>> I am just pointing out the important aspects/lines of the code.
    >>>
    >>>
    >>> "Paulo Roberto" <> wrote in message
    >>> news:...
    >>>> Thanks sloan, but on the article I see that was created a .xsd
    >>>> schema... must it be created just to design the CR (fields, sqls,
    >>>> grouping, etc...)?
    >>>>
    >>>> and what is: myDataReport myDataReport = new myDataReport();
    >>>>
    >>>> myDataReport is a class? how can it be accessed?
    >>>>
    >>>> thanks again man!
    >>>>
    >>>>
    >>>> "shh" <> escreveu na mensagem
    >>>> news:...
    >>>>>
    >>>>> http://www.codeproject.com/useritems/CreatingCrystalReports.asp
    >>>>>
    >>>>> Follow the instructions at the link. Which involved creating a
    >>>>> dataset, before working with CR.
    >>>>>
    >>>>> What you describe below is the "pull", because you're adding
    >>>>> connection strings, select queries, etc, etc.
    >>>>>
    >>>>> This is the exact thing I said is a dangerous slope.
    >>>>>
    >>>>> Go through the instructions (at the link), and don't just download
    >>>>> the code and run it.
    >>>>> Go through the directions yourself.
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>> On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    >>>>>> sloan, thanks the help...
    >>>>>>
    >>>>>> I designed a CR report from wizard and I had to set a database
    >>>>>> connection to
    >>>>>> make the report: groups, displayed fields, tests, etc. when I click
    >>>>>> Preview
    >>>>>> Report it shows fine... beautiful... but how will I deploy on the
    >>>>>> server ? I
    >>>>>> have to pass the sql server connstr from web.config...
    >>>>>>
    >>>>>> Im using the code: report.SetDataSource(ds); but the aspx shows me a
    >>>>>> default
    >>>>>> box form to fill the properties like database, userid, pwd, etc...
    >>>>>> maybe Im
    >>>>>> not setting some property, something like that... what do you think ?
    >>>>>>
    >>>>>> About deploying I need to copy the CR dlls to the bin folder?
    >>>>>>
    >>>>>> thanks man!
    >>>>>>
    >>>>>> "sloan" <> escreveu na
    >>>>>> mensagemnews:...
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> > You're missing the point.
    >>>>>>
    >>>>>> > // set report's dataset
    >>>>>> > report.SetDataSource(ds);
    >>>>>>
    >>>>>> > You give it an already populated dataset.
    >>>>>>
    >>>>>> > the CR should NOT know anything about a db connection string.
    >>>>>>
    >>>>>> > You need to write some kind of code to populate the dataset.
    >>>>>>
    >>>>>> > "sloan" <> wrote in message
    >>>>>> >news:...
    >>>>>>
    >>>>>> >> Dim connectionStrings As ConnectionStringSettingsCollection
    >>>>>> >> =
    >>>>>> >> ConfigurationManager.ConnectionStrings
    >>>>>>
    >>>>>> >> Dim connection As ConnectionStringSettings
    >>>>>> >> For Each connection In connectionStrings
    >>>>>>
    >>>>>> >> Dim connectionStringName As String = connection.Name
    >>>>>> >> Dim connectionString As String =
    >>>>>> >> connection.ConnectionString
    >>>>>> >> Dim providerName As String = connection.ProviderName
    >>>>>>
    >>>>>> >> Debug.Print(connectionStringName)
    >>>>>> >> Next connection
    >>>>>>
    >>>>>> >> "Paulo" <> wrote in message
    >>>>>> >>news:...
    >>>>>> >>> Hi, how can I pass the ConnectionString from web.config to a CR
    >>>>>> >>> report?
    >>>>>>
    >>>>>> >>> Thanks!
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Paulo, Oct 9, 2007
    #10
  11. Paulo

    sloan Guest

    Now you know why I don't lilke CR.

    You think the PUSH method has quirks, the PULL method has even more "screw
    you" quirks.

    I don't know what the best solution is.

    My advice is:
    1. Always use a strongly typed dataset.
    2. Build the report against the DataSet (or use the XSD schema option)
    3. Prepopulate the DataSet
    4. Send that to your instantiated MyReportObject (and the viewer).

    That's all I got dude.

    Here is the saving grace.
    Once you get it to work ... this way... if you ever get tired of CR, you can
    switch to another reporting method
    Active Reports
    Good ole' asp:repeaters

    And you don't have to re-invent the wheel.

    You've discovered 2 things.
    What PUSH vs PULL is.
    CR has quirks. I started with CR when it came with VB4. I hate CR.
    But sometimes the job forces you to use it.

    Good luck.




    "Paulo" <> wrote in message
    news:...
    > sloan, I found the article below, the user is having the same problem as
    > mine
    >
    > http://aspalliance.com/776_Creating_Dynamic_DataSets_for_Crystal_Reports_in_ASPNET_20.1
    >
    > but on the end to solve his problem he creates a xml file... do you think
    > it is the solution?
    >
    > "but somewhere (under the covers), there is an object of that name."
    >
    > Where? not in my VS 2005 web-form...
    >
    > thanks man!
    >
    > "sloan" <> escreveu na mensagem
    > news:...
    >> You don't rename the file
    >>
    >> //but when I rename the rpt file //end quote
    >>
    >> ........
    >>
    >> When you add the file, it gets added as Something.rpt (I think that's the
    >> extension)
    >>
    >> but somewhere (under the covers), there is an object of that name.
    >>
    >>
    >> I'd start with the KB on how to do it, and work up from there, instead of
    >> taking your already existing report.
    >>
    >> Learn the fundamentals with the KB example, when move up from there.
    >>
    >>
    >>
    >>
    >> "Paulo" <> wrote in message
    >> news:...
    >>> thanks, but when I rename the rpt file does not show as you said:
    >>> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport
    >>> ();
    >>>
    >>> the CR article tells us to type: "public CustomerSales oRpt = null" wich
    >>> CustomerSales is the name of file, but when hit Ctrl+F5 the VS stops:
    >>> "The type or namespace could not be found"...
    >>>
    >>> What can be the problem?
    >>>
    >>> thanks sloan!
    >>>
    >>> "sloan" <> escreveu na mensagem
    >>> news:%...
    >>>>
    >>>> The xsd provides two things.
    >>>>
    >>>> First, the thing to design the report off of.
    >>>> Second, the thing to put the data into (in a specfic format).
    >>>>
    >>>> Whenever you create a report , you call it something.
    >>>>
    >>>> EmployeeByDepartmentReport (.rpt). This becomes a real "object", that
    >>>> you can instantiate.
    >>>>
    >>>> So if you did a "Add New Item", "Crystal Report", and named it
    >>>> "EmployeeByDepartmentReport" (.rpt), then you'll have this code.
    >>>>
    >>>> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport
    >>>> ();
    >>>> // as in myDataReport myDataReport = new myDataReport();
    >>>>
    >>>>
    >>>> Here is another walk thru, from Crystal Reports itself:
    >>>>
    >>>> http://resources.businessobjects.co...rd&dnlPath=rtm_reportingoffadonetdatasets.pdf
    >>>>
    >>>>
    >>>> The most important lines of that KB are:
    >>>>
    >>>>
    >>>>
    >>>> EmployeeByDepartmentReport empDeptRpt = new
    >>>> EmployeeByDepartmentReport();
    >>>>
    >>>>
    >>>> EmployeeDS ds = SomeMethodYouCreateToMakeAnEmployeeDS();
    >>>>
    >>>>
    >>>>
    >>>> /* Use Report Engine object model to pass populated dataset
    >>>> to report */
    >>>> empDeptRpt.SetDataSource (ds);
    >>>>
    >>>>
    >>>>
    >>>> //CrystalReportViewer1 is the CR Viewer you "drag" onto the webform
    >>>> /* bind report object with data to the Web Forms Viewer */
    >>>> CrystalReportViewer1.ReportSource = empDeptRpt;
    >>>>
    >>>>
    >>>>
    >>>> YOU STILL NEED TO LOOK AT THE KB and go through it, do not rely upon my
    >>>> code (immediatly above).
    >>>> I am just pointing out the important aspects/lines of the code.
    >>>>
    >>>>
    >>>> "Paulo Roberto" <> wrote in message
    >>>> news:...
    >>>>> Thanks sloan, but on the article I see that was created a .xsd
    >>>>> schema... must it be created just to design the CR (fields, sqls,
    >>>>> grouping, etc...)?
    >>>>>
    >>>>> and what is: myDataReport myDataReport = new myDataReport();
    >>>>>
    >>>>> myDataReport is a class? how can it be accessed?
    >>>>>
    >>>>> thanks again man!
    >>>>>
    >>>>>
    >>>>> "shh" <> escreveu na mensagem
    >>>>> news:...
    >>>>>>
    >>>>>> http://www.codeproject.com/useritems/CreatingCrystalReports.asp
    >>>>>>
    >>>>>> Follow the instructions at the link. Which involved creating a
    >>>>>> dataset, before working with CR.
    >>>>>>
    >>>>>> What you describe below is the "pull", because you're adding
    >>>>>> connection strings, select queries, etc, etc.
    >>>>>>
    >>>>>> This is the exact thing I said is a dangerous slope.
    >>>>>>
    >>>>>> Go through the instructions (at the link), and don't just download
    >>>>>> the code and run it.
    >>>>>> Go through the directions yourself.
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    >>>>>>> sloan, thanks the help...
    >>>>>>>
    >>>>>>> I designed a CR report from wizard and I had to set a database
    >>>>>>> connection to
    >>>>>>> make the report: groups, displayed fields, tests, etc. when I click
    >>>>>>> Preview
    >>>>>>> Report it shows fine... beautiful... but how will I deploy on the
    >>>>>>> server ? I
    >>>>>>> have to pass the sql server connstr from web.config...
    >>>>>>>
    >>>>>>> Im using the code: report.SetDataSource(ds); but the aspx shows me a
    >>>>>>> default
    >>>>>>> box form to fill the properties like database, userid, pwd, etc...
    >>>>>>> maybe Im
    >>>>>>> not setting some property, something like that... what do you think
    >>>>>>> ?
    >>>>>>>
    >>>>>>> About deploying I need to copy the CR dlls to the bin folder?
    >>>>>>>
    >>>>>>> thanks man!
    >>>>>>>
    >>>>>>> "sloan" <> escreveu na
    >>>>>>> mensagemnews:...
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> > You're missing the point.
    >>>>>>>
    >>>>>>> > // set report's dataset
    >>>>>>> > report.SetDataSource(ds);
    >>>>>>>
    >>>>>>> > You give it an already populated dataset.
    >>>>>>>
    >>>>>>> > the CR should NOT know anything about a db connection string.
    >>>>>>>
    >>>>>>> > You need to write some kind of code to populate the dataset.
    >>>>>>>
    >>>>>>> > "sloan" <> wrote in message
    >>>>>>> >news:...
    >>>>>>>
    >>>>>>> >> Dim connectionStrings As
    >>>>>>> >> ConnectionStringSettingsCollection =
    >>>>>>> >> ConfigurationManager.ConnectionStrings
    >>>>>>>
    >>>>>>> >> Dim connection As ConnectionStringSettings
    >>>>>>> >> For Each connection In connectionStrings
    >>>>>>>
    >>>>>>> >> Dim connectionStringName As String = connection.Name
    >>>>>>> >> Dim connectionString As String =
    >>>>>>> >> connection.ConnectionString
    >>>>>>> >> Dim providerName As String = connection.ProviderName
    >>>>>>>
    >>>>>>> >> Debug.Print(connectionStringName)
    >>>>>>> >> Next connection
    >>>>>>>
    >>>>>>> >> "Paulo" <> wrote in message
    >>>>>>> >>news:...
    >>>>>>> >>> Hi, how can I pass the ConnectionString from web.config to a CR
    >>>>>>> >>> report?
    >>>>>>>
    >>>>>>> >>> Thanks!
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    sloan, Oct 9, 2007
    #11
  12. Paulo

    Paulo Guest

    sloan, I made one report using a defined connection on the designer CR mode
    and worked very well... CR is not so bad (I think)...
    I am trying efforts just to pass the connection string, dataset to it...
    I will keep my search to solve the problem!

    Thanks!

    "sloan" <> escreveu na mensagem
    news:...
    > Now you know why I don't lilke CR.
    >
    > You think the PUSH method has quirks, the PULL method has even more "screw
    > you" quirks.
    >
    > I don't know what the best solution is.
    >
    > My advice is:
    > 1. Always use a strongly typed dataset.
    > 2. Build the report against the DataSet (or use the XSD schema option)
    > 3. Prepopulate the DataSet
    > 4. Send that to your instantiated MyReportObject (and the viewer).
    >
    > That's all I got dude.
    >
    > Here is the saving grace.
    > Once you get it to work ... this way... if you ever get tired of CR, you
    > can switch to another reporting method
    > Active Reports
    > Good ole' asp:repeaters
    >
    > And you don't have to re-invent the wheel.
    >
    > You've discovered 2 things.
    > What PUSH vs PULL is.
    > CR has quirks. I started with CR when it came with VB4. I hate CR.
    > But sometimes the job forces you to use it.
    >
    > Good luck.
    >
    >
    >
    >
    > "Paulo" <> wrote in message
    > news:...
    >> sloan, I found the article below, the user is having the same problem as
    >> mine
    >>
    >> http://aspalliance.com/776_Creating_Dynamic_DataSets_for_Crystal_Reports_in_ASPNET_20.1
    >>
    >> but on the end to solve his problem he creates a xml file... do you think
    >> it is the solution?
    >>
    >> "but somewhere (under the covers), there is an object of that name."
    >>
    >> Where? not in my VS 2005 web-form...
    >>
    >> thanks man!
    >>
    >> "sloan" <> escreveu na mensagem
    >> news:...
    >>> You don't rename the file
    >>>
    >>> //but when I rename the rpt file //end quote
    >>>
    >>> ........
    >>>
    >>> When you add the file, it gets added as Something.rpt (I think that's
    >>> the extension)
    >>>
    >>> but somewhere (under the covers), there is an object of that name.
    >>>
    >>>
    >>> I'd start with the KB on how to do it, and work up from there, instead
    >>> of taking your already existing report.
    >>>
    >>> Learn the fundamentals with the KB example, when move up from there.
    >>>
    >>>
    >>>
    >>>
    >>> "Paulo" <> wrote in message
    >>> news:...
    >>>> thanks, but when I rename the rpt file does not show as you said:
    >>>> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport
    >>>> ();
    >>>>
    >>>> the CR article tells us to type: "public CustomerSales oRpt = null"
    >>>> wich CustomerSales is the name of file, but when hit Ctrl+F5 the VS
    >>>> stops: "The type or namespace could not be found"...
    >>>>
    >>>> What can be the problem?
    >>>>
    >>>> thanks sloan!
    >>>>
    >>>> "sloan" <> escreveu na mensagem
    >>>> news:%...
    >>>>>
    >>>>> The xsd provides two things.
    >>>>>
    >>>>> First, the thing to design the report off of.
    >>>>> Second, the thing to put the data into (in a specfic format).
    >>>>>
    >>>>> Whenever you create a report , you call it something.
    >>>>>
    >>>>> EmployeeByDepartmentReport (.rpt). This becomes a real "object", that
    >>>>> you can instantiate.
    >>>>>
    >>>>> So if you did a "Add New Item", "Crystal Report", and named it
    >>>>> "EmployeeByDepartmentReport" (.rpt), then you'll have this code.
    >>>>>
    >>>>> EmployeeByDepartmentReport empDeptRpt = new EmployeeByDepartmentReport
    >>>>> ();
    >>>>> // as in myDataReport myDataReport = new myDataReport();
    >>>>>
    >>>>>
    >>>>> Here is another walk thru, from Crystal Reports itself:
    >>>>>
    >>>>> http://resources.businessobjects.co...rd&dnlPath=rtm_reportingoffadonetdatasets.pdf
    >>>>>
    >>>>>
    >>>>> The most important lines of that KB are:
    >>>>>
    >>>>>
    >>>>>
    >>>>> EmployeeByDepartmentReport empDeptRpt = new
    >>>>> EmployeeByDepartmentReport();
    >>>>>
    >>>>>
    >>>>> EmployeeDS ds = SomeMethodYouCreateToMakeAnEmployeeDS();
    >>>>>
    >>>>>
    >>>>>
    >>>>> /* Use Report Engine object model to pass populated dataset
    >>>>> to report */
    >>>>> empDeptRpt.SetDataSource (ds);
    >>>>>
    >>>>>
    >>>>>
    >>>>> //CrystalReportViewer1 is the CR Viewer you "drag" onto the webform
    >>>>> /* bind report object with data to the Web Forms Viewer */
    >>>>> CrystalReportViewer1.ReportSource = empDeptRpt;
    >>>>>
    >>>>>
    >>>>>
    >>>>> YOU STILL NEED TO LOOK AT THE KB and go through it, do not rely upon
    >>>>> my code (immediatly above).
    >>>>> I am just pointing out the important aspects/lines of the code.
    >>>>>
    >>>>>
    >>>>> "Paulo Roberto" <> wrote in message
    >>>>> news:...
    >>>>>> Thanks sloan, but on the article I see that was created a .xsd
    >>>>>> schema... must it be created just to design the CR (fields, sqls,
    >>>>>> grouping, etc...)?
    >>>>>>
    >>>>>> and what is: myDataReport myDataReport = new myDataReport();
    >>>>>>
    >>>>>> myDataReport is a class? how can it be accessed?
    >>>>>>
    >>>>>> thanks again man!
    >>>>>>
    >>>>>>
    >>>>>> "shh" <> escreveu na mensagem
    >>>>>> news:...
    >>>>>>>
    >>>>>>> http://www.codeproject.com/useritems/CreatingCrystalReports.asp
    >>>>>>>
    >>>>>>> Follow the instructions at the link. Which involved creating a
    >>>>>>> dataset, before working with CR.
    >>>>>>>
    >>>>>>> What you describe below is the "pull", because you're adding
    >>>>>>> connection strings, select queries, etc, etc.
    >>>>>>>
    >>>>>>> This is the exact thing I said is a dangerous slope.
    >>>>>>>
    >>>>>>> Go through the instructions (at the link), and don't just download
    >>>>>>> the code and run it.
    >>>>>>> Go through the directions yourself.
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> On Oct 8, 6:46 pm, "Paulo Roberto" <> wrote:
    >>>>>>>> sloan, thanks the help...
    >>>>>>>>
    >>>>>>>> I designed a CR report from wizard and I had to set a database
    >>>>>>>> connection to
    >>>>>>>> make the report: groups, displayed fields, tests, etc. when I click
    >>>>>>>> Preview
    >>>>>>>> Report it shows fine... beautiful... but how will I deploy on the
    >>>>>>>> server ? I
    >>>>>>>> have to pass the sql server connstr from web.config...
    >>>>>>>>
    >>>>>>>> Im using the code: report.SetDataSource(ds); but the aspx shows me
    >>>>>>>> a default
    >>>>>>>> box form to fill the properties like database, userid, pwd, etc...
    >>>>>>>> maybe Im
    >>>>>>>> not setting some property, something like that... what do you think
    >>>>>>>> ?
    >>>>>>>>
    >>>>>>>> About deploying I need to copy the CR dlls to the bin folder?
    >>>>>>>>
    >>>>>>>> thanks man!
    >>>>>>>>
    >>>>>>>> "sloan" <> escreveu na
    >>>>>>>> mensagemnews:...
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>> > You're missing the point.
    >>>>>>>>
    >>>>>>>> > // set report's dataset
    >>>>>>>> > report.SetDataSource(ds);
    >>>>>>>>
    >>>>>>>> > You give it an already populated dataset.
    >>>>>>>>
    >>>>>>>> > the CR should NOT know anything about a db connection string.
    >>>>>>>>
    >>>>>>>> > You need to write some kind of code to populate the dataset.
    >>>>>>>>
    >>>>>>>> > "sloan" <> wrote in message
    >>>>>>>> >news:...
    >>>>>>>>
    >>>>>>>> >> Dim connectionStrings As
    >>>>>>>> >> ConnectionStringSettingsCollection =
    >>>>>>>> >> ConfigurationManager.ConnectionStrings
    >>>>>>>>
    >>>>>>>> >> Dim connection As ConnectionStringSettings
    >>>>>>>> >> For Each connection In connectionStrings
    >>>>>>>>
    >>>>>>>> >> Dim connectionStringName As String = connection.Name
    >>>>>>>> >> Dim connectionString As String =
    >>>>>>>> >> connection.ConnectionString
    >>>>>>>> >> Dim providerName As String = connection.ProviderName
    >>>>>>>>
    >>>>>>>> >> Debug.Print(connectionStringName)
    >>>>>>>> >> Next connection
    >>>>>>>>
    >>>>>>>> >> "Paulo" <> wrote in message
    >>>>>>>> >>news:...
    >>>>>>>> >>> Hi, how can I pass the ConnectionString from web.config to a CR
    >>>>>>>> >>> report?
    >>>>>>>>
    >>>>>>>> >>> Thanks!
    >>>>>>>
    >>>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Paulo, Oct 9, 2007
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Meheraj shaik via .NET 247

    Crysatl report load report failed

    Meheraj shaik via .NET 247, May 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,250
    saapr
    Jun 7, 2005
  2. James Wallace
    Replies:
    0
    Views:
    1,059
    James Wallace
    Oct 17, 2003
  3. =?Utf-8?B?aHVicmlzdGljYm9i?=

    Load Report Fails on ASP.NET app when report is on a different ser

    =?Utf-8?B?aHVicmlzdGljYm9i?=, Mar 17, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    418
    Brock Allen
    Mar 17, 2005
  4. =?Utf-8?B?Sm9obiBCYWlsZXk=?=

    The definition of the report 'Main Report' is invalid

    =?Utf-8?B?Sm9obiBCYWlsZXk=?=, Jul 2, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    4,023
    =?Utf-8?B?Sm9obiBCYWlsZXk=?=
    Jul 2, 2005
  5. =?Utf-8?B?Z2VvZ3J1dmVu?=

    1.1 to 2.0 migration now requires TCP/IP port in ConnStr

    =?Utf-8?B?Z2VvZ3J1dmVu?=, Oct 24, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    367
    =?Utf-8?B?Z2VvZ3J1dmVu?=
    Oct 24, 2007
Loading...

Share This Page