Crystal Report - Page 39
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 39 of 39 FirstFirst ... 2936373839
Results 571 to 580 of 580

Thread: Crystal Report

  1. #571
    Join Date
    Mar 2004
    Location
    Little Rock, Arkansas, U.S.A.
    Posts
    1

    Re: password protected database

    Hi curio11,

    I am not sure as to what platform you are working on. I am using VS.Net 2003 and using C#. Here is what I did to solve this issue:

    Right before I set the dataSource for my report. I did this:

    myReport report = new myReport();
    string login = "UserID";
    string passWd = "Password";
    report.SetDatabaseLogon(login,passWd);

    crystalReportViewer1.ReportSource = report;

    This did it for me. I hope this helps.

    Take care.

    Adios!
    Salmaan.
    Share on Google+

  2. #572
    Join Date
    Mar 2004
    Posts
    3

    Nested Case Statements

    I have the following code :
    select {?TroubleType}
    case "All Types":
    {tbl_tickets.CustomerAcctNumber} <> '0' and
    {tbl_tickets.OpenDate} >= {?BeginDate} and
    {tbl_tickets.OpenDate} <= {?EndDate} and
    {tbl_tickets.CustomerAcctNumber} <> '184114' and
    {tbl_tickets.TroubleType} <> ""
    case {?TroubleType}:
    {tbl_tickets.TroubleID}<> 0 and
    {tbl_tickets.OpenDate}>= {?BeginDate} and
    {tbl_tickets.OpenDate}<= {?EndDate} and
    {tbl_tickets.CustomerAcctNumber}<> '184114' and
    {tbl_tickets.TroubleType}= {?TroubleType}

    and I need to duplicate it for 3 other parameter fields. Is there a way to nest the case statements - I continually get an error everytime I try add just one other case statement to a new parameter....
    Share on Google+

  3. #573
    Join Date
    Mar 2004
    Posts
    4

    Password Protected Database

    Hi

    I am working with VB.net 2002 and MS-Access(password protected). Have created a DSN to work with Crystal Reports. Now the problem is that it does not accept the following line code

    CrystalReportViewer1.LogOnInfo(0) = "DSN = ABC;UID = ;PWD = XYZ;DSQ = "

    have searched the whole thread, the only solution i found is this piece of code but it does not work et all...

    do i require to import any files?? i am importing CrystalDecisions.CrystalReports.Engine and CrystalDecisions.Shared

    my code is:
    Dim rptTransporter As New rptTransporterCostingRpt()

    CrystalReportViewer1.LogOnInfo(0) = "DSN = ABC;UID = ;PWD = XYZ;DSQ = "

    CrystalReportViewer1.ReportSource = rptTransporter
    CrystalReportViewer1.Show()

    Thanks in advance
    Bye
    Share on Google+

  4. #574
    Join Date
    Apr 2003
    Posts
    2

    Unhappy How do i dynamically through MFC/VC++ add and remove fields in the crystal report?

    How do i dynamically through MFC/VC++ add and remove fields in the crystal report?
    Share on Google+

  5. #575
    Join Date
    Jan 2003
    Posts
    15

    Can I call a function WhileReadingRecords?

    Hi,

    I have the databse (Oracle) in Unicode (UTF8 encoding) and using reports 4.5. So I am not able to get the strings in the report. First of all, Does crystal report 9.0 works fine with UTF8 encoding backend? (now i get the string as UTF8 characters)

    Now, to escape from upgrading to reports 9.0, I have another way. I can convert the Unicode characters to ASCII and use my own font to display and print. (The conversion and fonts are working properly.)

    I want to call my converter while reading database (for every string value of every records). The front-end is VB6 and the coverters are functions written in VB6 (also used other dlls).

    Can you guys help me to get a solution?

    Thanx in advance.

    Regards,
    Mahesh
    Share on Google+

  6. #576
    Join Date
    Apr 2004
    Posts
    2

    flattening the rows from database

    I am reading a record grouped by name and then by project name from Sql server DB. The database has records based on year of week. But the report should be based on pay period(dates). I have the logic to filter the data based on input pay period range. I used array to stretch the 3 rows from DB to 1 report row using

    if({TimeSheet.Week} = {@beginWk}) then
    populate week1 array;
    else if({TimeSheet.Week} = {@endWk}) then
    populate week3 array;
    else
    populate week2 array;

    TimeSheet.Week - is the databasew field

    Then I form the finalHrarray by stretching week1, week2 and week3 based on the pay period range. But in the report under the detail section it displays 3 rows from the DB for the project
    like
    projectA 0 1 2 3 4 5 0 0 0 0 0 0 0 0 0
    projectA 0 1 2 3 4 5 0 0 0 0 0 0 0 0 0
    projectA 0 1 2 3 4 5 0 0 0 0 0 0 0 0 1

    Somehow it reads only 1 and 3 row and in some case 1 and 2 row. But I want
    projectA 0 1 2 3 4 5 0 5 6 7 2 3 0 0 1 All three weeks in 1 row
    Share on Google+

  7. #577
    Join Date
    Nov 2003
    Location
    San Diego, California
    Posts
    49

    sql command parameter issue...

    Please help Babu:

    For a couple days I've been battling with writing a report that has to tables linked by a left outer join. The left table simply holds all possible hours of the day (00 - 23). The right table holds all of my data.

    My report groups on the hour of the day and it needs to show every hour of the day regardless of whether there is data there or not. I tried a bunch of things but I finally came to the conclusion that crystal was creating my sql syntax incorrectly.

    I think I found a work around. I'm using an access database. If I write my own sql command I got it to work. Apparently, crystal was creating the wrong syntax for my sql statement when I used the select expert.

    Crystal was creating the following query:

    SELECT holdertable_hours.startingtimehours, recordcontrolnumber
    FROM holdertable_hours LEFT OUTER JOIN Master ON HolderTable_Hours.StartingTimeHours=Master.StartingTimeHours
    Where Master.GroupUsed='083';

    If I create a sql command and put the where clause in the join statement it worked:

    SELECT HolderTable_Hours.StartingTimeHours, RecordControlNumber
    FROM HolderTable_Hours LEFT JOIN [Select * From Master Where GroupUsed='083']. AS Master ON HolderTable_Hours.StartingTimeHours=Master.StartingTimeHours;

    I have two questions though:
    1) Is it possible to change the sql that crystal generates without writing my own sql command?

    2) If I have to write my own sql command, is it possible to create a drop down list for my parameter field, Master.GroupUsed? Originally I was not writing my own command and I had a parameter field where I could select my value for GroupUsed from a drop down list. Now that I have my parameter field as part of my command, it appears that crystal is making me type in the GroupUsed value. It would be nice to still be able to use a drop down list.

    Thanks again for all of your help on this!

    Steph-
    Share on Google+

  8. #578
    Join Date
    Apr 2004
    Posts
    4

    pls help......

    looks like kbabu is away.........but still, hope lives

    i hope somebody can help me.............

    i have attached a zip file, which contains my problem, pls have a look and help me.
    Attached Files Attached Files
    Share on Google+

  9. #579
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: K.Babu

    Originally posted by amit_mash
    looks like kbabu is away
    K.Babu is now the moderator of this board.
    He asked to receive notifications of new posts in this forum.
    I think one of best ways to contact him is the following:
    make your questions as new thread, and then...mail him or send
    him a pm (look in profile) the link to your question (do not rewrite
    your question, but simply write: New Crystal Report Question
    and paste the link to your question...

    Cesare I.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.
    Share on Google+

  10. #580
    Join Date
    Aug 1999
    Location
    India, TamilNadu, Chennai.
    Posts
    269

    Re: Re: K.Babu

    Hi,

    Iam also recommanded for your questions as new thread.

    K.Babu

    Originally posted by Cimperiali
    K.Babu is now the moderator of this board.
    He asked to receive notifications of new posts in this forum.
    I think one of best ways to contact him is the following:
    make your questions as new thread, and then...mail him or send
    him a pm (look in profile) the link to your question (do not rewrite
    your question, but simply write: New Crystal Report Question
    and paste the link to your question...

    Cesare I.
    Please avoid sending emails to my personal mail:
    write your doubts as thread in Codeguru
    Crystal Reports Forum
    .

    This will help all people having similar matters, and will let people who know solutions on the specific topic
    share their knowledge.

    Visit my company web site (Qmax Test Equipments Private Limited)

    Yours friendly,
    K.Babu
    Share on Google+

Page 39 of 39 FirstFirst ... 2936373839

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center